Download the PHP package gremo/hmac-authentication-bundle without Composer
On this page you can find all versions of the php package gremo/hmac-authentication-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gremo/hmac-authentication-bundle
More information about gremo/hmac-authentication-bundle
Files in gremo/hmac-authentication-bundle
Package hmac-authentication-bundle
Short Description Symfony bundle adding REST HMAC HTTP authentication
License MIT
Informations about the package hmac-authentication-bundle
GremoHmacAuthenticationBundle
Symfony bundle adding REST HMAC HTTP authentication.
Installation
Register the bundle in your app/AppKernel.php
:
Configuration
Not needed.
Usage
Protect part of your application in security.yml
using the hmac
key:
How it works
The authentication manager will inspect the auth_header
header with the following pattern:
If the service label matches, the manager loads the user with <client_id>
username. The password is used to re-compute the signature, base64-enconding the hashed canonical string:
Note that both query params and headers are sorted before calculating the signature.
Consider the following configuration:
And the raw HTTP request:
The canonical string would be (note the LF where Content-MD5
should appear):
The hashed value is (plain password is bar
):
And finally the base64 encoded value (that is the signature of Authorization
header):
All versions of hmac-authentication-bundle with dependencies
symfony/framework-bundle Version ~2.3|~3.0|~4.0
symfony/security-bundle Version ~2.3|~3.0|~4.0
symfony/polyfill-php56 Version ~1.0