You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
1.2 KiB
PHTML
15 lines
1.2 KiB
PHTML
5 years ago
|
<?php
|
||
|
|
||
|
$secret = 'v3Oi3425I83g3x1rNqQ45l43sM9z4Xj3Q2e92q9b';
|
||
|
$jwt = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzIiwianRpIjoiNGQxOGY3NzRkZjQxYTBjZTYyMjIzMDRhN2E5NmFkMTkyZDA5ODBlNDMwZDQxZDZkMjhjMjAwZjkwOTNkODgwMjViMTU4NDNiNTViMTU5ZmQiLCJpYXQiOjE1ODI2MTcwODIsIm5iZiI6MTU4MjYxNzA4MiwiZXhwIjoxNjE0MjM5NDgxLCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.OdKZ05R3QIf1meId6DW8qIRRMB_Irh8feiv6synP0vldOi62FMfTFLPCe1J2UafjU9zT2JZZhQC-9mIuObDvUZB8znYnaCeTgu_XwuzNz41ICm8duDeVDv_tR_mQHA3kzu_-qJ1fhKWTxEIhf1VblMhnvy49hbcSEBOjGp1Wy0rjTcVRBJRZ1QWxG9G8NBsq2ryNyENOhk3VrKPR1CY9Uw7pRw96iuALkeoMNvqH07L7M4zMzYLu1S_eo_wPHCIhru4OlKbPGlBVffykgbhnKD-HGeEJZes8oMUnIUhkDqEUj_taF2-onS-ivRwBFaTlbabk2AgR0XWzbczOCgRJnKxhXeKKOpq5UAjNreB7qgpJHuRsTn1QA_V6Wq7pHELm-Y0UYGathvaSbG3NKXKdyg0Lhaa0YIbOkEp5oria-FqANkTBDAXHOq-t8HKbXOAYYY-OyrPHO-G44lM_agD_SxaI0OAEXCOAMX5pkR2OaBaPbkjz43Cv-h9AcGN4FVlCFLFnSC1IFpFYgKKnUbONAVvPANpgO513YRTnDE2tAmP29suPWSY3vBEwcT5THWPYgFiGRHIwgrY_fEgGH3mDnFQqiEKSKeTBW94rDJ6NPI1YCQ7PnuzYyA25Uro7YhB05SnjVTkhlR-f5HAkXNFjTGjF-hxIkN0I4EoXYSMFz8c';
|
||
|
|
||
|
$jwtParts = explode('.', $jwt);
|
||
|
|
||
|
$header = json_decode(base64_decode($jwtParts[0]));
|
||
|
$payload = json_decode(base64_decode($jwtParts[1]));
|
||
|
$signature = base64_decode($jwtParts[2]);
|
||
|
|
||
|
var_dump($header);
|
||
|
var_dump($payload);
|
||
|
//var_dump($signature == );
|