mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-26 00:00:23 +02:00
Move TypedHeader to axum-extra (#1850)
Co-authored-by: Michael Scofield <[email protected]> Co-authored-by: Jonas Platte <[email protected]>
This commit is contained in:
co-authored by
Michael Scofield
Jonas Platte
parent
173f9f72b0
commit
877e3fe4de
@@ -5,8 +5,8 @@ edition = "2021"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
axum = { path = "../../axum", features = ["headers"] }
|
||||
headers = "0.3"
|
||||
axum = { path = "../../axum" }
|
||||
axum-extra = { path = "../../axum-extra", features = ["typed-header"] }
|
||||
jsonwebtoken = "8.0"
|
||||
once_cell = "1.8"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
||||
@@ -8,13 +8,16 @@
|
||||
|
||||
use axum::{
|
||||
async_trait,
|
||||
extract::{FromRequestParts, TypedHeader},
|
||||
headers::{authorization::Bearer, Authorization},
|
||||
extract::FromRequestParts,
|
||||
http::{request::Parts, StatusCode},
|
||||
response::{IntoResponse, Response},
|
||||
routing::{get, post},
|
||||
Json, RequestPartsExt, Router,
|
||||
};
|
||||
use axum_extra::{
|
||||
headers::{authorization::Bearer, Authorization},
|
||||
TypedHeader,
|
||||
};
|
||||
use jsonwebtoken::{decode, encode, DecodingKey, EncodingKey, Header, Validation};
|
||||
use once_cell::sync::Lazy;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
Reference in New Issue
Block a user