|
@@ 32-33 (lines=2) @@
|
| 29 |
|
|
| 30 |
|
list($encoded_header, $encoded_payload, $client_sig) = explode('.', $jwt); |
| 31 |
|
|
| 32 |
|
if (null === ($payload = json_decode(base64_decode(strtr($encoded_payload, '-_', '+/'))))) |
| 33 |
|
throw new \Exception('Invalid encoding'); |
| 34 |
|
|
| 35 |
|
|
| 36 |
|
if ($verify) { |
|
@@ 37-38 (lines=2) @@
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
if ($verify) { |
| 37 |
|
if (null === ($header = json_decode(base64_decode(strtr($encoded_header, '-_', '+/'))))) |
| 38 |
|
throw new \Exception('Invalid encoding'); |
| 39 |
|
|
| 40 |
|
if (empty($header->alg)) throw new \Exception('Invalid encoding'); |
| 41 |
|
|