damax / api-auth-bundle
Authentication via api key or JWT.
Installs: 502
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 4
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.1
- symfony/security-bundle: ^3.4|^4.0
Requires (Dev)
- doctrine/dbal: ^2.7
- friendsofphp/php-cs-fixer: ^2.14
- lcobucci/jwt: 4.*@dev
- matthiasnoback/symfony-dependency-injection-test: ^3.0
- nelmio/api-doc-bundle: ^3.3
- php-coveralls/php-coveralls: ^2.0
- predis/predis: ^1.1
- symfony/framework-bundle: ^4.1
- symfony/phpunit-bridge: ^4.0
README
API key or JWT authentication for Symfony application.
Features
Api keys
- Store keys in Redis, database or right in config.
- Search in multiple storage types until found.
- Use console commands to add, remove or lookup existing keys.
- Define TTL for each key i.e. grant temporary access to your API.
- Configure the chain of key extractors from cookie, query string or header.
- Finally, implement your own ApiKeyUserProvider for custom solution.
JWT
- Symmetric signing support for quick setup i.e. SSH keys are not required.
- Add and validate all registered claims.
- Extend payload with any public or custom claim.
- Refresh token functionality.
- Customize success or error responses.
Documentation
Topics:
Contribute
Install dependencies and run tests:
$ make