PHPackages                             strobotti/php-jwk - 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. strobotti/php-jwk

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

strobotti/php-jwk
=================

A small PHP library to handle JWKs (Json Web Keys)

v1.4.4(2y ago)24880.8k↓11%13[1 issues](https://github.com/Strobotti/php-jwk/issues)[1 PRs](https://github.com/Strobotti/php-jwk/pulls)6MITPHPPHP &gt;=7.3.0CI failing

Since Mar 30Pushed 2y ago3 watchersCompare

[ Source](https://github.com/Strobotti/php-jwk)[ Packagist](https://packagist.org/packages/strobotti/php-jwk)[ Docs](https://github.com/Strobotti/php-jwk)[ RSS](/packages/strobotti-php-jwk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (8)Used By (6)

php-jwk
=======

[](#php-jwk)

[![Latest Stable Version](https://camo.githubusercontent.com/28e8b1d36cdb919351943edc545b0e211600cf6a0280965c15c94578dec997fb/68747470733a2f2f706f7365722e707567782e6f72672f7374726f626f7474692f7068702d6a776b2f762f737461626c65)](https://packagist.org/packages/strobotti/php-jwk)[![coverage](https://raw.githubusercontent.com/Strobotti/php-jwk/gh-pages/.badges/master/coverage.svg)](https://raw.githubusercontent.com/Strobotti/php-jwk/gh-pages/.badges/master/coverage.svg)[![License](https://camo.githubusercontent.com/58dc5a1a625555bd8435a0d78f5f61553ea45d30c3ecc42010cf17ce2706ec8d/68747470733a2f2f706f7365722e707567782e6f72672f7374726f626f7474692f7068702d6a776b2f6c6963656e7365)](https://packagist.org/packages/strobotti/php-jwk)

A small PHP library to handle JWKs (Json Web Keys)

This library helps to create json web key sets from PEM and is also able to pull out PEMs from json web key sets.

Please note that **only RSA keys are supported at the moment!**

See [JSON Web Key RFC](https://tools.ietf.org/html/rfc7517) for reference.

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

[](#installation)

This library requires PHP version 7.3 or higher and can be installed with composer:

```
$ composer require strobotti/php-jwk
```

Example usage
-------------

[](#example-usage)

See full example [here](examples/full-flow.php).

### Create a key-object from PEM

[](#create-a-key-object-from-pem)

```
