use axum::{extract::FromRequestParts, http::request::Parts}; use super::Login; use crate::{app::App, token::extract::Identity}; #[async_trait::async_trait] impl FromRequestParts for Login { type Rejection = >::Rejection; async fn from_request_parts(parts: &mut Parts, state: &App) -> Result { let identity = Identity::from_request_parts(parts, state).await?; Ok(identity.login) } }