1 | <?php |
||
11 | class JWT |
||
12 | { |
||
13 | /** |
||
14 | * Map of supported algorithms |
||
15 | * |
||
16 | * @var array |
||
17 | */ |
||
18 | public static $algorithms = array( |
||
19 | // HS |
||
20 | 'HS256' => ['hash_hmac', MHASH_SHA256], |
||
21 | 'HS384' => ['hash_hmac', MHASH_SHA384], |
||
22 | 'HS512' => ['hash_hmac', MHASH_SHA512], |
||
23 | // RS |
||
24 | 'RS256' => ['openssl', OPENSSL_ALGO_SHA256], |
||
25 | 'RS384' => ['openssl', OPENSSL_ALGO_SHA384], |
||
26 | 'RS512' => ['openssl', OPENSSL_ALGO_SHA512], |
||
27 | ); |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $parts; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $header; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $payload; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $signature; |
||
48 | |||
49 | /** |
||
50 | * @param string $input |
||
51 | * @return string |
||
52 | */ |
||
53 | public static function urlsafeB64Decode($input) |
||
64 | |||
65 | /** |
||
66 | * @param string $token |
||
67 | * @param array $keys |
||
68 | * @throws InvalidJWT |
||
69 | */ |
||
70 | public function __construct($token, array $keys) |
||
103 | |||
104 | /** |
||
105 | * @param string $data |
||
106 | * @param array $keys |
||
107 | * @throws InvalidJWT |
||
108 | */ |
||
109 | protected function validate($data, array $keys) |
||
124 | |||
125 | /** |
||
126 | * @param array $keys |
||
127 | * @param string $kid |
||
128 | * @return JWK |
||
129 | * @throws \RuntimeException |
||
130 | */ |
||
131 | protected function findKeyByKind(array $keys, $kid) |
||
141 | |||
142 | /** |
||
143 | * @return bool |
||
144 | * @throws \RuntimeException |
||
145 | * @throws \SocialConnect\OpenIDConnect\Exception\UnsupportedSignatureAlgoritm |
||
146 | */ |
||
147 | protected function verifySignature($data, array $keys) |
||
197 | } |
||
198 |
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..