Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractBearerToken ¶
ExtractBearerToken extracts the bearer token from the Authorization header.
Types ¶
type Config ¶
type Config struct {
PublicKeyJWK string // JWK format public key
JWKSUrl string // URL to JWKS endpoint (mutually exclusive with PublicKeyJWK)
Issuer string // Expected issuer
Subject string // Expected subject (optional)
Audience string // Expected audience (optional)
Nonce string // Expected nonce (optional)
MaxExpirationFromNow time.Duration // Maximum expiration time from now (optional, defaults to 24 hours)
}
Config holds the configuration for JWT validation.
type KeySet ¶
type KeySet interface {
Get() (*jose.JSONWebKeySet, error)
}
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator handles JWT validation with a specific configuration.
func NewValidator ¶
NewValidator creates a new JWT validator with the given configuration.
Click to show internal directories.
Click to hide internal directories.