Skip to main content

HttpAuth

Trait HttpAuth 

Source
pub trait HttpAuth:
    Send
    + Sync
    + 'static {
    // Required method
    fn authenticate(&self, parts: &RequestParts<'_>) -> Option<PeerOrigin>;
}
Expand description

The embedder’s auth policy: classify an inbound request’s trust origin, or reject it. Called once per connection before the handler sees anything. The framework NEVER trusts by transport alone — return None to answer 401.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§