Skip to main content

Authenticator

Trait Authenticator 

Source
pub trait Authenticator:
    Send
    + Sync
    + 'static {
    // Required method
    fn authenticate(&self, bearer: Option<&str>) -> bool;
}
Expand description

Pluggable per-request authenticator.

Required Methods§

Source

fn authenticate(&self, bearer: Option<&str>) -> bool

Accepts or rejects a request given its bearer token (if any).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§