summaryrefslogtreecommitdiffstats
path: root/Authentication
diff options
context:
space:
mode:
authorThibaud Fabre <aztech-dev@users.noreply.github.com>2015-05-19 12:39:00 +0200
committerThibaud Fabre <aztech-dev@users.noreply.github.com>2015-05-19 12:39:00 +0200
commitd089a3a9255425d3cc3fbc13ed29a31ae997c2f5 (patch)
tree855e47f43fe85d165737074f7f614bba9a969053 /Authentication
parentf68efb87855220b9c13bdcd56a90840be0b8ba9e (diff)
downloadphp-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.php2
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 {