pub struct AuthConfig {
pub issuer_to_provider: Option<HashMap<String, AuthProvider>>,
}Expand description
Configuration for authentication providers
Fields§
§issuer_to_provider: Option<HashMap<String, AuthProvider>>Optional: Issuer-to-provider mapping for routing based on JWT issuer (iss) claim Maps issuer strings (e.g., “https://clerk.example.com”, “https://login.microsoftonline.com”) to provider types
Implementations§
Source§impl AuthConfig
impl AuthConfig
Sourcepub fn with_issuer_mapping(
self,
issuer: impl Into<String>,
provider: AuthProviderType,
) -> Self
pub fn with_issuer_mapping( self, issuer: impl Into<String>, provider: AuthProviderType, ) -> Self
Add an issuer-to-provider mapping Use this to map JWT issuer (iss) claims to specific providers
Sourcepub fn get_provider_for_issuer(&self, issuer: &str) -> Option<AuthProviderType>
pub fn get_provider_for_issuer(&self, issuer: &str) -> Option<AuthProviderType>
Get provider for a given issuer
Trait Implementations§
Source§impl Clone for AuthConfig
impl Clone for AuthConfig
Source§fn clone(&self) -> AuthConfig
fn clone(&self) -> AuthConfig
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 AuthConfig
impl Debug for AuthConfig
Source§impl Default for AuthConfig
impl Default for AuthConfig
Source§fn default() -> AuthConfig
fn default() -> AuthConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AuthConfig
impl RefUnwindSafe for AuthConfig
impl Send for AuthConfig
impl Sync for AuthConfig
impl Unpin for AuthConfig
impl UnwindSafe for AuthConfig
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