1 | <?php |
||
3 | class MyWrapper |
||
4 | { |
||
5 | /** |
||
6 | * Note --> Secret key must be stored at server side. Never Share this to the client HTML |
||
7 | * |
||
8 | * @return \ByJG\Util\JwtWrapper |
||
9 | * @throws \ByJG\Util\JwtWrapperException |
||
10 | */ |
||
11 | public static function getWrapper() |
||
12 | { |
||
13 | $server = "example.com"; |
||
14 | $secret = new \ByJG\Util\JwtKeySecret(base64_encode("secrect_key_for_test")); |
||
15 | |||
16 | $jwtWrapper = new \ByJG\Util\JwtWrapper($server, $secret); |
||
17 | |||
18 | return $jwtWrapper; |
||
19 | } |
||
20 | |||
21 | } |
||
22 | |||
23 |