pub struct OtpMetadata {
pub id: Uuid,
pub entity_id: String,
pub label: String,
pub profile: String,
pub created_at: DateTime<Utc>,
pub expires_at: DateTime<Utc>,
pub max_uses: u32,
}Expand description
Metadata attached to a generated OTP token.
Fields§
§id: UuidUnique record identifier.
entity_id: StringEntity (host, user, service) this OTP authorizes enrollment for.
label: StringHuman-readable label for the OTP.
profile: StringEnrollment profile to apply when this OTP is consumed.
created_at: DateTime<Utc>Timestamp when the OTP was created.
expires_at: DateTime<Utc>Timestamp when the OTP expires.
max_uses: u32Maximum number of times this OTP may be used.
Trait Implementations§
Source§impl Clone for OtpMetadata
impl Clone for OtpMetadata
Source§fn clone(&self) -> OtpMetadata
fn clone(&self) -> OtpMetadata
Returns a duplicate 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 OtpMetadata
impl Debug for OtpMetadata
Source§impl<'de> Deserialize<'de> for OtpMetadata
impl<'de> Deserialize<'de> for OtpMetadata
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 OtpMetadata
impl RefUnwindSafe for OtpMetadata
impl Send for OtpMetadata
impl Sync for OtpMetadata
impl Unpin for OtpMetadata
impl UnsafeUnpin for OtpMetadata
impl UnwindSafe for OtpMetadata
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