A lightweight and modular authentication service proof of concept (PoC) written in Rust.
-
JWT Authentication
- Access and refresh tokens
- Role-based access control
- Session management
-
Security
- Password hashing
- Token expiration
- Session revocation
- CORS middleware
- Rate limiting
- Request timeouts
- Environment config
- Rust 1.85.0 or later (using Rust 2024 edition)
- Nix for reproducible development environment
- Docker for PostgreSQL database
-
Enter development shell:
nix develop
-
Start the server:
cargo run
Server runs at
http://127.0.0.1:8080
by default.
Copy .env.example
to .env
and adjust the values:
cp .env.example .env
- API Documentation - Available endpoints and examples