PHPackages                             magroski/wt - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. magroski/wt

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

magroski/wt
===========

A library to quickly encode/decode web tokens

v1.0.3(3y ago)04.1k↓50%MITPHPPHP ^7.1 || ^8

Since May 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/magroski/wt)[ Packagist](https://packagist.org/packages/magroski/wt)[ RSS](/packages/magroski-wt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (5)Used By (0)

WT
==

[](#wt)

[![Latest Stable Version](https://camo.githubusercontent.com/b34afe7d34d77c5f4fc4118598d11c0d97cd9061bd34008255701999b1cb8780/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6167726f736b692f77742e7376673f7374796c653d666c6174)](https://packagist.org/packages/magroski/wt)[![Minimum PHP Version](https://camo.githubusercontent.com/7a09b828563f7738e2e72ec4aade8144538bf5d41e1e2e718815c57e3416089f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e7376673f7374796c653d666c6174)](https://php.net/)[![CircleCI](https://camo.githubusercontent.com/97a7ca9972b4abe0421e874472824b76d048d1850d0c1346d4bf2d08c242a594/68747470733a2f2f636972636c6563692e636f6d2f67682f6d6167726f736b692f77742e7376673f7374796c653d736869656c64)](https://circleci.com/gh/magroski/wt)[![GitHub license](https://camo.githubusercontent.com/f48f8d6cf609f5b181b9c3218a85175fe8a5809c7ea400347f39697a5d55065d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c6174)](https://github.com/magroski/wt/blob/master/LICENSE)

This library provides a quick and simple way to encode/decode WebTokens.

Usage examples
--------------

[](#usage-examples)

```
# Passing the key on the constructor
$wt = new WT('AES-256-CBC', 'abcdefgh', 'potato');

$object = new \stdClass();
$token = $wt->encode($object);

$decoded = $wt->decode($token);

# Passing the key during encode/decode
$wt = new WT('AES-256-CBC', 'xkfo39sp');

$object = new \stdClass();
$token = $wt->encode($object, 'potato');

$decoded = $wt->decode($token, 'potato');
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Every ~430 days

Total

4

Last Release

1266d ago

PHP version history (2 changes)v1.0.0PHP ^7.1

v1.0.3PHP ^7.1 || ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/7de9d1243823f8924284bcd592f89b99c2e1c010e2388a14f435efc0abc1ed33?d=identicon)[magroski](/maintainers/magroski)

---

Top Contributors

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

---

Tags

jwtWTWeb Token

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/magroski-wt/health.svg)

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

###  Alternatives

[firebase/php-jwt

A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.

9.8k445.7M2.1k](/packages/firebase-php-jwt)[lcobucci/jwt

A simple library to work with JSON Web Token and JSON Web Signature

7.5k316.6M895](/packages/lcobucci-jwt)[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[web-token/jwt-framework

JSON Object Signing and Encryption library for PHP and Symfony Bundle.

94818.9M77](/packages/web-token-jwt-framework)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)

PHPackages © 2026

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