Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-02-11 07:05:00 +0300
committerAsh McKenzie <amckenzie@gitlab.com>2019-02-15 01:29:52 +0300
commit1cfa3c76a151a1c7ddf2099e3547fe1f5d691c25 (patch)
tree8076d6a5b16d1ff2b17e452b308fd7dec0a353b9 /lib/gitlab/lfs_token.rb
parent6dab9ce34308ac735672c48dd199df7f57f1cce7 (diff)
Include expires_in for LFS authentication payload
When using git-lfs with SSH we weren't passing in the expires_header header which is allows large transfers to succeed in the event the current default of 30 mins expires. https://github.com/git-lfs/git-lfs/blob/master/docs/api/server-discovery.md#ssh
Diffstat (limited to 'lib/gitlab/lfs_token.rb')
-rw-r--r--lib/gitlab/lfs_token.rb5
1 files changed, 3 insertions, 2 deletions
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