Struct matrix_sdk::oidc::types::oidc::VerifiedProviderMetadata
pub struct VerifiedProviderMetadata { /* private fields */ }
experimental-oidc
only.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§
§impl VerifiedProviderMetadata
impl VerifiedProviderMetadata
URL of the authorization server’s authorization endpoint.
pub fn token_endpoint(&self) -> &Url
pub fn token_endpoint(&self) -> &Url
URL of the authorization server’s token endpoint.
pub 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.
pub 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.
pub 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>§
pub 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
.
pub 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
.
pub 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
.
pub 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
.
pub 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
.
pub 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
.
pub 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
.
pub 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
.
pub 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
.
pub 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§
§impl Clone for VerifiedProviderMetadata
impl Clone for VerifiedProviderMetadata
§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§impl Debug for VerifiedProviderMetadata
impl Debug for VerifiedProviderMetadata
§impl Deref for VerifiedProviderMetadata
impl Deref for VerifiedProviderMetadata
§type Target = ProviderMetadata
type Target = ProviderMetadata
§fn deref(&self) -> &<VerifiedProviderMetadata as Deref>::Target
fn deref(&self) -> &<VerifiedProviderMetadata as Deref>::Target
Auto Trait Implementations§
impl RefUnwindSafe for VerifiedProviderMetadata
impl Send for VerifiedProviderMetadata
impl Sync for VerifiedProviderMetadata
impl Unpin for VerifiedProviderMetadata
impl UnwindSafe for VerifiedProviderMetadata
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§fn clone_handle(handle: Handle) -> Handle
fn clone_handle(handle: Handle) -> Handle
§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>