helthe / api-security-bundle
Helthe API Security bundle for Symfony 2
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
- helthe/security-api: ~1.0
- symfony/framework-bundle: ~2.3
- symfony/security-bundle: ~2.3
This package is auto-updated.
Last update: 2024-10-29 04:14:36 UTC
README
Helthe Api Security Bundle integrates the Helthe API Security Component with your Symfony2 application.
Installation
Step 1: Add package requirement in Composer
Manually
Add the following in your composer.json
:
{ "require": { // ... "helthe/api-security-bundle": "~1.0" } }
Using the command line
$ composer require 'helthe/api-security-bundle=~1.0'
Step 2: Register the bundle in the kernel
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Helthe\Bundle\ApiSecurityBundle\HeltheApiSecurityBundle(), ); }
Usage
User Provider
The Helthe API security component provides its own UserProviderInterface
that
must implemented by the user provider supplied to the Symfony firewall using
api key authentication.
Firewall
To add api key authentication, simply add the api_key
in your firewall
configuration as shown below:
# security.yml security: firewalls: api: api_key: name: helthe-api-key method: http_header
Bugs
For bugs or feature requests, please create an issue.