 
 getPrivateToken = (options, callback) ->
 
-  { urlData: { baseUrl }, token } = options
+  { urlData: { baseUrl }, token, juser } = options
 
   params    =
     url     : "#{baseUrl}/api/v3/user"

      console.log '[GITLAB] TOKEN NOT FOUND ON DATA:', data
      return callback new KodingError 'Auth failed'

    callback null, token



module.exports = GitLabProvider =

    return { originalUrl : url, baseUrl, user, repo, branch }


  importStackTemplateWithOauth: (oauth, urlData, juser, callback) ->

    { baseUrl, user, repo, branch } = urlData
    { token } = oauth

    getPrivateToken { urlData, token, juser }, (err, privateToken) =>

      return callback err  if err

      @importStackTemplateWithPrivateToken privateToken, urlData, callback

