summaryrefslogtreecommitdiff
path: root/vendor/OAuth/Common/Token/AbstractToken.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/OAuth/Common/Token/AbstractToken.php')
-rwxr-xr-xvendor/OAuth/Common/Token/AbstractToken.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/OAuth/Common/Token/AbstractToken.php b/vendor/OAuth/Common/Token/AbstractToken.php
index 8d448a18..7a362473 100755
--- a/vendor/OAuth/Common/Token/AbstractToken.php
+++ b/vendor/OAuth/Common/Token/AbstractToken.php
@@ -118,4 +118,11 @@ abstract class AbstractToken implements TokenInterface
{
$this->refreshToken = $refreshToken;
}
+
+ public function isExpired()
+ {
+ return ($this->getEndOfLife() !== TokenInterface::EOL_NEVER_EXPIRES
+ && $this->getEndOfLife() !== TokenInterface::EOL_UNKNOWN
+ && time() > $this->getEndOfLife());
+ }
}