pub struct RequireAuthorizationLayer<T> { /* private fields */ }auth only.Expand description
Layer that applies RequireAuthorization which authorizes all requests using the
Authorization header.
See the module docs for an example.
Implementations
Authorize requests using a username and password pair.
The Authorization header is required to be Basic {credentials} where credentials is
base64_encode("{username}:{password}").
Since the username and password is sent in clear text it is recommended to use HTTPS/TLS with this method. However use of HTTPS/TLS is not enforced by this middleware.
Authorize requests using a custom scheme.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for RequireAuthorizationLayer<T> where
T: RefUnwindSafe,
impl<T> Send for RequireAuthorizationLayer<T> where
T: Send,
impl<T> Sync for RequireAuthorizationLayer<T> where
T: Sync,
impl<T> Unpin for RequireAuthorizationLayer<T> where
T: Unpin,
impl<T> UnwindSafe for RequireAuthorizationLayer<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
follow-redirect only.Create a new Policy that returns Action::Follow only if self and other return
Action::Follow. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more