pub struct VerifiedProviderMetadata { /* private fields */ }
Expand description
The verified authorization server metadata.
All the fields required by the OpenID Connect Discovery Spec 1.0 or with a default value are accessible via methods.
To access other fields, use this type’s Deref
implementation.
§Example
use oauth2_types::{
oidc::VerifiedProviderMetadata,
requests::GrantType,
};
use url::Url;
let verified_metadata = metadata.validate(&issuer)?;
// The endpoint is required during validation so this is not an `Option`.
let _: &Url = verified_metadata.authorization_endpoint();
// The field has a default value so this is not an `Option`.
let _: &[GrantType] = verified_metadata.grant_types_supported();
// Other fields can be accessed via `Deref`.
if let Some(registration_endpoint) = &verified_metadata.registration_endpoint {
println!("Registration is supported at {registration_endpoint}");
}
Implementations§
Source§impl VerifiedProviderMetadata
impl VerifiedProviderMetadata
URL of the authorization server’s authorization endpoint.
Sourcepub fn token_endpoint(&self) -> &Url
pub fn token_endpoint(&self) -> &Url
URL of the authorization server’s token endpoint.
Sourcepub fn response_types_supported(&self) -> &[ResponseType]
pub fn response_types_supported(&self) -> &[ResponseType]
JSON array containing a list of the OAuth 2.0 response_type
values
that this authorization server supports.
Sourcepub fn subject_types_supported(&self) -> &[SubjectType]
pub fn subject_types_supported(&self) -> &[SubjectType]
JSON array containing a list of the Subject Identifier types that this OP supports.
Sourcepub fn id_token_signing_alg_values_supported(&self) -> &[JsonWebSignatureAlg]
pub fn id_token_signing_alg_values_supported(&self) -> &[JsonWebSignatureAlg]
JSON array containing a list of the JWS alg
values supported by the OP
for the ID Token.
Methods from Deref<Target = ProviderMetadata>§
Sourcepub fn response_modes_supported(&self) -> &[ResponseMode]
pub fn response_modes_supported(&self) -> &[ResponseMode]
JSON array containing a list of the OAuth 2.0 response_mode
values
that this authorization server supports.
Defaults to DEFAULT_RESPONSE_MODES_SUPPORTED
.
Sourcepub fn grant_types_supported(&self) -> &[GrantType]
pub fn grant_types_supported(&self) -> &[GrantType]
JSON array containing a list of the OAuth 2.0 grant type values that this authorization server supports.
Defaults to DEFAULT_GRANT_TYPES_SUPPORTED
.
Sourcepub fn token_endpoint_auth_methods_supported(
&self,
) -> &[OAuthClientAuthenticationMethod]
pub fn token_endpoint_auth_methods_supported( &self, ) -> &[OAuthClientAuthenticationMethod]
JSON array containing a list of client authentication methods supported by the token endpoint.
Defaults to DEFAULT_AUTH_METHODS_SUPPORTED
.
Sourcepub fn revocation_endpoint_auth_methods_supported(
&self,
) -> &[OAuthClientAuthenticationMethod]
pub fn revocation_endpoint_auth_methods_supported( &self, ) -> &[OAuthClientAuthenticationMethod]
JSON array containing a list of client authentication methods supported by the revocation endpoint.
Defaults to DEFAULT_AUTH_METHODS_SUPPORTED
.
Sourcepub fn claim_types_supported(&self) -> &[ClaimType]
pub fn claim_types_supported(&self) -> &[ClaimType]
JSON array containing a list of the Claim Types that the OpenID Provider supports.
Defaults to DEFAULT_CLAIM_TYPES_SUPPORTED
.
Sourcepub fn claims_parameter_supported(&self) -> bool
pub fn claims_parameter_supported(&self) -> bool
Boolean value specifying whether the OP supports use of the claims
parameter.
Defaults to false
.
Sourcepub fn request_parameter_supported(&self) -> bool
pub fn request_parameter_supported(&self) -> bool
Boolean value specifying whether the OP supports use of the request
parameter.
Defaults to false
.
Sourcepub fn request_uri_parameter_supported(&self) -> bool
pub fn request_uri_parameter_supported(&self) -> bool
Boolean value specifying whether the OP supports use of the
request_uri
parameter.
Defaults to true
.
Sourcepub fn require_request_uri_registration(&self) -> bool
pub fn require_request_uri_registration(&self) -> bool
Boolean value specifying whether the OP requires any request_uri
values used to be pre-registered.
Defaults to false
.
Sourcepub fn require_signed_request_object(&self) -> bool
pub fn require_signed_request_object(&self) -> bool
Indicates where authorization request needs to be protected as Request
Object and provided through either request
or request_uri
parameter.
Defaults to false
.
Indicates whether the authorization server accepts authorization requests only via PAR.
Defaults to false
.
Trait Implementations§
Source§impl Clone for VerifiedProviderMetadata
impl Clone for VerifiedProviderMetadata
Source§fn clone(&self) -> VerifiedProviderMetadata
fn clone(&self) -> VerifiedProviderMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more