- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for MapClaims (0.17 sec)
-
internal/config/identity/openid/jwt_test.go
DummyRoleARN: &provider, }, ProviderCfgs: map[string]*providerCfg{ "1": &provider, }, closeRespFn: func(rc io.ReadCloser) { rc.Close() }, } var claims jwtgo.MapClaims if err = cfg.Validate(t.Context(), DummyRoleARN, token, "", "", claims); err != nil { t.Fatal(err) } } func TestJWT(t *testing.T) { const jsonkey = `{"keys": [ {"kty":"RSA",
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 8.2K bytes - Viewed (0) -
internal/jwt/parser_test.go
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 6K bytes - Viewed (0) -
cmd/jwt.go
func metricsRequestAuthenticate(req *http.Request) (*xjwt.MapClaims, []string, bool, error) { token, err := jwtreq.AuthorizationHeaderExtractor.ExtractToken(req) if err != nil { if err == jwtreq.ErrNoTokenInRequest { return nil, nil, false, errNoAuthToken } return nil, nil, false, err } claims := xjwt.NewMapClaims() if err := xjwt.ParseWithClaims(token, claims, func(claims *xjwt.MapClaims) ([]byte, error) {
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 4.5K bytes - Viewed (0) -
internal/jwt/parser.go
// NewMapClaims - Initializes a new map claims func NewMapClaims() *MapClaims { return &MapClaims{MapClaims: jwtgo.MapClaims{}} } // Set Adds new arbitrary claim keys and values. func (c *MapClaims) Set(key string, val any) { if c == nil { return } c.MapClaims[key] = val } // Delete deletes a key named key. func (c *MapClaims) Delete(key string) { if c == nil { return }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 14.1K bytes - Viewed (0) -
internal/auth/credentials.go
m["accessKey"] = accessKey jwt := jwtgo.NewWithClaims(jwtgo.SigningMethodHS512, jwtgo.MapClaims(m)) return jwt.SignedString([]byte(tokenSecret)) } // ExtractClaims extracts JWT claims from a security token using a secret key func ExtractClaims(token, secretKey string) (*jwt.MapClaims, error) { if token == "" || secretKey == "" { return nil, errors.New("invalid argument") }
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 11.8K bytes - Viewed (0) -
cmd/jwt_test.go
if err != nil { b.Fatal(err) } b.ResetTimer() b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { err = xjwt.ParseWithClaims(token, xjwt.NewMapClaims(), func(*xjwt.MapClaims) ([]byte, error) { return []byte(creds.SecretKey), nil }) if err != nil { b.Fatal(err) } } }) } func BenchmarkAuthenticateNode(b *testing.B) {Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 4.4K bytes - Viewed (0) -
internal/config/identity/openid/jwt.go
} return pubkey, nil } pCfg, ok := r.arnProviderCfgsMap[arn] if !ok { return fmt.Errorf("Role %s does not exist", arn) } mclaims := jwtgo.MapClaims(claims) jwtToken, err := jp.ParseWithClaims(token, &mclaims, keyFuncCallback) if err != nil { // Re-populate the public key in-case the JWKS // pubkeys are refreshed
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 8.4K bytes - Viewed (0) -
cmd/auth-handler.go
func mustGetClaimsFromToken(r *http.Request) map[string]any { claims, _ := getClaimsFromToken(getSessionToken(r)) return claims } func getClaimsFromTokenWithSecret(token, secret string) (*xjwt.MapClaims, error) { // JWT token for x-amz-security-token is signed with admin // secret key, temporary credentials become invalid if // server admin credentials change. This is done to ensure
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 25.4K bytes - Viewed (0) -
cmd/sts-handlers_test.go
} // Validate claims. Check if the sshPublicKey claim is present. dnClaim := claims.MapClaims[ldapActualUser].(string) if dnClaim != testCase.dn { c.Fatalf("Test %d: unexpected dn claim: %s", i+1, dnClaim) } sshPublicKeyClaim := claims.MapClaims[ldapAttribPrefix+"sshPublicKey"].([]any)[0].(string) if sshPublicKeyClaim == "" {Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Wed Oct 15 17:00:45 UTC 2025 - 103.4K bytes - Viewed (1) -
cmd/iam-store.go
// non-empty session tokens. if (!cred.IsServiceAccount() && !cred.IsTemp()) || cred.SessionToken == "" { continue } var ( err error claims *jwt.MapClaims ) if cred.IsServiceAccount() { claims, err = getClaimsFromTokenWithSecret(cred.SessionToken, cred.SecretKey) } else if cred.IsTemp() { var secretKey string
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 87.1K bytes - Viewed (0)