Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
/ auth-rs Public archive

A lightweight and modular authentication service proof of concept (PoC) written in Rust.

License

Notifications You must be signed in to change notification settings

xosnrdev/auth-rs

Repository files navigation

auth-rs

A lightweight and modular authentication service proof of concept (PoC) written in Rust.

Features

  • 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

Requirements

  • Rust 1.85.0 or later (using Rust 2024 edition)
  • Nix for reproducible development environment
  • Docker for PostgreSQL database

Quick Start

  1. Enter development shell:

    nix develop
  2. Start the server:

    cargo run

    Server runs at http://127.0.0.1:8080 by default.

Configuration

Copy .env.example to .env and adjust the values:

cp .env.example .env

Documentation

License

MIT

About

A lightweight and modular authentication service proof of concept (PoC) written in Rust.

Topics

Resources

License

Stars

Watchers

Forks