pub struct PinPolicy {
pub max_attempts: u32,
pub lockout_secs: i64,
pub min_digits: usize,
pub max_digits: usize,
pub ip_window_secs: i64,
pub ip_max_attempts: u32,
}Expand description
The manager-PIN policy: every window is configuration, not code — a probe process must be able to
shorten the lockout without sleeping a production timeout, and a production deployment must be able
to tighten it. Defaults are deliberately short (the values below are what tests and local dev run
with) so the shipped library is usable out of the box; from_env reads overrides.
Fields§
§max_attempts: u32Consecutive failures before a manager’s PIN locks.
lockout_secs: i64How long a lockout holds, in seconds.
min_digits: usizeShortest acceptable PIN length (digits).
max_digits: usizeLongest acceptable PIN length (digits).
ip_window_secs: i64Per-source-address verification window, in seconds.
ip_max_attempts: u32Verifications allowed per source address inside ip_window_secs (successful or not).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PinPolicy
impl RefUnwindSafe for PinPolicy
impl Send for PinPolicy
impl Sync for PinPolicy
impl Unpin for PinPolicy
impl UnsafeUnpin for PinPolicy
impl UnwindSafe for PinPolicy
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
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,
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