pub struct OidcClientRawConfig<PC>where
PC: PendingOauthStoreConfig,{
pub client_id: Option<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: Option<String>,
pub pending_store: Option<PC>,
pub device_poll_interval: Duration,
}Expand description
Raw (pre-resolution) OIDC client configuration that allows optional fields
to be filled from an [oidc] shared-defaults block.
Unlike OidcClientConfig, client_id here is optional so that it can
be omitted from [oidc_client] and inherited from [oidc] instead.
Call OidcClientRawConfig::apply_shared_defaults to resolve into a
validated OidcClientConfig.
§Resolution order: local > [oidc] shared > hardcoded default
Supported shared fields (from [oidc]):
well_known_url,issuer_url,jwks_uri— true presence-awareclient_id,client_secret— presence-aware optional credentials
Shareable from [oidc]:
required_scopes— presence-aware (local non-empty wins; else shared)
Not shared (must stay in [oidc_client]):
scopes,redirect_url,pkce_enabled,claims_check_script
Fields§
§client_id: Option<String>Local client_id. If absent, falls back to [oidc].client_id.
client_secret: Option<String>Local client_secret. If absent, falls back to [oidc].client_secret.
remote: OAuthProviderRemoteConfigLocal provider connectivity. URL fields fall back to [oidc] if absent.
provider_oidc: OAuthProviderOidcConfigOIDC-specific overrides (never shared).
scopes: Vec<String>§required_scopes: Vec<String>Scopes that MUST be present in the token endpoint response.
Falls back to [oidc].required_scopes when local is empty.
claims_check_script: Option<String>§pkce_enabled: bool§redirect_url: Option<String>Explicit redirect URL. When None (the default), each auth context
uses its own hardcoded callback path at resolution time. In the
combined apps/webui + apps/server deployment this field has no
effect and will produce a startup warning if set.
pending_store: Option<PC>§device_poll_interval: DurationImplementations§
Source§impl<PC> OidcClientRawConfig<PC>where
PC: PendingOauthStoreConfig,
impl<PC> OidcClientRawConfig<PC>where
PC: PendingOauthStoreConfig,
Apply shared defaults from an [oidc] block and produce the final
OidcClientConfig. Returns an error if client_id cannot be
resolved (neither local nor shared has a value).
Sourcepub fn resolve_config(
self,
shared: &OidcSharedConfig,
) -> Result<OidcClientConfig<PC>, OidcError>
pub fn resolve_config( self, shared: &OidcSharedConfig, ) -> Result<OidcClientConfig<PC>, OidcError>
Recommended entry point. Resolve shared defaults and validate in one step.
Equivalent to self.apply_shared_defaults(shared)?.validate() but
returns the validated config directly, eliminating manual glue.
[oidc] ──┐
├──▸ resolve_config() ──▸ validated OidcClientConfig
[oidc_client] ──┘Trait Implementations§
Source§impl<PC> Clone for OidcClientRawConfig<PC>where
PC: Clone + PendingOauthStoreConfig,
impl<PC> Clone for OidcClientRawConfig<PC>where
PC: Clone + PendingOauthStoreConfig,
Source§fn clone(&self) -> OidcClientRawConfig<PC>
fn clone(&self) -> OidcClientRawConfig<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 OidcClientRawConfig<PC>where
PC: Debug + PendingOauthStoreConfig,
impl<PC> Debug for OidcClientRawConfig<PC>where
PC: Debug + PendingOauthStoreConfig,
Source§impl<PC> Default for OidcClientRawConfig<PC>where
PC: PendingOauthStoreConfig,
impl<PC> Default for OidcClientRawConfig<PC>where
PC: PendingOauthStoreConfig,
Source§fn default() -> OidcClientRawConfig<PC>
fn default() -> OidcClientRawConfig<PC>
Source§impl<'de, PC> Deserialize<'de> for OidcClientRawConfig<PC>where
PC: PendingOauthStoreConfig + Default,
impl<'de, PC> Deserialize<'de> for OidcClientRawConfig<PC>where
PC: PendingOauthStoreConfig + Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OidcClientRawConfig<PC>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OidcClientRawConfig<PC>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§fn from(value: &OidcClientRawConfig<PC>) -> Self
fn from(value: &OidcClientRawConfig<PC>) -> Self
Source§fn from(value: &OidcClientRawConfig<PC>) -> Self
fn from(value: &OidcClientRawConfig<PC>) -> Self
Auto Trait Implementations§
impl<PC> Freeze for OidcClientRawConfig<PC>where
PC: Freeze,
impl<PC> RefUnwindSafe for OidcClientRawConfig<PC>where
PC: RefUnwindSafe,
impl<PC> Send for OidcClientRawConfig<PC>
impl<PC> Sync for OidcClientRawConfig<PC>
impl<PC> Unpin for OidcClientRawConfig<PC>where
PC: Unpin,
impl<PC> UnsafeUnpin for OidcClientRawConfig<PC>where
PC: UnsafeUnpin,
impl<PC> UnwindSafe for OidcClientRawConfig<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