pub struct AuthContextConfig {Show 17 fields
    pub token_lifetime: Duration,
    pub refresh_token_lifetime: Duration,
    pub require_auth_by_default: bool,
    pub default_permissions: Vec<String>,
    pub jwt_secret: String,
    pub api_key_prefix: String,
    pub enable_mfa: bool,
    pub enable_oauth2_server: bool,
    pub enable_oidc: bool,
    pub enable_audit_logging: bool,
    pub enable_rate_limiting: bool,
    pub rate_limit_rpm: u32,
    pub enable_secure_sessions: bool,
    pub enable_device_fingerprinting: bool,
    pub oauth2_providers: Vec<String>,
    pub rsa_private_key: Option<String>,
    pub rsa_public_key: Option<String>,
}Expand description
Configuration for the authentication context
Fields§
§token_lifetime: DurationDefault token lifetime
refresh_token_lifetime: DurationRefresh token lifetime
require_auth_by_default: boolWhether to require authentication for all routes by default
default_permissions: Vec<String>Default permissions required for authenticated routes
jwt_secret: StringJWT secret key
api_key_prefix: StringAPI key prefix
enable_mfa: boolWhether to enable multi-factor authentication
enable_oauth2_server: boolEnable OAuth2 server capabilities
enable_oidc: boolEnable OIDC provider functionality
enable_audit_logging: boolEnable audit logging
enable_rate_limiting: boolEnable rate limiting
rate_limit_rpm: u32Rate limit requests per minute
enable_secure_sessions: boolEnable session security features
enable_device_fingerprinting: boolEnable device fingerprinting
oauth2_providers: Vec<String>Supported OAuth2 providers
rsa_private_key: Option<String>RSA private key for JWT signing (PEM format)
rsa_public_key: Option<String>RSA public key for JWT verification (PEM format)
Trait Implementations§
Source§impl Clone for AuthContextConfig
 
impl Clone for AuthContextConfig
Source§fn clone(&self) -> AuthContextConfig
 
fn clone(&self) -> AuthContextConfig
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 AuthContextConfig
 
impl Debug for AuthContextConfig
Auto Trait Implementations§
impl Freeze for AuthContextConfig
impl RefUnwindSafe for AuthContextConfig
impl Send for AuthContextConfig
impl Sync for AuthContextConfig
impl Unpin for AuthContextConfig
impl UnwindSafe for AuthContextConfig
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