diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/JWT.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/JWT.php b/src/JWT.php index 6d30e94..8170dba 100644 --- a/src/JWT.php +++ b/src/JWT.php @@ -98,6 +98,9 @@ class JWT } if (is_array($key) || $key instanceof \ArrayAccess) { if (isset($header->kid)) { + if(!isset($key[$header->kid])) { + throw new UnexpectedValueException('"kid" not found in key map, unable to lookup correct key'); + } $key = $key[$header->kid]; } else { throw new UnexpectedValueException('"kid" empty, unable to lookup correct key'); |