feat(gui): TOTP tab with QR code modal + revoke (feature-gated)
This commit is contained in:
@@ -88,6 +88,24 @@ impl Daemon {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "totp")]
|
||||
impl Daemon {
|
||||
pub async fn enroll_totp(
|
||||
&self,
|
||||
user: &str,
|
||||
) -> zbus::Result<authforge_common::types::TotpEnrollment> {
|
||||
self.proxy.call("EnrollTotp", &(user,)).await
|
||||
}
|
||||
|
||||
pub async fn is_totp_enrolled(&self, user: &str) -> zbus::Result<bool> {
|
||||
self.proxy.call("IsTotpEnrolled", &(user,)).await
|
||||
}
|
||||
|
||||
pub async fn revoke_totp(&self, user: &str) -> zbus::Result<bool> {
|
||||
self.proxy.call("RevokeTotp", &(user,)).await
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)] // wired through keys_page.rs in Task 4.
|
||||
pub(crate) fn current_user() -> String {
|
||||
std::env::var("USER").unwrap_or_else(|_| "unknown".into())
|
||||
|
||||
Reference in New Issue
Block a user