Add cached TOTP search (#77)
This commit is contained in:
1 parent
1ce7b7814b
commit
87f9e7be98
7 files changed
+156
-7
No files matched your search
@@ -587,9 +587,22 @@ impl MobileAuthentication {
|
||||
}
|
||||
|
||||
pub fn cached_totp_page(&self) -> Result<Option<MobileTotpPage>, MobileAuthenticationError> {
|
||||
self.search_cached_totp_page("")
|
||||
}
|
||||
|
||||
pub fn search_cached_totp_page(
|
||||
&self,
|
||||
query: &str,
|
||||
) -> Result<Option<MobileTotpPage>, MobileAuthenticationError> {
|
||||
let shared = self.status()?.watch_shared_totp_entries.clone();
|
||||
let cache_path = self.config.source().with_file_name("totp-catalog.toml");
|
||||
Ok(MobileTotpService::new(&self.repository, &self.keys).cached_page(&shared, &cache_path))
|
||||
Ok(
|
||||
MobileTotpService::new(&self.repository, &self.keys).search_cached_page(
|
||||
&shared,
|
||||
&cache_path,
|
||||
query,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn totp_detail(
|
||||
|
||||
Reference in new issue
Block a user