diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-05-16 12:39:00 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-05-22 14:26:13 +0200 |
commit | 46aafe4f11e971e442baa3283906878ef5dae856 (patch) | |
tree | 662f8d10c88163b6cec9f70a79cf1b14a6f242fa /lib/private/Authentication/Token/DefaultToken.php | |
parent | 8fcb7d4334526a30164db1d0c45b89f9f38614bd (diff) | |
download | nextcloud-server-46aafe4f11e971e442baa3283906878ef5dae856.tar.gz nextcloud-server-46aafe4f11e971e442baa3283906878ef5dae856.zip |
Certain tokens can expire
However due to the nature of what we store in the token (encrypted
passwords etc). We can't just delete the tokens because that would make
the oauth refresh useless.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Authentication/Token/DefaultToken.php')
-rw-r--r-- | lib/private/Authentication/Token/DefaultToken.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/private/Authentication/Token/DefaultToken.php b/lib/private/Authentication/Token/DefaultToken.php index 52dd6644d2e..f41d0b8b7c4 100644 --- a/lib/private/Authentication/Token/DefaultToken.php +++ b/lib/private/Authentication/Token/DefaultToken.php @@ -91,10 +91,15 @@ class DefaultToken extends Entity implements IToken { */ protected $scope; + /** @var int */ + protected $expires; + public function __construct() { $this->addType('type', 'int'); $this->addType('lastActivity', 'int'); $this->addType('lastCheck', 'int'); + $this->addType('scope', 'string'); + $this->addType('expires', 'int'); } public function getId() { @@ -180,4 +185,15 @@ class DefaultToken extends Entity implements IToken { public function setPassword($password = null) { parent::setPassword($password); } + + public function setExpires($expires) { + parent::setExpires($expires); + } + + /** + * @return int|null + */ + public function getExpires() { + return parent::getExpires(); + } } |