pub enum AuthOperation {
ChangePassword,
PasswordResetCreate,
PasswordResetConsume,
Login,
Register,
StepUpComplete,
TotpVerify,
TotpSetup,
}Expand description
认证相关限流操作:决定 Redis key 的操作段与身份段。
Variants§
ChangePassword
修改密码(按用户 ID 计数)。
PasswordResetCreate
创建密码重置凭证(按操作者-目标对计数)。
PasswordResetConsume
消费密码重置凭证(按凭证指纹计数)。
Login
登录(按用户名计数)。
Register
注册(按用户名计数)。
StepUpComplete
完成 Step-up 重认证(按用户名计数)。
TotpVerify
校验 TOTP 第二因子码(按用户名计数;凭据猜测的在线入口)。
TotpSetup
生成/激活 TOTP 配置(按用户名计数;激活码重试入口)。
Trait Implementations§
Source§impl Clone for AuthOperation
impl Clone for AuthOperation
impl Copy for AuthOperation
Auto Trait Implementations§
impl Forget for AuthOperation
impl Freeze for AuthOperation
impl Move for AuthOperation
impl RefUnwindSafe for AuthOperation
impl Send for AuthOperation
impl Sync for AuthOperation
impl Unpin for AuthOperation
impl UnsafeUnpin for AuthOperation
impl UnwindSafe for AuthOperation
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