pub struct ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, JS, JT, JU, 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, JS, JT, JU, K, RM, RT, S> ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, JS, JT, JU, 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<JS>, 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<JS, JT, JU, K>

Returns the jwks provider metadata value.

source

pub fn set_jwks(self, jwks: JsonWebKeySet<JS, JT, JU, 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<JS>

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<JS> ) -> 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<JS>>

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<JS>> ) -> 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<JS>>

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<JS>> ) -> 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<JS>>

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<JS>> ) -> 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<HC, RE>( issuer_url: &IssuerUrl, http_client: HC ) -> Result<Self, DiscoveryError<RE>>
where HC: Fn(HttpRequest) -> Result<HttpResponse, RE>, RE: Error + 'static,

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

source

pub async fn discover_async<F, HC, RE>( issuer_url: IssuerUrl, http_client: HC ) -> Result<Self, DiscoveryError<RE>>
where F: Future<Output = Result<HttpResponse, RE>>, HC: Fn(HttpRequest) -> F, RE: Error + 'static,

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, JS, JT, JU, K, RM, RT, S> Clone for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, JS, JT, JU, K, RM, RT, S>

source§

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

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<A, AD, CA, CN, CT, G, JE, JK, JS, JT, JU, K, RM, RT, S> Debug for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, JS, JT, JU, 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, JS, JT, JU, K, RM, RT, S> Deserialize<'de> for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, JS, JT, JU, 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, JS, JT, JU, K, RM, RT, S> PartialEq for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, JS, JT, JU, K, RM, RT, S>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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, JS, JT, JU, K, RM, RT, S> Serialize for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, JS, JT, JU, 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, JS, JT, JU, K, RM, RT, S> Eq for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, JS, JT, JU, K, RM, RT, S>

source§

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

impl<A, AD, CA, CN, CT, G, JE, JK, JS, JT, JU, K, RM, RT, S> UnwindSafe for ProviderMetadata<A, AD, CA, CN, CT, G, JE, JK, JS, JT, JU, 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> DynClone for T
where T: Clone,

source§

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

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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>,

§

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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

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>,