pub struct AuthorizationServer {
pub issuer: String,
pub authorization_endpoint: String,
pub token_endpoint: String,
pub registration_endpoint: Option<String>,
pub scopes_supported: Vec<String>,
pub code_challenge_methods_supported: Option<Vec<String>>,
pub token_endpoint_auth_methods_supported: Vec<String>,
pub client_id_metadata_document_supported: bool,
pub authorization_response_iss_parameter_supported: bool,
}Expand description
What a client reads from authorization server metadata.
Fields§
§issuer: StringThe issuer identifier, verified against the one the URL was built for.
Where the user is sent.
token_endpoint: StringWhere a code is redeemed.
registration_endpoint: Option<String>Where RFC 7591 registration is offered, if it is.
scopes_supported: Vec<String>The scopes the server lists.
code_challenge_methods_supported: Option<Vec<String>>The PKCE methods the server lists; None when the member is absent.
token_endpoint_auth_methods_supported: Vec<String>The token endpoint authentication methods the server lists.
client_id_metadata_document_supported: boolWhether a URL-shaped client_id (a metadata document) is accepted.
Whether the server includes iss in authorization responses.
Implementations§
Source§impl AuthorizationServer
impl AuthorizationServer
Sourcepub fn parse(body: &[u8], expected_issuer: &str) -> Result<Self, MetadataError>
pub fn parse(body: &[u8], expected_issuer: &str) -> Result<Self, MetadataError>
Parses a metadata document fetched for expected_issuer.
§Errors
MetadataError::IssuerMismatch when the document claims a different
issuer — compared by simple string equality, as RFC 8414 §3.3 asks —
and MetadataError::Missing when an endpoint the flow needs is absent.