Bump pageserver dependencies

This commit is contained in:
Kirill Bulatov
2022-02-09 11:06:26 +02:00
committed by Kirill Bulatov
parent b08e340f60
commit 76b74349cb
22 changed files with 516 additions and 456 deletions

View File

@@ -110,6 +110,7 @@ fn parse_token(header_value: &str) -> Result<&str, ApiError> {
Ok(token)
}
// TODO kb now test_auth fails, is it after jsonwebtoken update?
pub fn auth_middleware<B: hyper::body::HttpBody + Send + Sync + 'static>(
provide_auth: fn(&Request<Body>) -> Option<&JwtAuth>,
) -> Middleware<B, ApiError> {
@@ -123,7 +124,7 @@ pub fn auth_middleware<B: hyper::body::HttpBody + Send + Sync + 'static>(
let token = parse_token(header_value)?;
let data = auth
.decode(token)
.decode(dbg!(token))
.map_err(|_| ApiError::Unauthorized("malformed jwt token".to_string()))?;
req.set_context(data.claims);
}

View File

@@ -2,3 +2,7 @@ pub mod endpoint;
pub mod error;
pub mod json;
pub mod request;
/// Current fast way to applly simple http routing in varuious Zenith binaries.
/// Reexported for sake of uniform approach, that could be later replaced with better alternatives, if needed.
pub use routerify::{ext::RequestExt, RouterBuilder};