pub struct GenericOidcConfig {
pub id: String,
pub display_name: String,
pub issuer: String,
pub client_id: String,
pub client_secret: Option<String>,
pub claim_mappings: ClaimMappings,
pub cache_ttl: Duration,
pub leeway_seconds: u64,
}Available on crate feature
http-client and non-WebAssembly only.Expand description
Configuration for creating a generic OIDC provider.
Fields§
§id: StringUnique identifier for this provider.
display_name: StringHuman-readable display name.
issuer: StringOIDC issuer URL.
client_id: StringClient ID.
client_secret: Option<String>Client secret (for confidential clients).
claim_mappings: ClaimMappingsCustom claim mappings.
cache_ttl: DurationCache TTL in seconds.
leeway_seconds: u64Clock skew leeway in seconds.
Implementations§
Source§impl GenericOidcConfig
impl GenericOidcConfig
Sourcepub fn new(
id: impl Into<String>,
display_name: impl Into<String>,
issuer: impl Into<String>,
client_id: impl Into<String>,
) -> Self
pub fn new( id: impl Into<String>, display_name: impl Into<String>, issuer: impl Into<String>, client_id: impl Into<String>, ) -> Self
Create a new configuration with required fields.
Sourcepub fn with_client_secret(self, secret: impl Into<String>) -> Self
pub fn with_client_secret(self, secret: impl Into<String>) -> Self
Set client secret (for confidential clients).
Sourcepub fn with_claim_mappings(self, mappings: ClaimMappings) -> Self
pub fn with_claim_mappings(self, mappings: ClaimMappings) -> Self
Set custom claim mappings.
Sourcepub fn auth0(domain: impl Into<String>, client_id: impl Into<String>) -> Self
pub fn auth0(domain: impl Into<String>, client_id: impl Into<String>) -> Self
Create configuration for Auth0.
Trait Implementations§
Source§impl Clone for GenericOidcConfig
impl Clone for GenericOidcConfig
Source§fn clone(&self) -> GenericOidcConfig
fn clone(&self) -> GenericOidcConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GenericOidcConfig
impl RefUnwindSafe for GenericOidcConfig
impl Send for GenericOidcConfig
impl Sync for GenericOidcConfig
impl Unpin for GenericOidcConfig
impl UnsafeUnpin for GenericOidcConfig
impl UnwindSafe for GenericOidcConfig
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
Mutably borrows from an owned value. Read more