- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for SetExpiry (0.15 sec)
-
internal/jwt/parser.go
c.Issuer = issuer } // SetAudience sets audience for these claims func (c *StandardClaims) SetAudience(aud string) { c.Audience = aud } // SetExpiry sets expiry in unix epoch secs func (c *StandardClaims) SetExpiry(t time.Time) { c.ExpiresAt = t.Unix() } // SetAccessKey sets access key as jwt subject and custom // "accessKey" field.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 17 16:45:46 UTC 2024 - 14.1K bytes - Viewed (0) -
cmd/jwt.go
errMalformedAuth = errors.New("Malformed authentication input") ) func authenticateNode(accessKey, secretKey string) (string, error) { claims := xjwt.NewStandardClaims() claims.SetExpiry(UTCNow().Add(defaultInterNodeJWTExpiry)) claims.SetAccessKey(accessKey) jwt := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, claims) return jwt.SignedString([]byte(secretKey)) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 22 07:04:48 UTC 2024 - 4.5K bytes - Viewed (0) -
cmd/jwt_test.go
"os" "testing" jwtgo "github.com/golang-jwt/jwt/v4" xjwt "github.com/minio/minio/internal/jwt" ) func getTokenString(accessKey, secretKey string) (string, error) { claims := xjwt.NewMapClaims() claims.SetExpiry(UTCNow().Add(defaultJWTExpiry)) claims.SetAccessKey(accessKey) token := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, claims) return token.SignedString([]byte(secretKey)) } // Tests web request authenticator.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 22 07:04:48 UTC 2024 - 4.4K bytes - Viewed (0)