aboutsummaryrefslogtreecommitdiff
path: root/weed/security/jwt.go
diff options
context:
space:
mode:
authorSebastian Kurfuerst <sebastian.kurfuerst@sandstorm.de>2021-12-29 12:39:41 +0100
committerSebastian Kurfuerst <sebastian.kurfuerst@sandstorm.de>2021-12-29 12:39:41 +0100
commitd156d410efb8166ded4a0c6b206fd7b071b61c8b (patch)
tree43aae7c186d669d07a67567dfbface7c4a04cbbd /weed/security/jwt.go
parenteda4c43a08e449a26fb1cc6d5bca17e2144b0add (diff)
downloadseaweedfs-d156d410efb8166ded4a0c6b206fd7b071b61c8b.tar.xz
seaweedfs-d156d410efb8166ded4a0c6b206fd7b071b61c8b.zip
rename security.GenJwt to security.GenJwtForVolumeServer
Diffstat (limited to 'weed/security/jwt.go')
-rw-r--r--weed/security/jwt.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/security/jwt.go b/weed/security/jwt.go
index 7327f7b8b..f025af519 100644
--- a/weed/security/jwt.go
+++ b/weed/security/jwt.go
@@ -13,12 +13,14 @@ import (
type EncodedJwt string
type SigningKey []byte
+// SeaweedFileIdClaims is created by Master server(s) and consumed by Volume server(s),
+// restricting the access this JWT allows to only a single file.
type SeaweedFileIdClaims struct {
Fid string `json:"fid"`
jwt.StandardClaims
}
-func GenJwt(signingKey SigningKey, expiresAfterSec int, fileId string) EncodedJwt {
+func GenJwtForVolumeServer(signingKey SigningKey, expiresAfterSec int, fileId string) EncodedJwt {
if len(signingKey) == 0 {
return ""
}