arthens/request-signer
Composer 安装命令:
composer require arthens/request-signer
包简介
PHP library to sign and verify requests
README 文档
README
arthens/request-signer is a PHP library to sign and validate requests.
The implementation is inspired by the AWS Rest Authentication tutorial.
Installation
Add arthens/request-signer to your composer.json.
You can also download request-signer directly, as it doesn't have any dependency.
Usage
// Use composer or import the class manually require 'vendor/autoload.php'; // Create a new Signer $signer = new \Arthens\RequestSigner\Signer('here-your-secret-key'); // Generate a new url-friendly signature $signature = $signer->sign('GET', '/news'); // Verify a signature if (!$signer->verify('here-the-signature-from-request', 'GET', '/news')) { throw new \Exception('Invalid signature'); }
统计信息
- 总下载量: 43.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-03-24