JSON Web Token

0.1.2 2015-05-06 10:58 UTC

This package is not auto-updated.

Last update: 2024-12-21 19:26:35 UTC


README

Json Web Token

Example - Create Token

use Aviogram\JWT\JWT;

$token = JWT::encode(
    JWT::createClaimSet()->setNbf(new DateTime('NOW + 1 DAY')),
    JWT::createEncryptionList()->addHS512Key('mysecret')
);

Example - Verify Token

use Aviogram\JWT\JWT;

$claimSet = JWT::decode(
    $token
    JWT::createEncryptionList()->addHS512Key('mysecret')
);

Algorithm Support