summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Authentication/Token/DefaultTokenProvider.php2
-rw-r--r--lib/private/Authentication/Token/PublicKeyTokenProvider.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php
index 8c2d8c33a97..ad45303fa7c 100644
--- a/lib/private/Authentication/Token/DefaultTokenProvider.php
+++ b/lib/private/Authentication/Token/DefaultTokenProvider.php
@@ -184,7 +184,7 @@ class DefaultTokenProvider 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);
}
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);
}