pub trait AuthorizeRequest<B> {
    type ResponseBody;
    fn authorize(
        &mut self,
        request: &mut Request<B>
    ) -> Result<(), Response<Self::ResponseBody>>; }
This is supported on crate feature auth only.
Expand description

Trait for authorizing requests.

Associated Types

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.

Implementors