pub trait AuthExt {
// Required methods
fn try_auth(&self) -> Option<Guard>;
fn auth(&self) -> Guard;
fn identity(&self) -> Option<&Identity>;
}Expand description
req.auth() and req.identity() — reaching authentication from a handler.
Required Methods§
Sourcefn try_auth(&self) -> Option<Guard>
fn try_auth(&self) -> Option<Guard>
The guard, or None when the session middleware is not installed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".