- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for getExpiry (0.07 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) -
internal/config/identity/openid/jwt_test.go
claimsMap := jwtm.NewMapClaims() claimsMap.SetExpiry(time.Now().Add(time.Minute)) claimsMap.SetAccessKey("test-access") if err := updateClaimsExpiry("3600", claimsMap.MapClaims); err != nil { t.Error(err) } // Build simple token with updated expiration claim
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 8.3K 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)