pub struct HeaderAuth { /* private fields */ }Expand description
Header-only auth for GET endpoints. Query-string api_key parameters are
rejected with a 400: credentials in URLs leak through logs, proxies and
referrers and are a classic SSRF/credential-theft vector.
Implementations§
Trait Implementations§
Source§impl<S> FromRequestParts<S> for HeaderAuth
impl<S> FromRequestParts<S> for HeaderAuth
Auto Trait Implementations§
impl Freeze for HeaderAuth
impl RefUnwindSafe for HeaderAuth
impl Send for HeaderAuth
impl Sync for HeaderAuth
impl Unpin for HeaderAuth
impl UnsafeUnpin for HeaderAuth
impl UnwindSafe for HeaderAuth
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.