corevpn-auth
Authentication and authorization for CoreVPN - OAuth2, OIDC, and SAML support.
Features
- OAuth2/OIDC: Integration with identity providers
- SAML 2.0: Enterprise SSO support
- Certificate Auth: X.509 client certificate authentication
- Token Management: Secure token storage and refresh
- Provider Support: Google, Microsoft, Okta, and generic OIDC
Supported Providers
| Provider | Type | Features |
|---|---|---|
| OIDC | Domain restriction, group claims | |
| Microsoft | OIDC | Azure AD, tenant restriction |
| Okta | OIDC | Group-based access control |
| Generic | OIDC | Any OIDC-compliant IdP |
| SAML | SAML 2.0 | Enterprise IdP integration |
Usage
use ;
// Configure Google OAuth
let config = google;
// Create provider
let provider = new.await?;
// Get authorization URL
let = provider.authorization_url?;
// Exchange code for tokens
let tokens = provider.exchange_code.await?;
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.