From b87488b1a0e85e2f951ba841d5fce524d1945439 Mon Sep 17 00:00:00 2001 From: rrd108 Date: Sat, 8 Apr 2023 18:56:41 +0200 Subject: [PATCH] check if option is set --- .../Authenticator/ProvisoryTokenAuthenticator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Authentication/Authenticator/ProvisoryTokenAuthenticator.php b/src/Authentication/Authenticator/ProvisoryTokenAuthenticator.php index cf56991..11cc752 100644 --- a/src/Authentication/Authenticator/ProvisoryTokenAuthenticator.php +++ b/src/Authentication/Authenticator/ProvisoryTokenAuthenticator.php @@ -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'); }