diff options
author | Joas Schilling <coding@schilljs.com> | 2018-09-20 09:54:27 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-09-20 09:54:27 +0200 |
commit | f258e65f1315ae0eaf15495cf9a1a809bd3847e3 (patch) | |
tree | 506ad152791315e105185a2858532f74ab746014 /lib/private/Authentication/Token | |
parent | 5e6187926f4ba81b5fe0886a37031062295dc3c1 (diff) | |
download | nextcloud-server-f258e65f1315ae0eaf15495cf9a1a809bd3847e3.tar.gz nextcloud-server-f258e65f1315ae0eaf15495cf9a1a809bd3847e3.zip |
Also adjust the expiration of PublicKeyTokenProvider
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Authentication/Token')
-rw-r--r-- | lib/private/Authentication/Token/PublicKeyTokenProvider.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php index 73bd7a711dc..fe352d29e05 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php +++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php @@ -80,7 +80,7 @@ class PublicKeyTokenProvider implements IProvider { throw new InvalidTokenException(); } - if ($token->getExpires() !== null && $token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) { + if ((int)$token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) { throw new ExpiredTokenException($token); } @@ -94,7 +94,7 @@ class PublicKeyTokenProvider implements IProvider { throw new InvalidTokenException(); } - if ($token->getExpires() !== null && $token->getExpires() < $this->time->getTime()) { + if ((int)$token->getExpires() !== 0 && $token->getExpires() < $this->time->getTime()) { throw new ExpiredTokenException($token); } |