summaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication/Token/PublicKeyToken.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-06-04 09:51:13 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-06-18 22:11:55 +0200
commitdf34571d1d888e7232487664629679130fef5e5e (patch)
treed8c8028a0c4f7ba8e0f7130ca81d7620f3943ec8 /lib/private/Authentication/Token/PublicKeyToken.php
parent9e7a95fe58ee8ace0ae30ff2ebda993018542187 (diff)
downloadnextcloud-server-df34571d1d888e7232487664629679130fef5e5e.tar.gz
nextcloud-server-df34571d1d888e7232487664629679130fef5e5e.zip
Use constant for token version
And don't set the version in the constructor. That would possible cause to many updates. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Authentication/Token/PublicKeyToken.php')
-rw-r--r--lib/private/Authentication/Token/PublicKeyToken.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Authentication/Token/PublicKeyToken.php b/lib/private/Authentication/Token/PublicKeyToken.php
index 18b27075772..9d01fc9ecca 100644
--- a/lib/private/Authentication/Token/PublicKeyToken.php
+++ b/lib/private/Authentication/Token/PublicKeyToken.php
@@ -45,6 +45,8 @@ use OCP\AppFramework\Db\Entity;
*/
class PublicKeyToken extends Entity implements IToken {
+ const VERSION = 2;
+
/** @var string user UID */
protected $uid;
@@ -102,8 +104,6 @@ class PublicKeyToken extends Entity implements IToken {
$this->addType('publicKey', 'string');
$this->addType('privateKey', 'string');
$this->addType('version', 'int');
-
- $this->setVersion(2);
}
public function getId(): int {