pub struct OidcClientConfig<PC>where
PC: PendingOauthStoreConfig,{
pub client_id: String,
pub client_secret: Option<String>,
pub remote: OAuthProviderRemoteConfig,
pub provider_oidc: OAuthProviderOidcConfig,
pub scopes: Vec<String>,
pub required_scopes: Vec<String>,
pub claims_check_script: Option<String>,
pub pkce_enabled: bool,
pub redirect_url: String,
pub pending_store: Option<PC>,
pub device_poll_interval: Duration,
}Expand description
Input configuration for building the OIDC client.
When well_known_url is set, discovery is fetched from it and optional
fields override. When not set, issuer_url, authorization_endpoint,
token_endpoint, and jwks_uri must be set. userinfo_endpoint is
recommended, and userinfo claims are fetched only when it is set.
Use OidcClientRawConfig::apply_shared_defaults when loading from a
config source that also provides an [oidc] shared-defaults block.
Fields§
§client_id: String§client_secret: Option<String>§remote: OAuthProviderRemoteConfigShared remote-provider connectivity settings.
provider_oidc: OAuthProviderOidcConfigOIDC-specific provider metadata overrides.
scopes: Vec<String>§required_scopes: Vec<String>Scopes that MUST be present in the token endpoint response.
When non-empty, exchange_code and handle_token_refresh will verify
that the returned scope field covers all entries. An empty list (the
default) disables the check. Can be shared from
[oidc].required_scopes.
claims_check_script: Option<String>§pkce_enabled: boolWhen true, use PKCE (code_challenge / code_verifier) for the authorization code flow.
redirect_url: String§pending_store: Option<PC>Configuration for the pending OAuth store.
device_poll_interval: DurationDefault interval to poll the device token endpoint if the provider doesn’t specify one.
Implementations§
Source§impl<PC> OidcClientConfig<PC>where
PC: PendingOauthStoreConfig,
impl<PC> OidcClientConfig<PC>where
PC: PendingOauthStoreConfig,
pub fn validate(&self) -> OidcResult<()>
pub fn provider_config(&self) -> OAuthProviderConfig
Trait Implementations§
Source§impl<PC> Clone for OidcClientConfig<PC>where
PC: PendingOauthStoreConfig + Clone,
impl<PC> Clone for OidcClientConfig<PC>where
PC: PendingOauthStoreConfig + Clone,
Source§fn clone(&self) -> OidcClientConfig<PC>
fn clone(&self) -> OidcClientConfig<PC>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<PC> Debug for OidcClientConfig<PC>where
PC: PendingOauthStoreConfig + Debug,
impl<PC> Debug for OidcClientConfig<PC>where
PC: PendingOauthStoreConfig + Debug,
Source§impl<'de, PC> Deserialize<'de> for OidcClientConfig<PC>where
PC: PendingOauthStoreConfig + Default,
impl<'de, PC> Deserialize<'de> for OidcClientConfig<PC>where
PC: PendingOauthStoreConfig + Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl<PC> Freeze for OidcClientConfig<PC>where
PC: Freeze,
impl<PC> RefUnwindSafe for OidcClientConfig<PC>where
PC: RefUnwindSafe,
impl<PC> Send for OidcClientConfig<PC>
impl<PC> Sync for OidcClientConfig<PC>
impl<PC> Unpin for OidcClientConfig<PC>where
PC: Unpin,
impl<PC> UnsafeUnpin for OidcClientConfig<PC>where
PC: UnsafeUnpin,
impl<PC> UnwindSafe for OidcClientConfig<PC>where
PC: UnwindSafe,
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
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>
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>
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