Versions in this module Expand all Collapse all v0 v0.7.1 Jan 15, 2026 v0.7.0 Jan 15, 2026 Changes in this version + var ErrUserInfoSubjectMismatch = fmt.Errorf("userinfo subject does not match expected subject") + func ValidateRedirectURI(uri string) error + type Config struct + ClientID string + ClientSecret string + Issuer string + RedirectURI string + Scopes []string + func (c *Config) Validate() error + type IDTokenClaims struct + Audience []string + AuthTime time.Time + AuthorizedParty string + Email string + EmailVerified bool + ExpiresAt time.Time + IssuedAt time.Time + Issuer string + Name string + Nonce string + RawClaims map[string]any + Subject string + type IDTokenNonceValidator interface + ValidateIDTokenWithNonce func(idToken, expectedNonce string) (*IDTokenClaims, error) + type OIDCEndpoints struct + AuthorizationEndpoint string + CodeChallengeMethodsSupported []string + Issuer string + JWKSEndpoint string + TokenEndpoint string + UserInfoEndpoint string + type Provider interface + AuthorizationURL func(state, codeChallenge, nonce string) (string, error) + ExchangeCode func(ctx context.Context, code, codeVerifier string) (*Tokens, error) + Name func() string + RefreshTokens func(ctx context.Context, refreshToken string) (*Tokens, error) + UserInfo func(ctx context.Context, accessToken string) (*UserInfo, error) + type Tokens struct + AccessToken string + ExpiresAt time.Time + IDToken string + RefreshToken string + func (t *Tokens) IsExpired() bool + type UserInfo struct + Claims map[string]any + Email string + Name string + Subject string + type UserInfoSubjectValidator interface + UserInfoWithSubjectValidation func(ctx context.Context, accessToken, expectedSubject string) (*UserInfo, error)