summaryrefslogtreecommitdiff
path: root/lib/gitlab_lfs_authentication.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab_lfs_authentication.rb')
-rw-r--r--lib/gitlab_lfs_authentication.rb4
1 files changed, 2 insertions, 2 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}")}"