pub struct ProviderMetadata {
pub issuer: String,
pub authorization_endpoint: String,
pub token_endpoint: String,
pub jwks_uri: String,
pub userinfo_endpoint: Option<String>,
pub end_session_endpoint: Option<String>,
pub id_token_signing_alg_values_supported: Option<Vec<String>>,
pub extra: Map<String, Value>,
}Expand description
OpenID Connect provider metadata, from a .well-known/openid-configuration
document (OpenID Connect Discovery 1.0 §3).
Only the fields this crate uses are modelled as named fields; everything
else the provider publishes is kept in extra.
Fields§
§issuer: StringThe issuer identifier. Must match the requested issuer URL.
The authorization endpoint (authorization_endpoint).
token_endpoint: StringThe token endpoint (token_endpoint).
jwks_uri: StringThe JWK Set URL (jwks_uri) — where ID-token signing keys live.
userinfo_endpoint: Option<String>The UserInfo endpoint, if advertised.
end_session_endpoint: Option<String>The RP-initiated logout endpoint, if advertised.
id_token_signing_alg_values_supported: Option<Vec<String>>The id_token signing algorithms the provider supports, if advertised.
extra: Map<String, Value>Every other field the metadata document carried.
Implementations§
Source§impl ProviderMetadata
impl ProviderMetadata
Sourcepub async fn discover(
issuer_url: &str,
http: &HttpClient,
) -> Result<ProviderMetadata, DiscoveryError>
pub async fn discover( issuer_url: &str, http: &HttpClient, ) -> Result<ProviderMetadata, DiscoveryError>
Fetch and validate provider metadata for issuer_url.
Requests {issuer_url}/.well-known/openid-configuration over http and
enforces the Discovery §4.3 issuer-match check: the issuer in the
returned document must equal the requested issuer (a trailing slash on
either side is ignored).
Trait Implementations§
Source§impl Clone for ProviderMetadata
impl Clone for ProviderMetadata
Source§fn clone(&self) -> ProviderMetadata
fn clone(&self) -> ProviderMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more