pub struct RateLimitingSettings {
pub enabled: bool,
pub auth_start_max_requests: u32,
pub auth_start_window_secs: u64,
pub auth_callback_max_requests: u32,
pub auth_callback_window_secs: u64,
pub auth_refresh_max_requests: u32,
pub auth_refresh_window_secs: u64,
pub auth_logout_max_requests: u32,
pub auth_logout_window_secs: u64,
pub failed_login_max_requests: u32,
pub failed_login_window_secs: u64,
}Expand description
Rate-limiting thresholds for each authentication endpoint.
Fields§
§enabled: boolWhether rate limiting is active across all auth endpoints.
auth_start_max_requests: u32Maximum requests to /auth/start per IP per window.
auth_start_window_secs: u64Window duration (in seconds) for the /auth/start rate limit.
auth_callback_max_requests: u32Maximum requests to /auth/callback per IP per window.
auth_callback_window_secs: u64Window duration (in seconds) for the /auth/callback rate limit.
auth_refresh_max_requests: u32Maximum token refresh requests per user per window.
auth_refresh_window_secs: u64Window duration (in seconds) for the /auth/refresh rate limit.
auth_logout_max_requests: u32Maximum logout requests per user per window.
auth_logout_window_secs: u64Window duration (in seconds) for the /auth/logout rate limit.
failed_login_max_requests: u32Maximum failed login attempts per user per window (brute-force protection).
failed_login_window_secs: u64Window duration (in seconds) for the failed login rate limit (typically 1 hour).
Trait Implementations§
Source§impl Clone for RateLimitingSettings
impl Clone for RateLimitingSettings
Source§fn clone(&self) -> RateLimitingSettings
fn clone(&self) -> RateLimitingSettings
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 moreAuto Trait Implementations§
impl Freeze for RateLimitingSettings
impl RefUnwindSafe for RateLimitingSettings
impl Send for RateLimitingSettings
impl Sync for RateLimitingSettings
impl Unpin for RateLimitingSettings
impl UnsafeUnpin for RateLimitingSettings
impl UnwindSafe for RateLimitingSettings
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
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