mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
security: keep GenJwtForFilerAdmin's doc comment on the function
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6369e53a45
commit
b76e8550a4
1 file changed
+2
-2
@@ -97,8 +97,6 @@ type SeaweedFilerAdminClaims struct {
|
||||
jwt.RegisteredClaims
|
||||
}
|
||||
|
||||
// GenJwtForFilerAdmin mints a Bearer token for the filer IAM gRPC service.
|
||||
// Returns an empty string if the signing key is not configured.
|
||||
// filerAdminJwt is the last admin token signed. Its claims hold only an
|
||||
// expiry, which jwt truncates to the second, so a token signed in the same
|
||||
// second with the same key is the same token.
|
||||
@@ -110,6 +108,8 @@ type filerAdminJwt struct {
|
||||
|
||||
var lastFilerAdminJwt atomic.Pointer[filerAdminJwt]
|
||||
|
||||
// GenJwtForFilerAdmin mints a Bearer token for the filer IAM gRPC service.
|
||||
// Returns an empty string if the signing key is not configured.
|
||||
func GenJwtForFilerAdmin(signingKey SigningKey, expiresAfterSec int) EncodedJwt {
|
||||
if len(signingKey) == 0 {
|
||||
return ""
|
||||
|
||||
Reference in new issue
Block a user