[−][src]Trait bellhop::auth::Auth
Trait for plugins that provide authentication.
See module documentation for more information.
Required methods
fn authenticate(
&self,
_conn: &Db,
_req: &Request
) -> Result<Option<User>, Error>
&self,
_conn: &Db,
_req: &Request
) -> Result<Option<User>, Error>
Return the [models::user::User
] that is authenticated in the given
Request
.
A return value of Ok(None)
means that there is no authenticated user
according to this plugin. Authentication will be retried with the next
plugin.
On the other hand, a return value of Err(...)
will abort the process,
and no user authentication will be retried.
Provided methods
fn prelaunch(&self, rocket: Rocket) -> Rocket
Perform Rocket related setup, like attaching routes and fairings, reading configuration values, etc.