diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-04 09:51:13 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-18 22:11:55 +0200 |
commit | df34571d1d888e7232487664629679130fef5e5e (patch) | |
tree | d8c8028a0c4f7ba8e0f7130ca81d7620f3943ec8 /lib/private/Authentication/Token/PublicKeyToken.php | |
parent | 9e7a95fe58ee8ace0ae30ff2ebda993018542187 (diff) | |
download | nextcloud-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.php | 4 |
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 { |