Skip to content

bburnichon/bbn-security-bundle

Repository files navigation

bbn-security-bundle Build status...

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.

About

API Key based Authentication bundle for Symfony2

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages