axum-login v0.4.0 released

90 points Wooden-Character-255

We have released \axum-login\\ v0.4.0 updating \axum\\ to v0.6.0. See the previous release announcement for more details on the crate's features. In brief, \axum-login\\ is an Axum middleware for managing user sessions and more specifically provides log in, log out, and route protection facilities.

Notably v0.4.0 introduces a breaking change to the \AuthUser\\ trait which now requires that \get\\_password\\_hash\\ returns a \SecretVec\\. We are leveraging the \secrecy\\ crate here to ensure that applications do not accidentally leak password hashes and going forward applications that use \axum-login\\ will need to update their implementations of the trait accordingly.

It's also worth mentioning that \axum-login\\ now provides a rudimentary RBAC interface via \get\\_role\\. This may be used in concert with \login\\_with\\_role\\ to restrict route access based on a range of arbitrary (app-defined) roles. For example, applications can write: \let auth\\_roles = Role::SuperUser..;\\ or \let auth\\_roles = Role::User..;\\.

We would love your feedback: if there are additional features you'd like to see or issues you've run into, please consider filling an issue. We will continue to build on this base to provide a robust, secure, and ergonomic authentication and authorization system for Axum.