Download the PHP package wassafr/simple-apikey-authenticator-bundle without Composer
On this page you can find all versions of the php package wassafr/simple-apikey-authenticator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wassafr/simple-apikey-authenticator-bundle
More information about wassafr/simple-apikey-authenticator-bundle
Files in wassafr/simple-apikey-authenticator-bundle
Package simple-apikey-authenticator-bundle
Short Description Wassa Simple API Key Authenticator Bundle
License proprietary
Informations about the package simple-apikey-authenticator-bundle
WassaSimpleApiKeyAuthenticatorBundle
The WassaSimpleApiKeyAuthenticatorBundle bundle allows you to add a very simple and light way to authenticate HTTP requests with an API key. It doesn't rely on existing Symfony authentication mechanisms as they require to define some kind of user class to work.
Installation
Require the wassafr/simple-apikey-authenticator-bundle
package in your composer.json and update
your dependencies.
$ composer require wassafr/simple-apikey-authenticator-bundle
Register the bundle in app/AppKernel.php
:
To enable the configuration, edit the config.yml file as follow:
Configuration
api_key
: pretty straightforwarddefault_action
: should the bundle allow or deny access if not API key is configured, if the requested URL doesn't match any configured pattern or when no API key is providedorder
: the order the request URL will be evaluated against the configured patterns. Pay attention to this as it could lead to unwanted acess or the oppositesecured_patterns
: URL patterns that will required a valid API keyunsecured_patterns
: URL patterns that will NOT required a valid API key
Most of the time you won't need to configure both secured_patterns
and unsecured_patterns
, but who knows.