ibrows / hmac-bundle
Symfony HMAC Bundle adds a SecurityListenerFactor which provide a hmac authentication for configured firewall
Installs: 1 410
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- acquia/http-hmac-php: ~1.0
- symfony/framework-bundle: ~2.7
- symfony/security-bundle: ~2.7
Requires (Dev)
- phpunit/phpunit: ~4.0
- symfony/browser-kit: ~2.7
This package is auto-updated.
Last update: 2024-11-15 19:39:56 UTC
README
Ibrows HMAC Bundle adds a SecurityListenerFactor which provide a hmac authentication for configured firewall This is a recommend way to sign and verify RESTful Web API requests
Install & setup the bundle
-
Add IbrowsHmacBundle in your composer.json:
{ "require": { "ibrows/hmac-bundle": "~1.0", } }
-
Now tell composer to download the bundle by running the command:
$ php composer.phar update ibrows/hmac-bundle
-
Add the bundle to your
AppKernel
class// app/AppKernerl.php public function registerBundles() { $bundles = array( // ... new \Ibrows\HmacBundle\IbrowsHmacBundle(), // ... ); // ... }
-
Sample Configuration of your security.yml
security: firewalls: api: pattern: ^/api stateless: true anonymous: ~ provider: api_provider ibrows_hmac: authentication_provider_key: me access_control: - { path: ^/api/, roles: ROLE_API } encoders: Symfony\Component\Security\Core\User\User: plaintext providers: api_provider: memory: users: test: password: test roles: ['ROLE_API']