Struct ProviderMetadata

Source
pub struct ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>{ /* private fields */ }
Expand description

Provider metadata returned by OpenID Connect Discovery.

Implementations§

Source§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>

Source

pub fn new( issuer: IssuerUrl, authorization_endpoint: AuthUrl, jwks_uri: JsonWebKeySetUrl, response_types_supported: Vec<ResponseTypes<RT>>, subject_types_supported: Vec<S>, id_token_signing_alg_values_supported: Vec<K::SigningAlgorithm>, additional_metadata: A, ) -> Self

Instantiates new provider metadata.

Source

pub fn issuer(&self) -> &IssuerUrl

Returns the issuer provider metadata value.

Source

pub fn set_issuer(self, issuer: IssuerUrl) -> Self

Sets the issuer provider metadata value.

Source

pub fn authorization_endpoint(&self) -> &AuthUrl

Returns the authorization_endpoint provider metadata value.

Source

pub fn set_authorization_endpoint(self, authorization_endpoint: AuthUrl) -> Self

Sets the authorization_endpoint provider metadata value.

Source

pub fn token_endpoint(&self) -> Option<&TokenUrl>

Returns the token_endpoint provider metadata value.

Source

pub fn set_token_endpoint(self, token_endpoint: Option<TokenUrl>) -> Self

Sets the token_endpoint provider metadata value.

Source

pub fn userinfo_endpoint(&self) -> Option<&UserInfoUrl>

Returns the userinfo_endpoint provider metadata value.

Source

pub fn set_userinfo_endpoint( self, userinfo_endpoint: Option<UserInfoUrl>, ) -> Self

Sets the userinfo_endpoint provider metadata value.

Source

pub fn jwks_uri(&self) -> &JsonWebKeySetUrl

Returns the jwks_uri provider metadata value.

Source

pub fn set_jwks_uri(self, jwks_uri: JsonWebKeySetUrl) -> Self

Sets the jwks_uri provider metadata value.

Source

pub fn jwks(&self) -> &JsonWebKeySet<K>

Returns the jwks provider metadata value.

Source

pub fn set_jwks(self, jwks: JsonWebKeySet<K>) -> Self

Sets the jwks provider metadata value.

Source

pub fn registration_endpoint(&self) -> Option<&RegistrationUrl>

Returns the registration_endpoint provider metadata value.

Source

pub fn set_registration_endpoint( self, registration_endpoint: Option<RegistrationUrl>, ) -> Self

Sets the registration_endpoint provider metadata value.

Source

pub fn scopes_supported(&self) -> Option<&Vec<Scope>>

Returns the scopes_supported provider metadata value.

Source

pub fn set_scopes_supported(self, scopes_supported: Option<Vec<Scope>>) -> Self

Sets the scopes_supported provider metadata value.

Source

pub fn response_types_supported(&self) -> &Vec<ResponseTypes<RT>>

Returns the response_types_supported provider metadata value.

Source

pub fn set_response_types_supported( self, response_types_supported: Vec<ResponseTypes<RT>>, ) -> Self

Sets the response_types_supported provider metadata value.

Source

pub fn response_modes_supported(&self) -> Option<&Vec<RM>>

Returns the response_modes_supported provider metadata value.

Source

pub fn set_response_modes_supported( self, response_modes_supported: Option<Vec<RM>>, ) -> Self

Sets the response_modes_supported provider metadata value.

Source

pub fn grant_types_supported(&self) -> Option<&Vec<G>>

Returns the grant_types_supported provider metadata value.

Source

pub fn set_grant_types_supported( self, grant_types_supported: Option<Vec<G>>, ) -> Self

Sets the grant_types_supported provider metadata value.

Source

pub fn acr_values_supported(&self) -> Option<&Vec<AuthenticationContextClass>>

Returns the acr_values_supported provider metadata value.

Source

pub fn set_acr_values_supported( self, acr_values_supported: Option<Vec<AuthenticationContextClass>>, ) -> Self

Sets the acr_values_supported provider metadata value.

Source

pub fn subject_types_supported(&self) -> &Vec<S>

Returns the subject_types_supported provider metadata value.

Source

pub fn set_subject_types_supported( self, subject_types_supported: Vec<S>, ) -> Self

Sets the subject_types_supported provider metadata value.

Source

pub fn id_token_signing_alg_values_supported(&self) -> &Vec<K::SigningAlgorithm>

Returns the id_token_signing_alg_values_supported provider metadata value.

Source

pub fn set_id_token_signing_alg_values_supported( self, id_token_signing_alg_values_supported: Vec<K::SigningAlgorithm>, ) -> Self

Sets the id_token_signing_alg_values_supported provider metadata value.

Source

pub fn id_token_encryption_alg_values_supported(&self) -> Option<&Vec<JK>>

Returns the id_token_encryption_alg_values_supported provider metadata value.

Source

