3 releases
| 0.1.2 | Dec 30, 2025 |
|---|---|
| 0.1.1 | Dec 29, 2025 |
| 0.1.0 | Dec 26, 2025 |
#1427 in Authentication
Used in armature-framework
2MB
45K
SLoC
armature-auth
Authentication and authorization for the Armature framework.
Features
- Password Hashing - bcrypt and Argon2 support
- OAuth2/OIDC - Google, GitHub, Microsoft, custom providers
- JWT Integration - Works with
armature-jwt - Role-Based Access - Guards and middleware for authorization
- WebAuthn/FIDO2 - Passwordless authentication (optional)
- SAML 2.0 - Enterprise SSO support (optional)
Installation
[dependencies]
armature-auth = "0.1"
Quick Start
use armature_auth::{AuthService, PasswordHasher};
// Hash a password
let hasher = PasswordHasher::argon2();
let hash = hasher.hash("my_password")?;
// Verify a password
assert!(hasher.verify("my_password", &hash)?);
// OAuth2 flow
let oauth = OAuth2Config::google()
.client_id("your-client-id")
.client_secret("your-secret")
.redirect_uri("http://localhost:3000/callback");
let auth_url = oauth.authorization_url();
Features Flags
oauth2- OAuth2/OIDC support (default)webauthn- WebAuthn/FIDO2 passwordless authsaml- SAML 2.0 enterprise SSO
License
MIT OR Apache-2.0
Dependencies
~43–65MB
~1M SLoC