Skip to content

Commit

Permalink
check if option is set
Browse files Browse the repository at this point in the history
  • Loading branch information
rrd108 committed Apr 8, 2023
1 parent 666e3d5 commit b87488b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function authenticate(ServerRequestInterface $request): ResultInterface

$options = Configure::read('ApiTokenAuthenticator');

if ($options['tokenExpiration'] && $result->getData()[$options['tokenExpiration']] < FrozenTime::now()) {
if (isset($options['tokenExpiration']) && $result->getData()[$options['tokenExpiration']] < FrozenTime::now()) {
return new Result(null, 'TOKEN_EXPIRED');
}

Expand Down

0 comments on commit b87488b

Please sign in to comment.