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) |
||
89 | |||
90 | /** |
||
91 | * @param string $data |
||
92 | * @param array $keys |
||
93 | * @throws InvalidJWT |
||
94 | */ |
||
95 | protected function validate($data, array $keys) |
||
110 | |||
111 | /** |
||
112 | * @param array $keys |
||
113 | * @param string $kid |
||
114 | * @return JWK |
||
115 | * @throws \RuntimeException |
||
116 | */ |
||
117 | protected function findKeyByKind(array $keys, $kid) |
||
127 | |||
128 | /** |
||
129 | * @return bool |
||
130 | * @throws \RuntimeException |
||
131 | * @throws \SocialConnect\OpenIDConnect\Exception\UnsupportedSignatureAlgoritm |
||
132 | */ |
||
133 | protected function verifySignature($data, array $keys) |
||
161 | } |
||
162 |
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..