summaryrefslogtreecommitdiff
path: root/src/login/extract.rs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-22 23:25:24 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-22 23:25:24 -0400
commit01f9f3549c76702fd56e58d44c5180fecddb4bfa (patch)
treee7a64e70975a8b50bc442d28c17161b82c42c63a /src/login/extract.rs
parent214a9e6c1fd729fc2c49eb2a5d41b5651ff5bc61 (diff)
Sort out the naming of the various parts of an identity.
* A `cookie::Identity` (`IdentityCookie`) is a specialized CookieJar for working with identities. * An `Identity` is a token/login pair. I hope for this to be a bit more legible. In service of this, `Login` is no longer extractable. You have to get an identity.
Diffstat (limited to 'src/login/extract.rs')
-rw-r--r--src/login/extract.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/login/extract.rs b/src/login/extract.rs
deleted file mode 100644
index c2d97f2..0000000
--- a/src/login/extract.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-use axum::{extract::FromRequestParts, http::request::Parts};
-
-use super::Login;
-use crate::{app::App, token::extract::Identity};
-
-#[async_trait::async_trait]
-impl FromRequestParts<App> for Login {
- type Rejection = <Identity as FromRequestParts<App>>::Rejection;
-
- async fn from_request_parts(parts: &mut Parts, state: &App) -> Result<Self, Self::Rejection> {
- let identity = Identity::from_request_parts(parts, state).await?;
-
- Ok(identity.login)
- }
-}