PHP Classes

File: test/index.php

Recommend this page to a friend!
  Classes of Boss Ibrahim Mussa   PHP JWT Decode and Generate   test/index.php   Download  
File: test/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP JWT Decode and Generate
Generate JWT tokens and decode token values
Author: By
Last change:
Date: 1 year ago
Size: 367 bytes
 

Contents

Class file image Download
<?php
use Wepesi\App\JWT;
$data = [
"data" => "hello worl",
"expired" => 3600
];
$token = "4edc3e02a3ccf20c213131efa271b79b.vJjR1CIHHdfiCj4Tt+weTtnAZ7PVQw7e1eeQtdT3/qWY43pZH91r9mO92UhXrJB2NGoSv10j.c2f8ab9f30e19e14d47a6491ca77fe36";
$tken = new JWT();
$token = $tken->generate($data);
// var_dump($token);
// echo "\n\n";

$dec = $tken->decode($token);
var_dump($dec);