aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/git-lfs-authenticate
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2024-01-02 17:16:55 +0100
committerLibravatar Rutger Broekhoff2024-01-02 17:16:55 +0100
commit6e97a3edaa18ef8e5b16feba29f04e993957b7a7 (patch)
tree4766c21f58811728acd933aa5dc2045e90369ad6 /cmd/git-lfs-authenticate
parent91fcc2aeda01b7680cae826349e34eb7c8c1ec3b (diff)
downloadgitolfs3-6e97a3edaa18ef8e5b16feba29f04e993957b7a7.tar.gz
gitolfs3-6e97a3edaa18ef8e5b16feba29f04e993957b7a7.zip
Token types, download verification
Diffstat (limited to 'cmd/git-lfs-authenticate')
-rw-r--r--cmd/git-lfs-authenticate/main.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/git-lfs-authenticate/main.go b/cmd/git-lfs-authenticate/main.go
index fc98246..d2dee21 100644
--- a/cmd/git-lfs-authenticate/main.go
+++ b/cmd/git-lfs-authenticate/main.go
@@ -89,6 +89,7 @@ func getGitoliteAccess(logger *logger, reqID, path, user, gitolitePerm string) b
89} 89}
90 90
91type gitolfs3Claims struct { 91type gitolfs3Claims struct {
92 Type string `json:"type"`
92 Repository string `json:"repository"` 93 Repository string `json:"repository"`
93 Permission string `json:"permission"` 94 Permission string `json:"permission"`
94} 95}
@@ -190,6 +191,7 @@ func main() {
190 expiresIn := time.Hour * 24 191 expiresIn := time.Hour * 24
191 claims := customClaims{ 192 claims := customClaims{
192 Gitolfs3: gitolfs3Claims{ 193 Gitolfs3: gitolfs3Claims{
194 Type: "batch-api",
193 Repository: repo, 195 Repository: repo,
194 Permission: operation, 196 Permission: operation,
195 }, 197 },