pub fn set_id_token_encryption_alg_values_supported( self, id_token_encryption_alg_values_supported: Option<Vec<JK>>, ) -> Self

Sets the id_token_encryption_alg_values_supported provider metadata value.

Source

pub fn id_token_encryption_enc_values_supported(&self) -> Option<&Vec<JE>>

Returns the id_token_encryption_enc_values_supported provider metadata value.

Source

pub fn set_id_token_encryption_enc_values_supported( self, id_token_encryption_enc_values_supported: Option<Vec<JE>>, ) -> Self

Sets the id_token_encryption_enc_values_supported provider metadata value.

Source

pub fn userinfo_signing_alg_values_supported( &self, ) -> Option<&Vec<K::SigningAlgorithm>>

Returns the userinfo_signing_alg_values_supported provider metadata value.

Source

pub fn set_userinfo_signing_alg_values_supported( self, userinfo_signing_alg_values_supported: Option<Vec<K::SigningAlgorithm>>, ) -> Self

Sets the userinfo_signing_alg_values_supported provider metadata value.

Source

pub fn userinfo_encryption_alg_values_supported(&self) -> Option<&Vec<JK>>

Returns the userinfo_encryption_alg_values_supported provider metadata value.

Source

pub fn set_userinfo_encryption_alg_values_supported( self, userinfo_encryption_alg_values_supported: Option<Vec<JK>>, ) -> Self

Sets the userinfo_encryption_alg_values_supported provider metadata value.

Source

pub fn userinfo_encryption_enc_values_supported(&self) -> Option<&Vec<JE>>

Returns the userinfo_encryption_enc_values_supported provider metadata value.

Source

pub fn set_userinfo_encryption_enc_values_supported( self, userinfo_encryption_enc_values_supported: Option<Vec<JE>>, ) -> Self

Sets the userinfo_encryption_enc_values_supported provider metadata value.

Source

pub fn request_object_signing_alg_values_supported( &self, ) -> Option<&Vec<K::SigningAlgorithm>>

Returns the request_object_signing_alg_values_supported provider metadata value.

Source

pub fn set_request_object_signing_alg_values_supported( self, request_object_signing_alg_values_supported: Option<Vec<K::SigningAlgorithm>>, ) -> Self

Sets the request_object_signing_alg_values_supported provider metadata value.

Source

pub fn request_object_encryption_alg_values_supported(&self) -> Option<&Vec<JK>>

Returns the request_object_encryption_alg_values_supported provider metadata value.

Source

pub fn set_request_object_encryption_alg_values_supported( self, request_object_encryption_alg_values_supported: Option<Vec<JK>>, ) -> Self

Sets the request_object_encryption_alg_values_supported provider metadata value.

Source

pub fn request_object_encryption_enc_values_supported(&self) -> Option<&Vec<JE>>

Returns the request_object_encryption_enc_values_supported provider metadata value.

Source

pub fn set_request_object_encryption_enc_values_supported( self, request_object_encryption_enc_values_supported: Option<Vec<JE>>, ) -> Self

Sets the request_object_encryption_enc_values_supported provider metadata value.

Source

pub fn token_endpoint_auth_methods_supported(&self) -> Option<&Vec<CA>>

Returns the token_endpoint_auth_methods_supported provider metadata value.

Source

pub fn set_token_endpoint_auth_methods_supported( self, token_endpoint_auth_methods_supported: Option<Vec<CA>>, ) -> Self

Sets the token_endpoint_auth_methods_supported provider metadata value.

Source

pub fn token_endpoint_auth_signing_alg_values_supported( &self, ) -> Option<&Vec<K::SigningAlgorithm>>

Returns the token_endpoint_auth_signing_alg_values_supported provider metadata value.

Source

pub fn set_token_endpoint_auth_signing_alg_values_supported( self, token_endpoint_auth_signing_alg_values_supported: Option<Vec<K::SigningAlgorithm>>, ) -> Self

Sets the token_endpoint_auth_signing_alg_values_supported provider metadata value.

Source

pub fn display_values_supported(&self) -> Option<&Vec<AD>>

Returns the display_values_supported provider metadata value.

Source

pub fn set_display_values_supported( self, display_values_supported: Option<Vec<AD>>, ) -> Self

Sets the display_values_supported provider metadata value.

Source

pub fn claim_types_supported(&self) -> Option<&Vec<CT>>

Returns the claim_types_supported provider metadata value.

Source

pub fn set_claim_types_supported( self, claim_types_supported: Option<Vec<CT>>, ) -> Self

Sets the claim_types_supported provider metadata value.

Source

pub fn claims_supported(&self) -> Option<&Vec<CN>>

Returns the claims_supported provider metadata value.

Source

pub fn set_claims_supported(self, claims_supported: Option<Vec<CN>>) -> Self

Sets the claims_supported provider metadata value.

Source

pub fn service_documentation(&self) -> Option<&ServiceDocUrl>

Returns the service_documentation provider metadata value.

