PHPackages                             tourze/json-rpc-sign-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tourze/json-rpc-sign-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

tourze/json-rpc-sign-bundle
===========================

JsonRPC签名实现

0.1.0(5mo ago)023MITPHPCI passing

Since Apr 13Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tourze/json-rpc-sign-bundle)[ Packagist](https://packagist.org/packages/tourze/json-rpc-sign-bundle)[ RSS](/packages/tourze-json-rpc-sign-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (21)Versions (5)Used By (0)

JSON-RPC Sign Bundle
====================

[](#json-rpc-sign-bundle)

[English](README.md) | [中文](README.zh-CN.md)

[![Latest Version](https://camo.githubusercontent.com/b5a8d5bd3141b62d8219386acb4a2a9e542fa01c55cb984c41109f024a01b764/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f6a736f6e2d7270632d7369676e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/json-rpc-sign-bundle)[![Total Downloads](https://camo.githubusercontent.com/48a791a9f53a48c81ce3ccb1d5296e1678075ec6bb186c2819c76827454813bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f6a736f6e2d7270632d7369676e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/json-rpc-sign-bundle)[![PHP Version](https://camo.githubusercontent.com/29e4947a0beafab605d693b1f53766a5fc3d9232624ec1326231de880a32f511/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f6a736f6e2d7270632d7369676e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/json-rpc-sign-bundle)[![License](https://camo.githubusercontent.com/f3b789928a82991dd89087a1a3035c0384c8c054f3317d23d1969755610aee12/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f746f75727a652f6a736f6e2d7270632d7369676e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/tourze/json-rpc-sign-bundle/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/0346e18af1343d739d0405776c07b83798d5bb0200e3efcfdf657e5e662f6403/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f7068702d6d6f6e6f7265706f2f63692e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/tourze/php-monorepo/actions)[![Coverage Status](https://camo.githubusercontent.com/6ce0146325478eb7cebae4cc6139b2af2c161735dd0e3c6ff6802f2c5a708179/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f7068702d6d6f6e6f7265706f3f7374796c653d666c61742d737175617265)](https://codecov.io/gh/tourze/php-monorepo)

A Symfony bundle that provides signature verification support for JSON-RPC services, inspired by Alibaba Cloud's signature design. This bundle ensures API security by validating request signatures using HMAC-SHA1 or MD5 algorithms.

Features
--------

[](#features)

- **Signature Verification**: Complete JSON-RPC request signature verification system
- **Multiple Algorithms**: Support for MD5 and HMAC-SHA1 signature algorithms
- **Attribute-based**: Simple `#[CheckSign]` attribute for method protection
- **Event-driven**: Seamless integration with Symfony's event system
- **Time Tolerance**: Configurable timestamp validation to prevent replay attacks
- **API Management**: Built-in API caller identification and validation
- **Logging**: Comprehensive logging for debugging and monitoring

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Symfony 6.4 or higher
- ext-hash extension

Installation
------------

[](#installation)

Install via Composer:

```
composer require tourze/json-rpc-sign-bundle
```

Quick Start
-----------

[](#quick-start)

### 1. Register the Bundle

[](#1-register-the-bundle)

In your `config/bundles.php`:

```
