PHPackages                             jundayw/passport - 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. jundayw/passport

ActiveLibrary

jundayw/passport
================

A lightweight and scalable PHP API request verification and response signature extension package.

v1.1.0(4d ago)06MITPHPPHP ^8.0

Since Mar 16Pushed 4d agoCompare

[ Source](https://github.com/jundayw/laravel-passport)[ Packagist](https://packagist.org/packages/jundayw/passport)[ Docs](https://github.com/jundayw/laravel-passport)[ RSS](/packages/jundayw-passport/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

Laravel Passport
================

[](#laravel-passport)

A lightweight and scalable PHP API request verification and response signature extension package.

[![GitHub Tag](https://camo.githubusercontent.com/d24a7fa219f66aa953e7a1089e7360217d0125d6f9560206a45c92ffd6e25e37/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6a756e646179772f6c61726176656c2d70617373706f7274)](https://github.com/jundayw/laravel-passport/tags)[![Total Downloads](https://camo.githubusercontent.com/6aaf764f7d5e1190be7d7232bffeeed58a8f44b3f51c3082991864ac141cdd6c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a756e646179772f70617373706f72743f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jundayw/passport)[![Packagist Version](https://camo.githubusercontent.com/336871661071fde8c48781d93f677005a7986c0a4ae6077b5b618f301abaefa6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a756e646179772f70617373706f7274)](https://packagist.org/packages/jundayw/passport)[![Packagist PHP Version Support](https://camo.githubusercontent.com/5a0050b9e5f86bdb13be9075cb29d9d88c7f240cef9208924fd844d6c05afa53/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a756e646179772f70617373706f7274)](https://github.com/jundayw/laravel-passport)[![Packagist License](https://camo.githubusercontent.com/f92e4ec1a4f6de2099d0f0e88e6429bf7e73b6f49f799cc232d5f6d96088b8a3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a756e646179772f6c61726176656c2d70617373706f7274)](https://github.com/jundayw/laravel-passport)

 Table of Contents1. [Installation](#installation)
2. [Usage](#usage)
3. [Contributing](#contributing)
4. [Contributors](#contributors)
5. [License](#license)

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

[](#installation)

You can install the package via [Composer](https://getcomposer.org):

```
composer require jundayw/passport
```

### Publish Resources

[](#publish-resources)

Your users can also publish all publishable files defined by your package's service provider using the `--provider` flag:

```
php artisan vendor:publish --provider="Jundayw\Passport\PassportServiceProvider"
```

You may wish to publish only the configuration files:

```
php artisan vendor:publish --tag=passport-config
```

You may wish to publish only the migration files:

```
php artisan vendor:publish --tag=passport-migrations
```

### Run Migrations

[](#run-migrations)

```
php artisan migrate --path=database/migrations/2026_03_01_000000_create_passport_table.php
```

\[[back to top](#readme-top)\]

Usage
-----

[](#usage)

### Passport

[](#passport)

```
$appId     = '202603161735';
$appSecret = '2f7b50c39cb5f4cf061b0ea433634287';
```

### Verification

[](#verification)

```
use Jundayw\Passport\Facades\Passport;

$passport = Passport::payload(['foo' => 'bar']);

// $passport->payload($request->header());
// $passport->payload($request->query());
// $passport->payload($request->post());
$passport->payload(['signature' => '51864429c137b125833e8969649e8371a97b61af875ddd09366676e7df236966']);

$passport->check($appId, 'sha256', 'signature', 'hash_hmac'); // true
```

### Signature

[](#signature)

```
use Jundayw\Passport\Facades\Passport;

$passport = Passport::payload(['foo' => 'bar']);

// $passport->payload(['signature' => null]);

$passport->signature($appId, 'sha256', 'signature', 'hash_hmac'); // 51864429c137b125833e8969649e8371a97b61af875ddd09366676e7df236966
$passport->withSignature($appId, 'sha256', 'signature', 'hash_hmac')->getPayload();
// [
//     'foo'       => 'bar',
//     'signature' => '51864429c137b125833e8969649e8371a97b61af875ddd09366676e7df236966',
// ];
```

### Extended custom signature

[](#extended-custom-signature)

```
use Jundayw\Passport\Contracts\Signer;
use Jundayw\Passport\Facades\Passport;

Passport::extend('AES', function () {
    return new class implements Signer {
        public function sign(string $algo, array $data, string $secret): string
        {
            // TODO: Implement sign() method.
        }

        public function verify(string $algo, array $data, string $sign, string $secret): bool
        {
            // TODO: Implement verify() method.
        }
    };
});

$passport = Passport::payload($request->post());
$passport->check($appId, 'AES-256-CBC', 'signature', 'AES'); // bool
```

Contributing
------------

[](#contributing)

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

\[[back to top](#readme-top)\]

Contributors
------------

[](#contributors)

Thanks goes to these wonderful people:

[ ![contrib.rocks image](https://camo.githubusercontent.com/9a590eeec65fb0e955e0cecf074e0774c70c2f8e04858df4c1f78f21610bf3f4/68747470733a2f2f636f6e747269622e726f636b732f696d6167653f7265706f3d6a756e646179772f6c61726176656c2d70617373706f7274)](https://github.com/jundayw/laravel-passport/graphs/contributors)Contributions of any kind are welcome!

\[[back to top](#readme-top)\]

License
-------

[](#license)

Distributed under the MIT License (MIT). Please see [License File](https://github.com/jundayw/laravel-passport/blob/main/LICENSE) for more information.

\[[back to top](#readme-top)\]

###  Health Score

39

—

LowBetter than 87% of packages

Maintenance99

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

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.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

4d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2da9b458375a1b7972b7c4d26a5bf8f3e48db305e8805da36f253956f33c5568?d=identicon)[jundayw](/maintainers/jundayw)

---

Top Contributors

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

---

Tags

signaturepassport

### Embed Badge

![Health badge](/badges/jundayw-passport/health.svg)

```
[![Health](https://phpackages.com/badges/jundayw-passport/health.svg)](https://phpackages.com/packages/jundayw-passport)
```

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k425.4M1.1k](/packages/phpseclib-phpseclib)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k83.0M475](/packages/laravel-passport)[robrichards/xmlseclibs

A PHP library for XML Security

41176.1M104](/packages/robrichards-xmlseclibs)[standard-webhooks/standard-webhooks

Standard Webhooks - Open source tools and guidelines for sending webhooks easily, securely, and reliably

1.6k26.3k2](/packages/standard-webhooks-standard-webhooks)[ass/xmlsecurity

The XmlSecurity library is written in PHP for working with XML Encryption and Signatures

965.5M30](/packages/ass-xmlsecurity)[coderello/laravel-passport-social-grant

Social Grant for Laravel Passport

180591.3k3](/packages/coderello-laravel-passport-social-grant)

PHPackages © 2026

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