Skip to content

Introduction

authx-rs is an embedded authentication and authorization library for Rust services. It ships as a set of composable crates you add to your own binary — not a standalone server you deploy separately.

PrincipleWhat it means
Framework-agnostic coreauthx-core has zero imports from Axum, Actix, or any HTTP library
Plugin-basedEvery feature is opt-in. Unused plugins cost you nothing at compile time
Storage-agnosticRepository traits define the contract; you supply the adapter
Async-firstEvery I/O path is async — no blocking surprises
Security by defaultArgon2id, EdDSA, AES-256-GCM, CSRF, and rate limiting are active unless you explicitly opt out
authx-rsAuth0 / KeycloakLuciacustom JWT middleware
DeploymentEmbedded in your binarySeparate serverEmbeddedEmbedded
Full session management
Organizations / multi-tenancy
RBAC + ABAC
Audit logs
Brute-force lockout
Bring your own DB
No network call to auth
Rust type safety end-to-end
authx-core Zero-dep engine — models, crypto, events, RBAC/ABAC policy, identity
authx-storage Repository traits + MemoryStore + PostgresStore + AuditLogger
authx-plugins All auth plugins (email/password, TOTP, OAuth, API keys, …)
authx-axum Tower middleware, route handlers, cookies, CSRF, rate limiting
authx-dashboard Embedded HTMX admin dashboard
authx-cli `authx` binary — serve, migrate, manage users