Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKeyfunc is returned when a keyfunc error occurs. ErrKeyfunc = errors.New("failed keyfunc") )
Functions ¶
This section is empty.
Types ¶
type Keyfunc ¶
type Keyfunc interface { Keyfunc(token *jwt.Token) (any, error) KeyfuncCtx(ctx context.Context) jwt.Keyfunc Storage() jwkset.Storage }
Keyfunc is meant to be used as the jwt.Keyfunc function for github.com/golang-jwt/jwt/v5. It uses github.com/MicahParks/jwkset as a JWK Set storage.
func NewDefault ¶
NewDefault creates a new Keyfunc with a default JWK Set storage and options.
This will launch "refresh goroutine" to automatically refresh the remote HTTP resources.
func NewDefaultCtx ¶
NewDefaultCtx creates a new Keyfunc with a default JWK Set storage and options. The context is used to end the "refresh goroutine".
This will launch "refresh goroutine" to automatically refresh the remote HTTP resources.
func NewJWKJSON ¶
func NewJWKJSON(raw json.RawMessage) (Keyfunc, error)
NewJWKJSON creates a new Keyfunc from raw JWK JSON.
func NewJWKSetJSON ¶
func NewJWKSetJSON(raw json.RawMessage) (Keyfunc, error)
NewJWKSetJSON creates a new Keyfunc from raw JWK Set JSON.
Directories
¶
Path | Synopsis |
---|---|
advanced
command
|
|
aws_cognito
command
|
|
hmac
command
|
|
http
command
|
|
json
command
|
|
keycloak
command
|
|
multi_with_given
command
|
Click to show internal directories.
Click to hide internal directories.