- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for ParseWithClaims (0.22 sec)
-
internal/config/identity/openid/jwt.go
} 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 if err = r.PopulatePublicKey(arn); err != nil { return err } jwtToken, err = jwtgo.ParseWithClaims(token, &mclaims, keyFuncCallback) if err != nil { return err } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 02:46:36 UTC 2024 - 8.4K bytes - Viewed (0) -
cmd/jwt.go
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) { if claims.AccessKey != globalActiveCred.AccessKey { u, ok := globalIAMSys.GetUser(req.Context(), claims.AccessKey) if !ok {
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
token := jwtgo.NewWithClaims(jwtgo.SigningMethodHS256, claimsMap) tokenString, err := token.SignedString(signKey) if err != nil { t.Error(err) } // Parse token to be sure it is valid err = jwtm.ParseWithClaims(tokenString, claimsMap, func(*jwtm.MapClaims) ([]byte, error) { return signKey, nil }) if err != nil { t.Error(err) } } func TestKeycloakProviderInitialization(t *testing.T) {
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
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) } } }) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 22 07:04:48 UTC 2024 - 4.4K bytes - Viewed (0) -
internal/jwt/parser_test.go
// Figure out correct claims type switch claims := data.claims.(type) { case *MapClaims: if data.tokenString == "" { data.tokenString = mapClaimsToken(claims) } err = ParseWithClaims(data.tokenString, &MapClaims{}, data.keyfunc) case *StandardClaims: if data.tokenString == "" { data.tokenString = standardClaimsToken(claims) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Nov 05 19:20:08 UTC 2021 - 6K bytes - Viewed (0)