PHPackages                             iweron/aws-kms-jwt - 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. iweron/aws-kms-jwt

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

iweron/aws-kms-jwt
==================

JWT token generation using symmetric encryption with AWS KMS

v2.1.0(2y ago)26.1k↓50%MITPHPPHP &gt;=7.0

Since Sep 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Yunoo/php-aws-kms-jwt)[ Packagist](https://packagist.org/packages/iweron/aws-kms-jwt)[ RSS](/packages/iweron-aws-kms-jwt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (0)

PHP JWT token generator using AWS KMS for encryption
====================================================

[](#php-jwt-token-generator-using-aws-kms-for-encryption)

### About AWS KMS JWT

[](#about-aws-kms-jwt)

- Utilizes AWS KMS data keys for JWT generation using an envelope encryption method.
- Supports PHP &gt;=5.3 (excluding GCM and CCM cipher algorithms)

### Installing via Composer

[](#installing-via-composer)

You can install AWS KMS JWT using [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php

# Add it as a dependency
php composer.phar require iweron/aws-kms-jwt
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

Before using this lib, you will need to issue a spare AWS KMS master key. Check this article to figure out how to create one You can check an `examples` directory to get more info on usage.

### Envelope encryption

[](#envelope-encryption)

This lib implements envelope encryption with symmetric keys based on AWS KMS initially proposed by [Latacora](https://latacora.micro.blog/).

[![Envelope encryptuon](https://camo.githubusercontent.com/d4a59dec92bcc421a7836360e09fd11a8ac27253f4d2a1231e0e63b092bf254f/68747470733a2f2f64333377756272666b69306c36382e636c6f756466726f6e742e6e65742f333236393165373938326430333665666233613030633337396630613833316439333239653836662f33633335322f6173736574732d6a656b796c6c2f626c6f672f7468652d686172646573742d7468696e672d61626f75742d646174612d656e6372797074696f6e2f73796d6d65747269632d656e6372797074696f6e2d626573742d7072616374696365732d343931623638386230666536643532313565326339623136313539613665646439333536663763646632623633656162356138356337626535386662623335612e706e67)](https://camo.githubusercontent.com/d4a59dec92bcc421a7836360e09fd11a8ac27253f4d2a1231e0e63b092bf254f/68747470733a2f2f64333377756272666b69306c36382e636c6f756466726f6e742e6e65742f333236393165373938326430333665666233613030633337396630613833316439333239653836662f33633335322f6173736574732d6a656b796c6c2f626c6f672f7468652d686172646573742d7468696e672d61626f75742d646174612d656e6372797074696f6e2f73796d6d65747269632d656e6372797074696f6e2d626573742d7072616374696365732d343931623638386230666536643532313565326339623136313539613665646439333536663763646632623633656162356138356337626535386662623335612e706e67)

*NB!* This repo does not have the code for token verification/decryption. You might need to implement it yourself as it is shown in the following diagram: [![Envelope decryption](https://camo.githubusercontent.com/c3625571985e6e68964f4f3acd809d1479d4cdb79dd29fa49ccdda1bedcc67f6/68747470733a2f2f64333377756272666b69306c36382e636c6f756466726f6e742e6e65742f616434353131663830623230303836333633616164363239616261363961613734643137363231662f34353332332f6173736574732d6a656b796c6c2f626c6f672f7468652d686172646573742d7468696e672d61626f75742d646174612d656e6372797074696f6e2f73796d6d65747269632d64656372797074696f6e2d626573742d7072616374696365732d336161666530643839383032616231393239383564326433306466356436653637336633396166663534386565303961356538373035393630366337393362652e706e67)](https://camo.githubusercontent.com/c3625571985e6e68964f4f3acd809d1479d4cdb79dd29fa49ccdda1bedcc67f6/68747470733a2f2f64333377756272666b69306c36382e636c6f756466726f6e742e6e65742f616434353131663830623230303836333633616164363239616261363961613734643137363231662f34353332332f6173736574732d6a656b796c6c2f626c6f672f7468652d686172646573742d7468696e672d61626f75742d646174612d656e6372797074696f6e2f73796d6d65747269632d64656372797074696f6e2d626573742d7072616374696365732d336161666530643839383032616231393239383564326433306466356436653637336633396166663534386565303961356538373035393630366337393362652e706e67)

Reference:

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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 ~175 days

Recently: every ~261 days

Total

7

Last Release

996d ago

Major Versions

v1.1.1 → v2.0.02023-07-21

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.3

v2.0.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/81288bb733db9c5ef63ad99c3fe5beb7854af2e5bc3ff32228e5c025f22554f6?d=identicon)[iweron](/maintainers/iweron)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/iweron-aws-kms-jwt/health.svg)

```
[![Health](https://phpackages.com/badges/iweron-aws-kms-jwt/health.svg)](https://phpackages.com/packages/iweron-aws-kms-jwt)
```

###  Alternatives

[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[pmill/aws-cognito

A PHP client for AWS Cognito user pools

74266.0k3](/packages/pmill-aws-cognito)

PHPackages © 2026

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