Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.6 KB

README.md

File metadata and controls

50 lines (32 loc) · 1.6 KB

JWX

Packagist License FOSSA Status

Implementation:

Encode

<?php

$jwt = new \SocialConnect\JWX\JWT([
    'uid' => 5,
]);

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

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

Decode

<?php

$decodeOptions = new \SocialConnect\JWX\DecodeOptions(['HS256']);
$token = \SocialConnect\JWX\JWT::decode('TEST', $token, $decodeOptions);

var_dump($token);

License

This project is open-sourced software licensed under the MIT License.

See the LICENSE file for more information.

FOSSA Status