Skip to main content

AuthValidator

Trait AuthValidator 

Source
pub trait AuthValidator {
    // Required method
    fn validate(&self, headers: &HeaderMap) -> Result<(), HttpResponse>;
}
Expand description

General purpose trait to validate Http Authorization headers. It’s supposed to be integrated as a validator trait into an AuthLayer.

Required Methods§

Source

fn validate(&self, headers: &HeaderMap) -> Result<(), HttpResponse>

This function is invoked by the AuthLayer to perform validation on Http headers. The result conveys validation errors in the form of an Http response.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§