summaryrefslogtreecommitdiff
path: root/src/token/extract/identity.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/token/extract/identity.rs')
-rw-r--r--src/token/extract/identity.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/token/extract/identity.rs b/src/token/extract/identity.rs
index 42c7c60..60ad220 100644
--- a/src/token/extract/identity.rs
+++ b/src/token/extract/identity.rs
@@ -10,8 +10,8 @@ use crate::{
app::App,
clock::RequestedAt,
error::{Internal, Unauthorized},
- login::{app::ValidateError, Login},
- token,
+ login::Login,
+ token::{self, app::ValidateError},
};
#[derive(Clone, Debug)]
@@ -40,7 +40,7 @@ impl FromRequestParts<App> for Identity {
let secret = identity_token.secret().ok_or(LoginError::Unauthorized)?;
let app = State::<App>::from_request_parts(parts, state).await?;
- match app.logins().validate(&secret, &used_at).await {
+ match app.tokens().validate(&secret, &used_at).await {
Ok((token, login)) => Ok(Identity { token, login }),
Err(ValidateError::InvalidToken) => Err(LoginError::Unauthorized),
Err(other) => Err(other.into()),