Skip to content

A modern API signature verification system inspired by WeChat Pay v3, featuring timestamp-based replay protection and asymmetric encryption. SDK: https://github.com/mitoop/laravel-signature-sdk

Notifications You must be signed in to change notification settings

mitoop/laravel-signature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Signature

Laravel Signature is a robust and flexible package for handling API signature validation and generation. It supports multiple signing methods and can be easily extended to fit your application's needs.

Features

  • Supports RSA2048-SHA256 and HMAC-SHA256 signature methods.
  • Customizable brand prefixes for signatures.
  • Provides a flexible resolver interface for fetching application-specific configurations.
  • Easily integrates with Laravel's service container.

Installation

Install the package via Composer:

composer require mitoop/laravel-signature

Configuration

Publish the configuration file:

php artisan vendor:publish --tag=config --provider="Mitoop\\LaravelSignature\\ServiceProvider"

This will create a config/signature.php file. Customize it as needed:

return [
    'brand' => 'your_brand',
    'max_clock_offset' => 300,
    'http_timeout' => 60,
];

About

A modern API signature verification system inspired by WeChat Pay v3, featuring timestamp-based replay protection and asymmetric encryption. SDK: https://github.com/mitoop/laravel-signature-sdk

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages