We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd6c1f6 commit 79a3892Copy full SHA for 79a3892
decode-json-pure.php
@@ -0,0 +1,12 @@
1
+<?php
2
+// https://github.com/BaseMax/php-jwt-example
3
+require 'vendor/autoload.php';
4
+use \Firebase\JWT\JWT;
5
+use \Firebase\JWT\SignatureInvalidException;
6
+$key = '83aeee518617ad6f3393bf0685e37d3e';
7
+
8
+// JSON
9
+$token='eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdGF0dXMiOiJzdWNjZXNzIiwiZGF0YTEiOiJ0ZXN0MSIsImRhdGEyIjoidGVzdDIiLCJkYXRhMyI6InRlc3QzIiwiZGF0YTQiOiJ0ZXN0NCIsImRhdGE1IjoidGVzdDUifQ.nOa6tq6bDCiURP2GpTehux3geHiNiqQKJXaZ0M_uJ0WD0yTmKM66LS23fCAMraem58HWnmlX4V4WB7-eTfFpbQ';
10
+$decode = JWT::decode($token, $key, array('HS512'));
11
+print_r($decode);
12
+print "\n";
0 commit comments