pub struct TwoFactorResponse {
pub status: i32,
pub shared_secret: Option<String>,
pub identity_secret: Option<String>,
pub secret_1: Option<String>,
pub revocation_code: Option<String>,
pub serial_number: Option<u64>,
pub uri: Option<String>,
pub server_time: Option<u64>,
pub account_name: Option<String>,
pub token_gid: Option<String>,
pub confirm_type: Option<i32>,
pub phone_number_hint: Option<String>,
}Expand description
Response from enabling two-factor authentication.
Fields§
§status: i32Status code (1 = success).
Shared secret (base64).
identity_secret: Option<String>Identity secret (base64).
secret_1: Option<String>Secret 1 (base64).
revocation_code: Option<String>Revocation code.
serial_number: Option<u64>Serial number.
uri: Option<String>URI for authenticator apps.
server_time: Option<u64>Server time when enabled.
account_name: Option<String>Account name.
token_gid: Option<String>Token GID.
confirm_type: Option<i32>Confirmation type.
phone_number_hint: Option<String>Phone number hint.
Implementations§
Source§impl TwoFactorResponse
impl TwoFactorResponse
Sourcepub fn setup_instructions(&self) -> String
pub fn setup_instructions(&self) -> String
Returns a human-readable string with instructions and secrets for setting up the authenticator.
Trait Implementations§
Source§impl Clone for TwoFactorResponse
impl Clone for TwoFactorResponse
Source§fn clone(&self) -> TwoFactorResponse
fn clone(&self) -> TwoFactorResponse
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 TwoFactorResponse
impl Debug for TwoFactorResponse
Source§impl<'de> Deserialize<'de> for TwoFactorResponse
impl<'de> Deserialize<'de> for TwoFactorResponse
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 TwoFactorResponse
impl RefUnwindSafe for TwoFactorResponse
impl Send for TwoFactorResponse
impl Sync for TwoFactorResponse
impl Unpin for TwoFactorResponse
impl UnsafeUnpin for TwoFactorResponse
impl UnwindSafe for TwoFactorResponse
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