chore: cleanup
This commit is contained in:
parent
8843134aa6
commit
bcdd397033
2 changed files with 0 additions and 15 deletions
|
|
@ -39,7 +39,6 @@ async fn main() -> Result<()>{
|
|||
.layer(middleware::map_response(main_response_mapper))
|
||||
.layer(middleware::from_fn_with_state(mc.clone(), web::mw_auth::mw_ctx_resolver))
|
||||
.layer(CookieManagerLayer::new()) // must be above? the auth routes
|
||||
// TODO: continue video at 22:15
|
||||
.fallback_service(routes_static());
|
||||
|
||||
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
|
||||
|
|
|
|||
|
|
@ -70,20 +70,6 @@ impl<S: Send + Sync> FromRequestParts<S> for Ctx {
|
|||
.get::<Result<Ctx>>()
|
||||
.ok_or(Error::AuthFailCtxNotInRequestExt)?
|
||||
.clone()
|
||||
|
||||
// // Use the cookies extractor.
|
||||
// let cookies = parts.extract::<Cookies>().await.unwrap();
|
||||
//
|
||||
// let auth_token = cookies.get(AUTH_TOKEN).map(|c| c.value().to_string());
|
||||
//
|
||||
// // Parse token.
|
||||
// let (user_id, exp, sign) = auth_token
|
||||
// .ok_or(Error::AuthFailNoAuthTokenCookie)
|
||||
// .and_then(parse_token)?;
|
||||
//
|
||||
// // TODO: Token components validation.
|
||||
//
|
||||
// Ok(Ctx::new(user_id))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue