diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-03-23 15:58:33 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-03-23 16:25:22 -0400 |
| commit | 2420f1e75d54a5f209b0267715f078a369d81eb1 (patch) | |
| tree | 20edd531a3f2f765a23fef8e7a508c91bc7dc294 /src/token/extract/identity.rs | |
| parent | 7e15690d54ff849596401b43d163df9353062850 (diff) | |
Rename the `login` module to `user`.
Diffstat (limited to 'src/token/extract/identity.rs')
| -rw-r--r-- | src/token/extract/identity.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/token/extract/identity.rs b/src/token/extract/identity.rs index acfd7ae..d1c0334 100644 --- a/src/token/extract/identity.rs +++ b/src/token/extract/identity.rs @@ -10,14 +10,14 @@ use crate::{ app::App, clock::RequestedAt, error::{Internal, Unauthorized}, - login::Login, token::{self, app::ValidateError}, + user::User, }; #[derive(Clone, Debug)] pub struct Identity { pub token: token::Id, - pub login: Login, + pub user: User, } impl FromRequestParts<App> for Identity { @@ -31,7 +31,7 @@ impl FromRequestParts<App> for Identity { let app = State::<App>::from_request_parts(parts, state).await?; match app.tokens().validate(&secret, &used_at).await { - Ok((token, login)) => Ok(Identity { token, login }), + Ok((token, user)) => Ok(Identity { token, user }), Err(ValidateError::InvalidToken) => Err(LoginError::Unauthorized), Err(other) => Err(other.into()), } |
