ibrows/hmac-bundle
最新稳定版本:1.0.0
Composer 安装命令:
composer require ibrows/hmac-bundle
包简介
Symfony HMAC Bundle adds a SecurityListenerFactor which provide a hmac authentication for configured firewall
README 文档
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
AppKernelclass// 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']
统计信息
- 总下载量: 1.41k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-01