Source

pub fn set_service_documentation( self, service_documentation: Option<ServiceDocUrl>, ) -> Self

Sets the service_documentation provider metadata value.

Source

pub fn claims_locales_supported(&self) -> Option<&Vec<LanguageTag>>

Returns the claims_locales_supported provider metadata value.

Source

pub fn set_claims_locales_supported( self, claims_locales_supported: Option<Vec<LanguageTag>>, ) -> Self

Sets the claims_locales_supported provider metadata value.

Source

pub fn ui_locales_supported(&self) -> Option<&Vec<LanguageTag>>

Returns the ui_locales_supported provider metadata value.

Source

pub fn set_ui_locales_supported( self, ui_locales_supported: Option<Vec<LanguageTag>>, ) -> Self

Sets the ui_locales_supported provider metadata value.

Source

pub fn claims_parameter_supported(&self) -> Option<bool>

Returns the claims_parameter_supported provider metadata value.

Source

pub fn set_claims_parameter_supported( self, claims_parameter_supported: Option<bool>, ) -> Self

Sets the claims_parameter_supported provider metadata value.

Source

pub fn request_parameter_supported(&self) -> Option<bool>

Returns the request_parameter_supported provider metadata value.

Source

pub fn set_request_parameter_supported( self, request_parameter_supported: Option<bool>, ) -> Self

Sets the request_parameter_supported provider metadata value.

Source

pub fn request_uri_parameter_supported(&self) -> Option<bool>

Returns the request_uri_parameter_supported provider metadata value.

Source

pub fn set_request_uri_parameter_supported( self, request_uri_parameter_supported: Option<bool>, ) -> Self

Sets the request_uri_parameter_supported provider metadata value.

Source

pub fn require_request_uri_registration(&self) -> Option<bool>

Returns the require_request_uri_registration provider metadata value.

Source

pub fn set_require_request_uri_registration( self, require_request_uri_registration: Option<bool>, ) -> Self

Sets the require_request_uri_registration provider metadata value.

Source

pub fn op_policy_uri(&self) -> Option<&OpPolicyUrl>

Returns the op_policy_uri provider metadata value.

Source

pub fn set_op_policy_uri(self, op_policy_uri: Option<OpPolicyUrl>) -> Self

Sets the op_policy_uri provider metadata value.

Source

pub fn op_tos_uri(&self) -> Option<&OpTosUrl>

Returns the op_tos_uri provider metadata value.

Source

pub fn set_op_tos_uri(self, op_tos_uri: Option<OpTosUrl>) -> Self

Sets the op_tos_uri provider metadata value.

Source

pub fn discover<C>( issuer_url: &IssuerUrl, http_client: &C, ) -> Result<Self, DiscoveryError<<C as SyncHttpClient>::Error>>
where C: SyncHttpClient,

Fetches the OpenID Connect Discovery document and associated JSON Web Key Set from the OpenID Connect Provider.

Source

pub fn discover_async<'c, C>( issuer_url: IssuerUrl, http_client: &'c C, ) -> impl Future<Output = Result<Self, DiscoveryError<<C as AsyncHttpClient<'c>>::Error>>> + 'c
where Self: 'c, C: AsyncHttpClient<'c>,

Asynchronously fetches the OpenID Connect Discovery document and associated JSON Web Key Set from the OpenID Connect Provider.

Source

pub fn additional_metadata(&self) -> &A

Returns additional provider metadata fields.

Source

pub fn additional_metadata_mut(&mut self) -> &mut A

Returns mutable additional provider metadata fields.

Trait Implementations§

Source§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> Clone for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>

Source§

fn clone(&self) -> ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> Debug for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> Deserialize<'de> for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> PartialEq for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>

Source§

fn eq( &self, other: &ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>, ) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> Serialize for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> Eq for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>

Source§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> StructuralPartialEq for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>

Auto Trait Implementations§

§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> Freeze for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>
where A: Freeze,

§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> RefUnwindSafe for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>

§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> Send for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>
where A: Send, S: Send, <K as JsonWebKey>::SigningAlgorithm: Send, K: Send, RM: Send, G: Send, JK: Send, JE: Send, CA: Send, AD: Send, CT: Send, CN: Send, RT: Send,

§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> Sync for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>
where A: Sync, S: Sync, <K as JsonWebKey>::SigningAlgorithm: Sync, K: Sync, RM: Sync, G: Sync, JK: Sync, JE: Sync, CA: Sync, AD: Sync, CT: Sync, CN: Sync, RT: Sync,

§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> Unpin for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>
where A: Unpin, S: Unpin, <K as JsonWebKey>::SigningAlgorithm: Unpin, K: Unpin, RM: Unpin, G: Unpin, JK: Unpin, JE: Unpin, CA: Unpin, AD: Unpin, CT: Unpin, CN: Unpin, RT: Unpin,

§

impl<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S> UnwindSafe for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, K, RM, RT, S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,