diff options
-rw-r--r-- | src/JWT.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/JWT.php b/src/JWT.php index cb1ca7d..22a67e3 100644 --- a/src/JWT.php +++ b/src/JWT.php @@ -66,16 +66,13 @@ class JWT * @uses jsonDecode * @uses urlsafeB64Decode */ - public static function decode($jwt, $key, $allowed_algs = array()) + public static function decode($jwt, $key, array $allowed_algs = array()) { $timestamp = is_null(static::$timestamp) ? time() : static::$timestamp; if (empty($key)) { throw new InvalidArgumentException('Key may not be empty'); } - if (!is_array($allowed_algs)) { - throw new InvalidArgumentException('Algorithm not allowed'); - } $tks = explode('.', $jwt); if (count($tks) != 3) { throw new UnexpectedValueException('Wrong number of segments'); |