diff options
author | Thibaud Fabre <aztech-dev@users.noreply.github.com> | 2015-05-19 12:39:00 +0200 |
---|---|---|
committer | Thibaud Fabre <aztech-dev@users.noreply.github.com> | 2015-05-19 12:39:00 +0200 |
commit | d089a3a9255425d3cc3fbc13ed29a31ae997c2f5 (patch) | |
tree | 855e47f43fe85d165737074f7f614bba9a969053 /Authentication | |
parent | f68efb87855220b9c13bdcd56a90840be0b8ba9e (diff) | |
download | php-jwt-d089a3a9255425d3cc3fbc13ed29a31ae997c2f5.zip php-jwt-d089a3a9255425d3cc3fbc13ed29a31ae997c2f5.tar.gz php-jwt-d089a3a9255425d3cc3fbc13ed29a31ae997c2f5.tar.bz2 |
Allow using \ArrayAccess as $key in decode
Diffstat (limited to 'Authentication')
-rw-r--r-- | Authentication/JWT.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Authentication/JWT.php b/Authentication/JWT.php index e65dc50..7d6665b 100644 --- a/Authentication/JWT.php +++ b/Authentication/JWT.php @@ -73,7 +73,7 @@ class JWT if (!is_array($allowed_algs) || !in_array($header->alg, $allowed_algs)) { throw new DomainException('Algorithm not allowed'); } - if (is_array($key)) { + if (is_array($key) || $key instanceof \ArrayAccess) { if (isset($header->kid)) { $key = $key[$header->kid]; } else { |