RepositoryRustUSHoa Kỳ
MA

maxcountryman/axum-login

🪪 User identification, authentication, and authorization for Axum.

1.0ksao
101fork
0issue
6lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: login

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: axum

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: access-control

#1 Repository của tuần

🪪 Xác thực & phân quyền người dùng cho Axum bằng Rust

Một crate Rust cung cấp middleware xác thực, nhận dạng và phân quyền người dùng dựa trên tower cho framework web Axum.

axum-login là một crate Rust dùng để quản lý toàn bộ vòng đời bảo mật người dùng trong các ứng dụng Axum: từ việc nhận dạng (identification), xác thực (authentication), cho đến phân quyền (authorization). Dựa trên AuthSession, crate này hoạt động như một extractor có thể dùng trực tiếp trong handler, đồng thời hỗ trợ bất kỳ loại người dùng và backend nào nhờ các trait AuthUser và AuthnBackend.

✨ Điểm nổi bật

  • AuthSession: Quản lý xác thực và phân quyền, đồng thời là extractor dùng trực tiếp trong handler Axum.
  • Hỗ trợ backend tùy biến: Áp dụng trait AuthUser và AuthnBackend để dùng bất kỳ loại người dùng và hệ quản trị nền tảng nào như database, LDAP hay nhà cung cấp dịch vụ xác thực.
  • Quyền người dùng & nhóm: Trait AuthzBackend hỗ trợ định nghĩa quyền tùy chỉnh cho cả người dùng cá nhân và nhóm.
  • Bảo vệ tuyến đường: Macro login_required và permission_required, cùng builder require để kiểm soát truy cập dễ dàng.
  • Quản lý phiên ổn định: Sử dụng tower-sessions để quản lý phiên người dùng hiệu năng cao, tránh deadlock.
  • An toàn Rust: Dự án dùng #![forbid(unsafe_code)] đảm bảo toàn bộ mã đều an toàn (safe Rust).

💡 Vì sao đáng chú ý

Khác với cách tiếp cận tích hợp thủ công, axum-login cung cấp một giải pháp có cấu trúc, dựa trên middleware và trait, giúp giảm đáng kể công sức triển khai tính năng bảo mật trong ứng dụng Axum. Nhờ thiết kế linh hoạt thông qua trait, crate này dễ dàng tích hợp với mọi loại backend lưu trữ người dùng, phù hợp cho cả dự án nhỏ lẫn hệ thống doanh nghiệp.


#Rust #Axum #Authentication #Authorization #OpenSource #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryGo
apache/casbin

Apache Casbin: an authorization library that supports access control models like ACL, RBAC, ABAC.

20.5k
Nov 25, 2026
RepositoryGo
zitadel/zitadel

ZITADEL - Identity infrastructure, simplified for you.

15.7k
Nov 28, 2026
RepositoryJava
supertokens/supertokens-core

Open source alternative to Auth0 / Firebase Auth / AWS Cognito

15.3k
Nov 27, 2026
RepositoryTypeScript
logto-io/logto

🧑‍🚀 Authentication and authorization infrastructure for SaaS and AI apps, built on OIDC and OAuth 2.1 with multi-tenancy, SSO, and RBAC.

15.0k
Dec 2, 2026
RepositoryJava
apereo/cas

Apereo CAS - Identity & Single Sign On for all earthlings and beyond.

11.4k
Dec 2, 2026
RepositoryGo
pocket-id/pocket-id

The most user-friendly OpenID Connect Certified™ and OAuth 2.0 provider that lets users sign in to your applications with passkeys.

10.6k
Dec 3, 2026
RepositoryPython
pennersr/django-allauth

Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication. 🔁 Mirror of https://codeberg.org/allauth/django-allauth/

10.4k
Nov 25, 2026
RepositoryTypeScript
hexclave/hexclave

The user infrastructure platform. You choose the frontend, backend, and database. Hexclave handles everything else.

6.9k
Nov 27, 2026
RepositoryGo
Permify/permify

An open-source authorization as a service inspired by Google Zanzibar, designed to build and manage fine-grained and scalable authorization systems for any application. — Permify is now part of FusionAuth 🎉

6.0k
Nov 26, 2026