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§

source

fn with_auth_route<T>(self, route: &str, handler: T) -> Self
where 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.

Implementations on Foreign Types§

source§

impl<S, D> AuthApp<S, D> for App<S>
where S: AuthState<D> + Send + Sync, D: AuthDatabase,

source§

fn with_auth_route<T>(self, route: &str, handler: T) -> Self
where T: AuthRequestHandler<S> + 'static,

Implementors§