pub struct LoginWithCredentialsCallbacks<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure> {
pub fetch_credentials: FetchCredentials,
pub verify_password: VerifyPassword,
pub dummy_password_hash: DummyPasswordHash,
pub build_user: BuildUser,
pub on_two_factor: OnTwoFactor,
pub on_success: OnSuccess,
pub on_failure: OnFailure,
}Expand description
Collects the callbacks needed to authenticate a login request.
Fields§
§fetch_credentials: FetchCredentialsLoads stored credentials for the normalized login identifier.
verify_password: VerifyPasswordVerifies the submitted password against the stored password hash.
dummy_password_hash: DummyPasswordHashValid hash used when the normalized identifier has no account.
It must use the same algorithm and comparable cost as real hashes so negative lookups cannot be distinguished by skipping password work.
build_user: BuildUserConverts the authenticated account into the application’s session user.
on_two_factor: OnTwoFactorRuns application-owned work when the account requires two-factor authentication.
on_success: OnSuccessRuns application-owned work after a complete successful login.
on_failure: OnFailureRuns application-owned cleanup after invalid credentials.
Auto Trait Implementations§
impl<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure> Freeze for LoginWithCredentialsCallbacks<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure>
impl<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure> RefUnwindSafe for LoginWithCredentialsCallbacks<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure>where
FetchCredentials: RefUnwindSafe,
VerifyPassword: RefUnwindSafe,
BuildUser: RefUnwindSafe,
OnTwoFactor: RefUnwindSafe,
OnSuccess: RefUnwindSafe,
OnFailure: RefUnwindSafe,
impl<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure> Send for LoginWithCredentialsCallbacks<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure>
impl<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure> Sync for LoginWithCredentialsCallbacks<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure>
impl<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure> Unpin for LoginWithCredentialsCallbacks<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure>
impl<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure> UnsafeUnpin for LoginWithCredentialsCallbacks<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure>where
FetchCredentials: UnsafeUnpin,
VerifyPassword: UnsafeUnpin,
BuildUser: UnsafeUnpin,
OnTwoFactor: UnsafeUnpin,
OnSuccess: UnsafeUnpin,
OnFailure: UnsafeUnpin,
impl<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure> UnwindSafe for LoginWithCredentialsCallbacks<FetchCredentials, VerifyPassword, BuildUser, OnTwoFactor, OnSuccess, OnFailure>where
FetchCredentials: UnwindSafe,
VerifyPassword: UnwindSafe,
BuildUser: UnwindSafe,
OnTwoFactor: UnwindSafe,
OnSuccess: UnwindSafe,
OnFailure: UnwindSafe,
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