Trait humphrey_auth::app::AuthApp
source · pub trait AuthApp<S, D>where
S: AuthState<D>,
D: AuthDatabase,{
// Required method
fn with_auth_route<T>(self, route: &str, handler: T) -> Self
where T: AuthRequestHandler<S> + 'static;
}
Expand description
Represents a Humphrey application with authentication enabled.
This is implemented on Humphrey’s App
type provided that the state implements AuthState
and the database implements AuthDatabase
.
Required Methods§
sourcefn with_auth_route<T>(self, route: &str, handler: T) -> Selfwhere
T: AuthRequestHandler<S> + 'static,
fn with_auth_route<T>(self, route: &str, handler: T) -> Selfwhere
T: AuthRequestHandler<S> + 'static,
Adds an authenticated route and associated handler to the server.
Routes can include wildcards, such as /blog/*
.
Object Safety§
This trait is not object safe.