pub struct BearerClaims(pub TokenClaims);Expand description
Extracts and verifies the Authorization: Bearer <token> header.
Verification is delegated to ServerState::verifier; path-level
authorization happens in the handler via
ServerState::authorize.
Tuple Fields§
§0: TokenClaimsTrait Implementations§
Source§impl<S> FromRequestParts<S> for BearerClaims
impl<S> FromRequestParts<S> for BearerClaims
Auto Trait Implementations§
impl Freeze for BearerClaims
impl RefUnwindSafe for BearerClaims
impl Send for BearerClaims
impl Sync for BearerClaims
impl Unpin for BearerClaims
impl UnsafeUnpin for BearerClaims
impl UnwindSafe for BearerClaims
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<S, T> FromRequest<S, ViaParts> for T
impl<S, T> FromRequest<S, ViaParts> for T
Source§type Rejection = <T as FromRequestParts<S>>::Rejection
type Rejection = <T as FromRequestParts<S>>::Rejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
Source§fn from_request(
req: Request<Body>,
state: &S,
) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
fn from_request( req: Request<Body>, state: &S, ) -> impl Future<Output = Result<T, <T as FromRequest<S, ViaParts>>::Rejection>>
Perform the extraction.