feat(daemon): wire TotpStore into AppState behind feature gate

This commit is contained in:
michael
2026-04-27 11:27:32 -07:00
parent c56ed0c9a1
commit 5fa81e5757
3 changed files with 62 additions and 0 deletions

View File

@@ -72,6 +72,15 @@ pub struct RecoveryCodeSummary {
pub expires_unix: u64,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, zvariant::Type)]
pub struct TotpEnrollment {
pub user: String,
/// Base32-encoded shared secret, no padding. ~32 chars for 160 bits.
pub secret_b32: String,
/// Full `otpauth://totp/...` URI suitable for QR encoding.
pub otpauth_uri: String,
}
#[cfg(test)]
mod tests {
use super::*;