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§

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§