pub struct OtpRecord {
pub id: Uuid,
pub token_hash: Vec<u8>,
pub entity_id: String,
pub label: String,
pub profile: String,
pub created_at: DateTime<Utc>,
pub expires_at: DateTime<Utc>,
pub max_uses: u32,
pub current_uses: u32,
pub revoked: bool,
}Expand description
Persistent OTP record (RHELBU-3536 R11).
The token_hash field stores the SHA-256 digest of the plaintext
token. The plaintext is never written to any storage backend.
Fields§
§id: UuidUnique record identifier.
token_hash: Vec<u8>SHA-256 hash of the plaintext token (32 bytes).
entity_id: StringEntity (host, user, service) this OTP authorizes enrollment for.
label: StringHuman-readable label.
profile: StringEnrollment profile to apply.
created_at: DateTime<Utc>Creation timestamp.
expires_at: DateTime<Utc>Expiration timestamp.
max_uses: u32Maximum number of allowed uses.
current_uses: u32Current number of completed uses.
revoked: boolWhether the OTP has been administratively revoked.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OtpRecord
impl<'de> Deserialize<'de> for OtpRecord
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 OtpRecord
impl RefUnwindSafe for OtpRecord
impl Send for OtpRecord
impl Sync for OtpRecord
impl Unpin for OtpRecord
impl UnsafeUnpin for OtpRecord
impl UnwindSafe for OtpRecord
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