PHPackages                             tumainimosha/token-helper - 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. tumainimosha/token-helper

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

tumainimosha/token-helper
=========================

Your Package Description here

0.1.0(6y ago)1634MITPHPPHP ^7.3

Since Aug 7Pushed 6y ago1 watchersCompare

[ Source](https://github.com/tumainimosha/token-helper)[ Packagist](https://packagist.org/packages/tumainimosha/token-helper)[ RSS](/packages/tumainimosha-token-helper/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

Token Helper
============

[](#token-helper)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)![Travis](https://camo.githubusercontent.com/bf50e60b4e14ac24d90a692664dc6bd9fa9b715e972b69bd056b684c21545596/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f74756d61696e696d6f7368612f746f6b656e2d68656c7065722e7376673f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/aa7ef2407dc82c93209c08961f56ed8d744fc91d71be24cb9e4f30b6ac2f5dc2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74756d61696e696d6f7368612f746f6b656e2d68656c7065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tumainimosha/token-helper)

Install
-------

[](#install)

`composer require tumainimosha/token-helper`

Usage
-----

[](#usage)

```
use Tumainimosha\TokenHelper\TokenHelper;

// Generating jwt token. jwt is base64 encoded string
$jwt_string = (new TokenHelper)->getToken([
        'terminal_id' => $terminal->id,
        'token_id' => $tokenModel->id,
    ], 60 * 24 * 365 * 5);

// validating jwt token
$helper = new TokenHelper;
$status = $helper->validateToken($jwt_string);

if ($status === $helper::OK) {
   //handle success case
}

elseif ($status === $helper::EXPIRED) {
    //handle success case
}

else {
    // handle invalid token
}
```

Testing
-------

[](#testing)

@TODO

```
vendor/bin/phpunit
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](/LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2472d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/tumainimosha-token-helper/health.svg)

```
[![Health](https://phpackages.com/badges/tumainimosha-token-helper/health.svg)](https://phpackages.com/packages/tumainimosha-token-helper)
```

###  Alternatives

[wallabag/wallabag

open source self hostable read-it-later web application

12.6k2.2k](/packages/wallabag-wallabag)[psr7-sessions/storageless

Storageless PSR-7 Session support

652373.0k8](/packages/psr7-sessions-storageless)[mvanduijker/laravel-mercure-broadcaster

Mercure broadcaster

16866.5k](/packages/mvanduijker-laravel-mercure-broadcaster)[oat-sa/lib-lti1p3-core

OAT LTI 1.3 Core Library

36341.9k10](/packages/oat-sa-lib-lti1p3-core)[shopware/app-php-sdk

Shopware App SDK for PHP

1577.8k1](/packages/shopware-app-php-sdk)

PHPackages © 2026

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