pub struct RuntimeConfig {Show 17 fields
pub token_lifetime_secs: u64,
pub refresh_token_lifetime_secs: u64,
pub enable_multi_factor: bool,
pub rate_limiting_enabled: bool,
pub rate_limit_max_requests: u32,
pub rate_limit_window_secs: u64,
pub rate_limit_burst: u32,
pub min_password_length: usize,
pub require_password_complexity: bool,
pub secure_cookies: bool,
pub csrf_protection: bool,
pub session_timeout_secs: u64,
pub audit_enabled: bool,
pub audit_log_success: bool,
pub audit_log_failures: bool,
pub audit_log_permissions: bool,
pub audit_log_tokens: bool,
}Expand description
Runtime-mutable configuration subset.
These fields can be updated via the admin API without restarting the server. Security-sensitive settings (JWT secret, algorithm, storage backend) are intentionally excluded and require a process restart to change.
Fields§
§token_lifetime_secs: u64Token lifetime in seconds.
refresh_token_lifetime_secs: u64Refresh token lifetime in seconds.
enable_multi_factor: boolWhether MFA is globally enabled.
rate_limiting_enabled: boolWhether rate limiting is active.
rate_limit_max_requests: u32Maximum requests per rate-limit window.
rate_limit_window_secs: u64Rate-limit window in seconds.
rate_limit_burst: u32Rate-limit burst allowance.
min_password_length: usizeMinimum accepted password length.
require_password_complexity: boolWhether password complexity requirements are enforced.
Whether the Secure flag is set on session cookies.
csrf_protection: boolWhether CSRF protection middleware is active.
session_timeout_secs: u64Session timeout in seconds.
audit_enabled: boolWhether audit logging is active.
audit_log_success: boolLog successful authentication events.
audit_log_failures: boolLog failed authentication events.
audit_log_permissions: boolLog permission-check events.
audit_log_tokens: boolLog token issuance/revocation events.
Implementations§
Source§impl RuntimeConfig
impl RuntimeConfig
Sourcepub fn from_auth_config(cfg: &AuthConfig) -> Self
pub fn from_auth_config(cfg: &AuthConfig) -> Self
Initialise from a full AuthConfig.
§Example
use auth_framework::config::{AuthConfig, RuntimeConfig};
let auth_cfg = AuthConfig::new();
let rt = RuntimeConfig::from_auth_config(&auth_cfg);
assert_eq!(rt.token_lifetime_secs, auth_cfg.token_lifetime.as_secs());Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Source§fn clone(&self) -> RuntimeConfig
fn clone(&self) -> RuntimeConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RuntimeConfig
impl Debug for RuntimeConfig
Source§impl Default for RuntimeConfig
impl Default for RuntimeConfig
Source§impl<'de> Deserialize<'de> for RuntimeConfig
impl<'de> Deserialize<'de> for RuntimeConfig
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>,
Source§impl From<RuntimeConfig> for AdminConfigView
impl From<RuntimeConfig> for AdminConfigView
Source§fn from(c: RuntimeConfig) -> Self
fn from(c: RuntimeConfig) -> Self
Auto Trait Implementations§
impl Freeze for RuntimeConfig
impl RefUnwindSafe for RuntimeConfig
impl Send for RuntimeConfig
impl Sync for RuntimeConfig
impl Unpin for RuntimeConfig
impl UnsafeUnpin for RuntimeConfig
impl UnwindSafe for RuntimeConfig
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
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