diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab_lfs_authentication.rb | 4 | ||||
-rw-r--r-- | lib/gitlab_shell.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab_lfs_authentication.rb b/lib/gitlab_lfs_authentication.rb index 4b36229..196cdd7 100644 --- a/lib/gitlab_lfs_authentication.rb +++ b/lib/gitlab_lfs_authentication.rb @@ -11,11 +11,11 @@ class GitlabLfsAuthentication end def self.build_from_json(json) - values = JSON.parse(json) + values = JSON.parse(json) rescue nil self.new(values['username'], values['lfs_token'], values['repository_http_path']) end - def authenticate! + def authentication_payload authorization = { header: { Authorization: "Basic #{Base64.strict_encode64("#{username}:#{lfs_token}")}" diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb index d3f9bbe..971b22f 100644 --- a/lib/gitlab_shell.rb +++ b/lib/gitlab_shell.rb @@ -194,7 +194,7 @@ class GitlabShell return unless lfs_access - puts lfs_access.authenticate! + puts lfs_access.authentication_payload end private |