bburnichon/bbn-security-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Simple Api Key based Authentication bundle for Symfony2

v0.1.0 2013-10-15 17:04 UTC

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.