nixklai/envelopes

There is no license information available for the latest version (dev-master) of this package.

Wrapper classes for JSON web token

dev-master 2020-09-19 07:40 UTC

This package is auto-updated.

Last update: 2024-04-19 15:28:49 UTC


README

Why Envelop?

It is because I am lazy, and working with JWT (JWS and JWE) is somewhat challenging.

How?

How to make a JSON Web Signature token?

Just create a ClearEnvelop reader

use Envelopes\Sealers\ClearEnvelop;

$envelop = new ClearEnvelop();
$envelop->setIssuer('Alice')
        ->setAudience('Bob')
        ->setExpireIn(60) // Expire in next 60 seconds
        ->setJWTID(time());

echo $envelop->seal(); // Seal up the envelop and done!