Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct {
// Identity is the user's identity, extracted from the email claim (or sub if email not present).
Identity string
// ExpiresAt is when the token expires.
ExpiresAt time.Time
}
Claims represents the claims extracted from an OIDC token.
type Config ¶
type Config struct {
// Issuer is the OIDC provider issuer URL (e.g., "https://accounts.google.com").
Issuer string
// ClientID is the expected audience claim. Required: without it, any
// token issued by the provider for any client would be accepted.
ClientID string
// TLSConfig configures TLS for OIDC provider connections.
TLSConfig tlsconfig.Config
}
Config configures the OIDC validator.
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator validates OIDC JWT tokens.
func NewValidator ¶
NewValidator creates a new OIDC token validator. It performs OIDC discovery to fetch the provider's JWKS (public keys).
Click to show internal directories.
Click to hide internal directories.