Documentation ¶
Index ¶
- Constants
- func CreateHS256SignedString(key []byte, claims map[string]any) (string, error)
- func NewTokenOAuth2JWT(ctx context.Context, tokenURL, clientID, clientSecret, jwtBase64Enc string) (*oauth2.Token, error)
- func ParseJWTString(tokenString string, secretKey string, claims jwt.Claims) (*jwt.Token, error)
Constants ¶
View Source
const ( // claims from https://datatracker.ietf.org/doc/html/rfc7519 . JWTClaimAudience = "aud" JWTClaimExpiration = "exp" JWTClaimIssuedAt = "iat" JWTClaimIssuer = "iss" JWTClaimJWTID = "jti" JWTClaimNotBefore = "nbf" JWTClaimSubject = "sub" )
Variables ¶
This section is empty.
Functions ¶
func CreateHS256SignedString ¶ added in v0.21.8
func NewTokenOAuth2JWT ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.