A comprehensive Symfony authentication bundle with JWT, OpenID Connect, and advanced user management
- π JWT Authentication: First-party JWT implementation with RS256 signing
- π OpenID Connect Provider: Full OIDC support with Authorization Code + PKCE flow
- π₯ User Management: Complete CRUD operations with role-based access control
- π Audit System: Track all entity changes with old/new data comparison
- π³ Subscription Management: Built-in subscription and billing support
- π Advanced Security: Rate limiting, brute force protection, 2FA support
- π¨ Customizable Templates: Overridable Twig templates and services
- π οΈ Developer Experience: Maker commands for easy setup and management
- π§ Email Integration: Password reset, verification, and notification emails
- π Internationalization: Multi-language support with translation files
| Component | Version |
|---|---|
| PHP | >= 7.4 (7.3+ for legacy versions) |
| Symfony | >= 6.4 |
| Doctrine ORM | >= 2.5 |
| OpenSSL | Required for JWT signing |
β οΈ PHP 7.3 (legacy support only)- β PHP 7.4
- β PHP 8.0
- β PHP 8.1
- β PHP 8.2
- β PHP 8.3
- β Symfony 6.4 LTS
- β Symfony 7.0
- β Symfony 7.1
- β Symfony 7.2
composer require pepprio/authx-bundleAdd the bundle to your config/bundles.php:
<?php
return [
// ... other bundles
Pepprio\AuthXBundle\AuthXBundle::class => ['all' => true],
];php bin/console authx:installThis command will:
- Generate JWT keys
- Create configuration files
- Set up database migrations
- Configure security settings
php bin/console doctrine:migrations:migrateCreate config/packages/authx.yaml:
authx:
jwt:
ttl: 3600
algorithm: 'RS256'
issuer: 'your-app'
oidc:
enabled: true
issuer_url: 'https://your-domain.com'
security:
password_policy:
min_length: 8
require_uppercase: true
require_lowercase: true
require_numbers: true
require_special_chars: true
rate_limiting:
login_attempts: 5
lockout_duration: 900Update your config/packages/security.yaml:
security:
providers:
authx_user_provider:
id: Pepprio\AuthXBundle\Security\UserProvider
firewalls:
api:
pattern: ^/api
stateless: true
jwt: ~
main:
lazy: true
provider: authx_user_provider
form_login:
login_path: authx_login
check_path: authx_login_check
logout:
path: authx_logoutphp bin/console authx:user:create [email protected] --adminphp bin/console authx:client:create "My App" --redirect-uri="https://myapp.com/callback"- Installation Guide
- Configuration Reference
- API Documentation
- Security Guide
- Customization
- Migration Guide
Visit our comprehensive documentation site: https://pepprio.github.io/authx-bundle
| Command | Description |
|---|---|
authx:install |
Bootstrap the bundle configuration |
authx:user:create |
Create a new user |
authx:user:promote |
Promote user to admin |
authx:client:create |
Create OAuth2/OIDC client |
authx:jwk:generate |
Generate new JWT signing keys |
authx:jwk:rotate |
Rotate JWT keys |
authx:token:revoke |
Revoke access tokens |
authx:audit:cleanup |
Clean up old audit records |
# Run all tests
composer test
# Run specific test suites
composer test:unit
composer test:integration
composer test:functional
# Run with coverage
composer test:coverage# PHP CodeSniffer
composer cs:check
composer cs:fix
# PHPStan
composer stan
# All quality checks
composer qaAuthXBundle implements industry-standard security practices:
- JWT with RS256: Asymmetric signing for enhanced security
- PKCE: Proof Key for Code Exchange for OAuth2 flows
- Rate Limiting: Protection against brute force attacks
- CSRF Protection: Built-in CSRF token validation
- XSS Prevention: Output escaping and CSP headers
- Audit Logging: Complete audit trail of all changes
If you discover a security vulnerability, please send an email to [email protected]. All security vulnerabilities will be promptly addressed.
We welcome contributions! Please see our Contributing Guide for details.
# Clone the repository
git clone https://github.com/pepprio/authx-bundle.git
cd authx-bundle
# Install dependencies
composer install
# Set up test environment
cp .env.test.dist .env.test
# Run tests
composer testThis bundle is licensed under the MIT License. See the LICENSE file for details.
- Pepprio Team - Bundle development and maintenance
- Symfony Community - Framework and components
- Doctrine Team - ORM and database abstraction
- Documentation: https://pepprio.github.io/authx-bundle
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
Made with β€οΈ by Pepprio