Download the PHP package tourze/wechat-mini-program-plugin-bundle without Composer
On this page you can find all versions of the php package tourze/wechat-mini-program-plugin-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package wechat-mini-program-plugin-bundle
WeChat Mini Program Plugin Bundle
中文
A Symfony bundle for WeChat Mini Program plugin request signature verification.
Installation
Install the package via Composer:
Quick Start
-
Add the bundle to your
config/bundles.php: - The bundle will automatically register the
HostSignCheckSubscriberto verify WeChat Mini Program plugin requests.
Features
- Request Signature Verification: Automatically validates
X-WECHAT-HOSTSIGNheader - AppID Extraction: Extracts AppID from referrer URL
- Security: Ensures request authenticity using SHA1 signature verification
- Logging: Comprehensive logging for debugging and monitoring
Usage
The bundle automatically handles WeChat Mini Program plugin request verification through the HostSignCheckSubscriber. When a request contains the X-WECHAT-HOSTSIGN header, the subscriber will:
- Extract the signature data from the header
- Parse the AppID from the referrer URL
- Verify the signature using the configured plugin token
- Throw an exception if the signature is invalid
Example Request Headers
Configuration
The bundle requires the tourze/wechat-mini-program-bundle package to be properly configured with WeChat Mini Program accounts and plugin tokens.
License
This project is licensed under the MIT License - see the LICENSE file for details.
All versions of wechat-mini-program-plugin-bundle with dependencies
psr/log Version ^3|^2|^1
symfony/config Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/event-dispatcher Version ^7.3
symfony/framework-bundle Version ^7.4
symfony/http-foundation Version ^7.4
symfony/http-kernel Version ^7.3
symfony/property-access Version ^7.3
symfony/yaml Version ^7.3
tourze/bundle-dependency Version 1.*
tourze/json-rpc-core Version 2.0.*
tourze/symfony-dependency-service-loader Version 1.0.*
tourze/wechat-mini-program-bundle Version 2.0.*
yiisoft/json Version ^1.0