Closed
Description
Disclaimer: I'm not sure if this is still relevant for 4.0
.
The current implementation of getClaim
does not allow null-values:
public function getClaim($name, $default = null)
{
if ($this->hasClaim($name)) {
return $this->claims[$name]->getValue();
}
if ($default === null) {
throw new OutOfBoundsException('Requested claim is not configured');
}
return $default;
}
Even if you specifically provide the default value:
$token->getClaim('sub', null);
OutOfBoundsException
This could be solved by simply changing this line:
if ($default === null) {
to
if (func_num_args() === 1) {