pub trait Authorize<B> {
type Future: Future<Output = Result<Request<B>, AuthError>>;
// Required method
fn authorize(&self, request: Request<B>) -> Self::Future;
}
Expand description
Trait for authorizing requests.
Required Associated Types§
Required Methods§
Authorize the request.
If the future resolves to Ok(request)
then the request is allowed through, otherwise not.