auth0-integration
A Rust service for Auth0 integration with JWT validation using RS256.
Features
- Auth0 client credentials (M2M) authentication flow
- JWT token validation with JWKS key discovery
- Async HTTP server with Axum web framework
- Automatic token refresh and caching
- Configurable via environment variables
Installation
Add to your Cargo.toml:
[]
= "0.1"
Configuration
Set these environment variables:
AUTH0_DOMAIN- Your Auth0 tenant domain (e.g.,your-tenant.us.auth0.com)AUTH0_CLIENT_ID- Machine-to-machine application client IDAUTH0_CLIENT_SECRET- Machine-to-machine application client secretAUTH0_AUDIENCE- API identifier registered in Auth0PORT- HTTP server port (default: 8080)RUST_LOG- Tracing filter (default:auth0_integration=debug,tower_http=debug)
Quick Start
# Copy and configure environment variables
# Build the project
# Run the server
Docker
License
MIT