summaryrefslogtreecommitdiff
path: root/src/user/handlers/logout
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-08-24 16:00:45 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-08-25 22:42:49 -0400
commit6c65e97e49d1d56380aa7d71abb0394b08ff60ca (patch)
treefddb2511233a89c43ac9e4d45ba37bd333dd11e5 /src/user/handlers/logout
parent5bc9dc01618421596d65a7046e46559a872c6693 (diff)
Return an identity, rather than the parts of an identity, when validating an identity token.
This is a small refactoring that's been possible for a while, and we only just noticed.
Diffstat (limited to 'src/user/handlers/logout')
-rw-r--r--src/user/handlers/logout/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/user/handlers/logout/mod.rs b/src/user/handlers/logout/mod.rs
index 4450e4c..f759451 100644
--- a/src/user/handlers/logout/mod.rs
+++ b/src/user/handlers/logout/mod.rs
@@ -21,8 +21,8 @@ pub async fn handler(
Json(_): Json<Request>,
) -> Result<(IdentityCookie, Empty), Error> {
if let Some(secret) = identity.secret() {
- let (token, _) = app.tokens().validate(&secret, &now).await?;
- app.tokens().logout(&token).await?;
+ let validated_ident = app.tokens().validate(&secret, &now).await?;
+ app.tokens().logout(&validated_ident.token).await?;
}
let identity = identity.clear();