An open API service indexing awesome lists of open source software.

https://github.com/socialconnect/jwx

⚠️ PHP library for JSON web tokens (JWT) and JWT and etc
https://github.com/socialconnect/jwx

jwt jwt-token jwx

Last synced: 11 months ago
JSON representation

⚠️ PHP library for JSON web tokens (JWT) and JWT and etc

Awesome Lists containing this project

README

          

JWX
===

[![Packagist](https://img.shields.io/packagist/v/socialconnect/jwx.svg?style=flat-square)](https://packagist.org/packages/socialconnect/jwx)
[![License](http://img.shields.io/packagist/l/SocialConnect/jwx.svg?style=flat-square)](https://github.com/SocialConnect/jwx/blob/master/LICENSE)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSocialConnect%2Fjwx.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FSocialConnect%2Fjwx?ref=badge_shield)

## [Documentation](https://socialconnect.lowl.io/jwx.html) :: [Getting Started](https://socialconnect.lowl.io/jwx.html)

Implementation:

- JWT (JSON Web Token) [RFC 7519](https://tools.ietf.org/html/rfc7519)
- JWK (JSON Web Keys) [RFC 7517](https://tools.ietf.org/html/rfc7517)
- JWKs (JSON Web Key Set) [RFC 7517](https://tools.ietf.org/html/rfc7517#section-8.4)

## Encode

```php
5,
]);

$encodeOptions = new \SocialConnect\JWX\EncodeOptions();
$encodeOptions->setExpirationTime(600);

$token = $jwt->encode('TEST', 'HS256', $encodeOptions);
var_dump($token);
```

## Decode

```php