Skip to content

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

License

Notifications You must be signed in to change notification settings

SocialConnect/jwx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages