From b76e8550a4300a9131b65eaf016d959391f8b1de Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 4 Dec 2026 16:36:59 -0800 Subject: [PATCH] security: keep GenJwtForFilerAdmin's doc comment on the function Co-Authored-By: Claude Opus 5.5 --- weed/security/jwt.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/security/jwt.go b/weed/security/jwt.go index ee203cede0..61044ffb4b 100644 --- a/weed/security/jwt.go +++ b/weed/security/jwt.go @@ -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 ""