pub struct TotpStatus {
pub enrolled: bool,
pub enabled: bool,
pub secret: Option<String>,
pub uri: Option<String>,
}Expand description
What the UI and CLI need to draw a user’s second-factor state.
Fields§
§enrolled: boolA secret exists. Enrollment has started but may never have been confirmed.
enabled: boolA code has been confirmed, and login now requires one.
secret: Option<String>Present only in the response to totp_enroll. Never returned by
totp_status: the secret is shown once, at the moment the user is
putting it into their authenticator, and a status endpoint that handed it
back would make every later read of the user list a way to clone the
factor.
uri: Option<String>The otpauth:// URI for the same secret, on the same terms.
Trait Implementations§
Source§impl Clone for TotpStatus
impl Clone for TotpStatus
Source§fn clone(&self) -> TotpStatus
fn clone(&self) -> TotpStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TotpStatus
impl Debug for TotpStatus
Source§impl<'de> Deserialize<'de> for TotpStatus
impl<'de> Deserialize<'de> for TotpStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TotpStatus
impl RefUnwindSafe for TotpStatus
impl Send for TotpStatus
impl Sync for TotpStatus
impl Unpin for TotpStatus
impl UnsafeUnpin for TotpStatus
impl UnwindSafe for TotpStatus
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