🗝
summary refs log tree commit diff
path: root/src/server/store.rs
diff options
context:
space:
mode:
authormia <mia@mia.jetzt>2024-04-23 19:50:24 -0700
committermia <mia@mia.jetzt>2024-04-23 19:50:24 -0700
commitcb74c3346428d5e352b66d1f7982f77e0e8b8621 (patch)
tree143a2168f076c2ede754fbb8527c6b1a8baa4de1 /src/server/store.rs
parent979d3d2fd87d5def87d27f4991ca8624c72b2317 (diff)
downloaddissociate-cb74c3346428d5e352b66d1f7982f77e0e8b8621.tar.gz
dissociate-cb74c3346428d5e352b66d1f7982f77e0e8b8621.zip
add expires data to token handoff v0.2.3
Diffstat (limited to 'src/server/store.rs')
-rw-r--r--src/server/store.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/store.rs b/src/server/store.rs
index 98c1bcc..0911090 100644
--- a/src/server/store.rs
+++ b/src/server/store.rs
@@ -166,7 +166,7 @@ impl Store {
         }
     }
 
-    pub async fn check_token(&self, token: &str) -> Option<String> {
+    pub async fn check_token(&self, token: &str) -> Option<(String, SystemTime)> {
         let guard = self.0.read().await;
         let Some((name, expires)) = guard.token_map.get(token) else {
             return None;
@@ -174,7 +174,7 @@ impl Store {
         if *expires < SystemTime::now() {
             return None;
         }
-        Some(name.clone())
+        Some((name.clone(), expires.clone()))
     }
 
     pub async fn create_invite(&self) -> std::io::Result<String> {