bburnichon / bbn-security-bundle
Simple Api Key based Authentication bundle for Symfony2
Installs: 594
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
- symfony/dependency-injection: ~2.3
- symfony/http-kernel: ~2.3
- symfony/security: ~2.3
- symfony/security-bundle: ~2.3
Requires (Dev)
This package is auto-updated.
Last update: 2022-02-01 12:27:44 UTC
README
API Key based Authentication bundle for Symfony2
Usage
This bundle will enable the new api_key authentication provider
use it as below in your security.yml file
security: firewall: your-firewall-name: pattern: ^/what-you-wish-to-protect/ provider: user_provider_name api_key: parameter: apikey stateless: true
The new user provider should provide api keys as username
The loadUserFromUsername()
method will be called with the supplied api key the Authentication class does not care about the credentials fields
Installation
$ composer require bburnichon/bbn-security-bundle:@dev
Then add the following to your AppKernel
$bundles = array( new BBn\SecurityBundle\BBnSecurityBundle(), );
Running the Tests
$ php bin/phpunit
License
bbn-security-bundle is released under the MIT License. See the bundled LICENSE file for details.