diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/internal.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/lfs_token.rb | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb index ede84dba42d..b44ef2a6ea4 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -117,7 +117,7 @@ module API raise ActiveRecord::RecordNotFound.new("No key_id or user_id passed!") end - Gitlab::LfsToken.new(actor).for_gitlab_shell(project.http_url_to_repo) + Gitlab::LfsToken.new(actor).authentication_payload(project.http_url_to_repo) end # rubocop: enable CodeReuse/ActiveRecord diff --git a/lib/gitlab/lfs_token.rb b/lib/gitlab/lfs_token.rb index 5eefc3c0d7a..31e6fc9d8c7 100644 --- a/lib/gitlab/lfs_token.rb +++ b/lib/gitlab/lfs_token.rb @@ -47,11 +47,12 @@ module Gitlab user? ? :lfs_token : :lfs_deploy_token end - def for_gitlab_shell(repository_http_path) + def authentication_payload(repository_http_path) { username: actor_name, lfs_token: token, - repository_http_path: repository_http_path + repository_http_path: repository_http_path, + expires_in: DEFAULT_EXPIRE_TIME } end |