pub struct LoginLimits {
pub per_address: NonZeroU32,
pub per_name: NonZeroU32,
pub address_header: Option<HeaderName>,
pub name_bytes: usize,
pub forget_every: u32,
pub address_window: Duration,
pub name_window: Duration,
pub pending_seconds: Duration,
pub pending_tries: u32,
pub enrol_fresh_seconds: Duration,
pub max_pins: usize,
}Expand description
How many password or key tries the login route allows, and where it finds the address a try came from. Every field has a default that is safe for a gateway on the public internet; raise a count for an office behind one address.
Fields§
§per_address: NonZeroU32Tries a minute from one address (an IPv6 address counts as its /64 network). Default 5.
per_name: NonZeroU32Tries in ten minutes for one account name, from anywhere. Default 10.
address_header: Option<HeaderName>A header the trusted reverse proxy sets to the client’s address, such as
x-forwarded-for (the last entry is used) or x-real-ip. The gateway listens on
loopback behind that proxy, so without it every try comes from one address. Default none.
name_bytes: usizeThe longest an account name is told apart by; longer names count as one. Default 64.
forget_every: u32Every this many checks, the counts of addresses and names gone quiet are dropped, at least 1. Default 256.
address_window: DurationHow long a try from one address is counted. Default one minute.
name_window: DurationHow long a try for one account name is counted. Default ten minutes.
pending_seconds: DurationHow long a sign-in that has passed its first step waits for the next. Default five minutes.
pending_tries: u32Tries at the next step one waiting sign-in allows before it ends. Default 5.
enrol_fresh_seconds: DurationHow old a sign-in may be and still replace its person’s second factor without a code from it. Default five minutes.
max_pins: usizeThe most certificate pins one account may hold, and the most certificate-field entries. Default 4.
Trait Implementations§
Source§impl Clone for LoginLimits
impl Clone for LoginLimits
Source§impl Debug for LoginLimits
impl Debug for LoginLimits
Source§impl Default for LoginLimits
impl Default for LoginLimits
impl Eq for LoginLimits
Source§impl PartialEq for LoginLimits
impl PartialEq for LoginLimits
impl StructuralPartialEq for LoginLimits
Auto Trait Implementations§
impl !Freeze for LoginLimits
impl RefUnwindSafe for LoginLimits
impl Send for LoginLimits
impl Sync for LoginLimits
impl Unpin for LoginLimits
impl UnsafeUnpin for LoginLimits
impl UnwindSafe for LoginLimits
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.