pub struct TotpCredential {
pub secret: B32,
pub period: u8,
pub digits: u8,
pub username: Option<String>,
pub algorithm: OTPHashAlgorithm,
pub issuer: Option<String>,
}Expand description
Note: Enrollment in TOTP credentials historically has been quite non-standardized but typically authenticator and RP implementations have more or less aligned with the early Google Authenticator implementation spelled out at https://github.com/google/google-authenticator/wiki/Key-Uri-Format. This specification was designed with that in mind.
Fields§
§secret: B32The shared secret used to generate the OTPs. This MUST be a Base32 string
period: u8The time step used to refresh the OTP in seconds. The default SHOULD be 30 seconds, although the relying party MAY customize this to a different value.
digits: u8The number of digits to generate and display to the user each period. The default SHOULD be 6, although the relying party MAY customize this to a different value.
username: Option<String>This member contains the username of the account this TotpCredential is used for.
Note: While this member is optional, it is strongly recommended to be included if available.
algorithm: OTPHashAlgorithmThe algorithm used to generate the OTP hashes. This value SHOULD be a member of OTPHashAlgorithm but importers MUST ignore TotpCredential entries with unknown algorithm values.
issuer: Option<String>This member contains the relying party that issued the credential and should be user consumable.
Note: While this member is optional, it is strongly recommended to be included if available.
Trait Implementations§
Source§impl Clone for TotpCredential
impl Clone for TotpCredential
Source§fn clone(&self) -> TotpCredential
fn clone(&self) -> TotpCredential
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more