Skip to main content

Module oidc

Module oidc 

Source
Expand description

OpenID Connect support: discovery document fetching and ID token claims.

The central entry point is OpenIdConfiguration, which fetches and parses the provider’s .well-known/openid-configuration discovery document. The resulting struct exposes the authorization_endpoint, token_endpoint, and jwks_uri needed to drive the authorization flow and validate ID tokens.

Claims represents the standard set of OIDC claims decoded from an ID token after a successful token exchange. Individual claim values are represented as typed newtypes — Email, Audience, Issuer, PictureUrl, and SubjectIdentifier — which enforce their invariants at construction time.

Structs§

Audience
An OAuth 2.0 audience value.
Claims
Standard OIDC claims decoded from an ID token.
Issuer
The OIDC issuer identifier (iss claim).
OpenIdConfiguration
A parsed OIDC discovery document (.well-known/openid-configuration).
OpenIdConfigurationError
An error returned when fetching an crate::oidc::OpenIdConfiguration fails.
PictureUrl
A validated picture URL from the OIDC picture claim.
SubjectIdentifier
The OIDC subject identifier (sub claim).
Token
A decoded OIDC ID token, present on crate::TokenSet when "openid" was in the requested scopes and the provider returned an id_token.

Enums§

Email
The OIDC email address (email claim), with verification status encoded.