pub struct TwoFactorRow {
pub id: Id,
pub user_id: Id,
pub secret: Vec<u8>,
pub backup_codes: Vec<u8>,
pub last_used_step: Option<i64>,
}Expand description
A row of two_factor: one user’s TOTP secret and backup codes.
Fields§
§id: Id§user_id: Id§secret: Vec<u8>The TOTP secret, encrypted with the auth secret.
backup_codes: Vec<u8>SHA-256 hashes of the unused backup codes as a JSON array, encrypted.
last_used_step: Option<i64>The last TOTP time step a code was accepted for, so each code works once.
Implementations§
Source§impl TwoFactorRow
impl TwoFactorRow
pub const ID: Col<TwoFactorRow, Id>
pub const USER_ID: Col<TwoFactorRow, Id>
pub const BACKUP_CODES: Col<TwoFactorRow, Vec<u8>>
pub const LAST_USED_STEP: Col<TwoFactorRow, Option<i64>>
Trait Implementations§
Source§impl Clone for TwoFactorRow
impl Clone for TwoFactorRow
Source§impl Debug for TwoFactorRow
impl Debug for TwoFactorRow
impl Eq for TwoFactorRow
Source§impl Model for TwoFactorRow
impl Model for TwoFactorRow
Source§impl OnTable for TwoFactorRow
impl OnTable for TwoFactorRow
type Table = TwoFactorRow
Source§impl PartialEq for TwoFactorRow
impl PartialEq for TwoFactorRow
impl StructuralPartialEq for TwoFactorRow
Auto Trait Implementations§
impl Forget for TwoFactorRow
impl Freeze for TwoFactorRow
impl Move for TwoFactorRow
impl RefUnwindSafe for TwoFactorRow
impl Send for TwoFactorRow
impl Sync for TwoFactorRow
impl Unpin for TwoFactorRow
impl UnsafeUnpin for TwoFactorRow
impl UnwindSafe for TwoFactorRow
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