pub struct TwoFactorAuth { /* private fields */ }
Expand description
Two Factor Authentication
Implementations§
Source§impl TwoFactorAuth
impl TwoFactorAuth
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new TwoFactorAuth
If qr
feature is enabled, it will use the KONARR_TFA_ISSUER
and KONARR_TFA_ACCOUNT_NAME
environment variables
Sourcepub fn new_with_issuer(
issuer: impl Into<String>,
account_name: impl Into<String>,
) -> Self
pub fn new_with_issuer( issuer: impl Into<String>, account_name: impl Into<String>, ) -> Self
Create a new TwoFactorAuth with an issuer and account name
Sourcepub fn generate_current(&self) -> Result<String, Error>
pub fn generate_current(&self) -> Result<String, Error>
Generate a new TOTP
Trait Implementations§
Source§impl Clone for TwoFactorAuth
impl Clone for TwoFactorAuth
Source§fn clone(&self) -> TwoFactorAuth
fn clone(&self) -> TwoFactorAuth
Returns a copy of the value. Read more
1.0.0 · 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 TwoFactorAuth
impl Debug for TwoFactorAuth
Source§impl<'de> Deserialize<'de> for TwoFactorAuth
impl<'de> Deserialize<'de> for TwoFactorAuth
Source§fn deserialize<D>(deserializer: D) -> Result<TwoFactorAuth, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<TwoFactorAuth, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for TwoFactorAuth
impl Display for TwoFactorAuth
Source§impl From<&TwoFactorAuth> for Value
impl From<&TwoFactorAuth> for Value
Source§fn from(value: &TwoFactorAuth) -> Self
fn from(value: &TwoFactorAuth) -> Self
Converts to this type from the input type.
Source§impl From<TwoFactorAuth> for Value
impl From<TwoFactorAuth> for Value
Source§fn from(value: TwoFactorAuth) -> Self
fn from(value: TwoFactorAuth) -> Self
Converts to this type from the input type.
Source§impl From<Value> for TwoFactorAuth
impl From<Value> for TwoFactorAuth
Auto Trait Implementations§
impl Freeze for TwoFactorAuth
impl RefUnwindSafe for TwoFactorAuth
impl Send for TwoFactorAuth
impl Sync for TwoFactorAuth
impl Unpin for TwoFactorAuth
impl UnwindSafe for TwoFactorAuth
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request