Joined July 2016
·

TAbraham

connecticut
·

@nifrasbcs
Here's the code:
$token = array();
$token['id'] = $id;
$SESSION["encodedScript"] = JWT::encode($token, 'secretserver_key');

Assign the entire encoded script and decode it when you call other APIs.
include('jwthelper.php');
$token = JWT::decode($
SESSION["encodedScript"], 'secretserverkey');
echo $token->id;

Achievements
1 Karma
0 Total ProTip Views
Interests & Skills