Web applications commonly need a way of authenticating users. This crate provides an easy and secure way to do this, integrating with Humphrey using the
AuthApp trait and allowing complete control over the database users are stored in. Humphrey Auth does not come with a database, but the
AuthDatabase trait is implemented for
Vec<User> to get started. For a production use, you should use a proper database and implement the
AuthDatabase trait for it.
If a JSON representation of users is useful for your database, you can enable the
json feature which provides JSON serialization and deserialization for
Session using the Humphrey JSON crate.
Learn more about Humphrey Auth here.
- Provides the authentication-related extensions to the Humphrey app.
- Contains configuration functionality for the authentication service.
- Contains database traits for connecting the authentication service with a database of your choosing. These are automatically implemented for
Vec<User>as an example.
- Provides error handling capabilities to the crate.
- Provides functionality for handling sessions and tokens.
- Provides a user model for the authentication service.
- Represents an authentication provider. Contains a database of users and provides methods for managing authentication.