Trait tower_http::auth::require_authorization::AuthorizeRequest
source · [−]pub trait AuthorizeRequest<B> {
type ResponseBody;
fn authorize(
&mut self,
request: &mut Request<B>
) -> Result<(), Response<Self::ResponseBody>>;
}Available on crate feature
auth only.Expand description
Trait for authorizing requests.
Required Associated Types
type ResponseBody
type ResponseBody
The body type used for responses to unauthorized requests.
Required Methods
Authorize the request.
If Ok(()) is returned then the request is allowed through, otherwise not.