1 | <?php |
||
10 | class JWT |
||
11 | { |
||
12 | public static $algorithms = array( |
||
13 | 'HS256' => array('hash_hmac', 'SHA256'), |
||
14 | 'HS512' => array('hash_hmac', 'SHA512'), |
||
15 | 'HS384' => array('hash_hmac', 'SHA384'), |
||
16 | 'RS256' => array('openssl', OPENSSL_ALGO_SHA256), |
||
17 | 'RS384' => array('openssl', OPENSSL_ALGO_SHA384), |
||
18 | 'RS512' => array('openssl', OPENSSL_ALGO_SHA512), |
||
19 | ); |
||
20 | |||
21 | /** |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $parts; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $header; |
||
30 | |||
31 | /** |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $payload; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $signature; |
||
40 | |||
41 | /** |
||
42 | * @param string $input |
||
43 | * @return string |
||
44 | */ |
||
45 | public static function urlsafeB64Decode($input) |
||
56 | |||
57 | /** |
||
58 | * @param string $token |
||
59 | * @param array $keys |
||
60 | * @throws InvalidJWT |
||
61 | */ |
||
62 | public function __construct($token, array $keys) |
||
81 | |||
82 | /** |
||
83 | * @param string $data |
||
84 | * @param array $keys |
||
85 | * @throws InvalidJWT |
||
86 | */ |
||
87 | protected function validate($data, array $keys) |
||
102 | |||
103 | /** |
||
104 | * @param array $keys |
||
105 | * @param string $kid |
||
106 | * @return JWK |
||
107 | * @throws \RuntimeException |
||
108 | */ |
||
109 | protected function findKeyByKind(array $keys, $kid) |
||
119 | |||
120 | /** |
||
121 | * @return bool |
||
122 | */ |
||
123 | protected function verifySignature($data, array $keys) |
||
141 | } |
||
142 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..