maxcountryman/axum-login
Fork: 63 Star: 627 (更新于 2024-11-18 09:05:03)
license: MIT
Language: Rust .
🪪 User identification, authentication, and authorization for Axum.
最后发布版本: v0.16.0 ( 2024-09-05 06:33:50)
axum-login
🪪 User identification, authentication, and authorization for Axum.
🎨 Overview
This crate provides user identification, authentication, and authorization
as a tower
middleware for axum
.
It offers:
-
User Identification, Authentication, and Authorization: Leverage
AuthSession
to easily manage authentication and authorization. This is also an extractor, so it can be used directly in youraxum
handlers. -
Support for Arbitrary Users and Backends: Applications implement a
couple of traits,
AuthUser
andAuthnBackend
, allowing for any user type and any user management backend. Your database? Yep. LDAP? Sure. An auth provider? You bet. -
User and Group Permissions: Authorization is supported via the
AuthzBackend
trait, which allows applications to define custom permissions. Both user and group permissions are supported. -
Convenient Route Protection: Middleware for protecting access to
routes are provided via the
login_required
andpermission_required
macros. Or bring your own by usingAuthSession
directly withfrom_fn
. -
Rock-solid Session Management: Uses
tower-sessions
for high-performing and ergonomic session management. Look ma, no deadlocks!
📦 Install
To use the crate in your project, add the following to your Cargo.toml
file:
[dependencies]
axum-login = "0.16.0"
🤸 Usage
We recommend reviewing our sqlite
example. There is also a template for cargo-generate
using postgres.
[!NOTE] See the crate documentation for usage information.
🦺 Safety
This crate uses #![forbid(unsafe_code)]
to ensure everything is implemented in 100% safe Rust.
🛟 Getting Help
We've put together a number of examples to help get you started. You're also welcome to open a discussion and ask additional questions you might have.
👯 Contributing
We appreciate all kinds of contributions, thank you!
最近版本更新:(数据更新于 2024-10-02 19:36:28)
2024-09-05 06:33:50 v0.16.0
2024-06-11 01:15:57 v0.15.3
2024-06-05 22:14:18 v0.15.2
2024-04-11 01:58:49 v0.15.1
2024-03-20 11:21:40 v0.15.0
2024-03-05 10:43:06 v0.14.0
2024-01-25 01:11:24 v0.13.1
2024-01-24 00:10:26 v0.13.0
2024-01-02 07:34:23 v0.12.0
2024-01-01 02:56:53 v0.11.3
主题(topics):
access-control, authentication, authorization, axum, login
maxcountryman/axum-login同语言 Rust最近更新仓库
2024-11-20 07:29:29 lanyeeee/jmcomic-downloader
2024-11-19 23:39:15 gleam-lang/gleam
2024-11-19 08:50:55 lapce/lapce
2024-11-11 22:51:00 tauri-apps/tauri
2024-11-11 07:55:30 dani-garcia/vaultwarden
2024-11-09 16:42:37 rustdesk/rustdesk