PHPackages                             prowebcraft/php-request-signature - 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. [Security](/categories/security)
4. /
5. prowebcraft/php-request-signature

ActiveLibrary[Security](/categories/security)

prowebcraft/php-request-signature
=================================

Sign and check requests

01.5kPHP

Since Nov 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/prowebcraft/php-request-signature)[ Packagist](https://packagist.org/packages/prowebcraft/php-request-signature)[ RSS](/packages/prowebcraft-php-request-signature/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-request-signature
=====================

[](#php-request-signature)

Sign and check requests

### Usage examples

[](#usage-examples)

To sign your request create signature instance

#### Signing request

[](#signing-request)

```
// Creating a signer
$signer = new \Prowebcraft\Signature('SECRET_SALT');
// Create signature with path and/or request payload
$apiPath = '/api/login';
$payload = [
    'user' => "Elon Musk",
    'password' => 'mars2050'
];
$signature = $signer->sign($apiPath, $payload);
// Pass signature with Header or in payload
$payload['signature'] = $signature;
// Make request
```

#### Validating incoming request

[](#validating-incoming-request)

```
// Creating a signer checker
$signer = new \Prowebcraft\Signature('SECRET_SALT');

// Take request path
$path = $_SERVER['REQUEST_URI'];
// Collect request payload (can be simple POST or JSON Data)
$payload = $_POST ?: json_decode(file_get_contents('php://input'), true);

// Check signature
$signature = $_SERVER['HTTP_SIGNATURE'] ?? $payload['signature'] ?? false;
if (!$signature) {
    throw new RuntimeException('Invaders must die');
}

// Validate integrity of request
if (!$signer->check($signature, $path, $payload)) {
    throw new RuntimeException('Invalid signature');
}
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4133348?v=4)[Andrei Mistulov](/maintainers/prowebcraft)[@prowebcraft](https://github.com/prowebcraft)

---

Top Contributors

[![prowebcraft](https://avatars.githubusercontent.com/u/4133348?v=4)](https://github.com/prowebcraft "prowebcraft (4 commits)")

### Embed Badge

![Health badge](/badges/prowebcraft-php-request-signature/health.svg)

```
[![Health](https://phpackages.com/badges/prowebcraft-php-request-signature/health.svg)](https://phpackages.com/packages/prowebcraft-php-request-signature)
```

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.0M134](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24772.0k35](/packages/paragonie-ecc)[fof/recaptcha

Increase your forum's security with Google reCAPTCHA

1436.9k](/packages/fof-recaptcha)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
