pub struct OidcConfigBuilder { /* private fields */ }Expand description
A builder for OidcConfig.
Obtain via OidcConfig::builder(). All fields start with sensible
defaults; override only what you need.
Implementations§
Source§impl OidcConfigBuilder
impl OidcConfigBuilder
Sourcepub fn oauth2_config(self, config: OAuth2Config) -> Self
pub fn oauth2_config(self, config: OAuth2Config) -> Self
Sourcepub fn userinfo_endpoint(self, uri: impl Into<String>) -> Self
pub fn userinfo_endpoint(self, uri: impl Into<String>) -> Self
Sourcepub fn response_types_supported(self, types: Vec<String>) -> Self
pub fn response_types_supported(self, types: Vec<String>) -> Self
Sourcepub fn subject_types_supported(self, types: Vec<SubjectType>) -> Self
pub fn subject_types_supported(self, types: Vec<SubjectType>) -> Self
Sourcepub fn id_token_signing_alg_values_supported(self, algs: Vec<Algorithm>) -> Self
pub fn id_token_signing_alg_values_supported(self, algs: Vec<Algorithm>) -> Self
Sourcepub fn scopes_supported(self, scopes: Vec<String>) -> Self
pub fn scopes_supported(self, scopes: Vec<String>) -> Self
Sourcepub fn claims_supported(self, claims: Vec<String>) -> Self
pub fn claims_supported(self, claims: Vec<String>) -> Self
Sourcepub fn claims_parameter_supported(self, supported: bool) -> Self
pub fn claims_parameter_supported(self, supported: bool) -> Self
Sourcepub fn request_parameter_supported(self, supported: bool) -> Self
pub fn request_parameter_supported(self, supported: bool) -> Self
Sourcepub fn request_uri_parameter_supported(self, supported: bool) -> Self
pub fn request_uri_parameter_supported(self, supported: bool) -> Self
Sourcepub fn id_token_expiry(self, expiry: Duration) -> Self
pub fn id_token_expiry(self, expiry: Duration) -> Self
Sourcepub fn max_age_supported(self, max_age: Duration) -> Self
pub fn max_age_supported(self, max_age: Duration) -> Self
Sourcepub fn build(self) -> OidcConfig
pub fn build(self) -> OidcConfig
Build the OidcConfig.
§Example
ⓘ
let config = OidcConfigBuilder::default()
.issuer("https://auth.example.com")
.scopes_supported(vec!["openid".into(), "profile".into()])
.id_token_expiry(Duration::from_secs(3600))
.build();Trait Implementations§
Source§impl Clone for OidcConfigBuilder
impl Clone for OidcConfigBuilder
Source§fn clone(&self) -> OidcConfigBuilder
fn clone(&self) -> OidcConfigBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OidcConfigBuilder
impl Debug for OidcConfigBuilder
Auto Trait Implementations§
impl Freeze for OidcConfigBuilder
impl RefUnwindSafe for OidcConfigBuilder
impl Send for OidcConfigBuilder
impl Sync for OidcConfigBuilder
impl Unpin for OidcConfigBuilder
impl UnsafeUnpin for OidcConfigBuilder
impl UnwindSafe for OidcConfigBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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