Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions jwt-authorizer/src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ where
None
}
}
layer::JwtSource::Header(name) => {
request.headers().get(name).map(|c| String::from(c.to_str().unwrap()))
}
};
Box::pin(async move {
if let Some(token) = token {
Expand Down Expand Up @@ -285,6 +288,7 @@ where
pub enum JwtSource {
Bearer,
Cookie(String),
Header(http::HeaderName),
}

#[derive(Clone)]
Expand Down