aboutsummaryrefslogtreecommitdiffstats
path: root/apps/oauth2
diff options
context:
space:
mode:
Diffstat (limited to 'apps/oauth2')
-rw-r--r--apps/oauth2/lib/Db/AccessToken.php11
-rw-r--r--apps/oauth2/lib/Db/Client.php3
2 files changed, 8 insertions, 6 deletions
diff --git a/apps/oauth2/lib/Db/AccessToken.php b/apps/oauth2/lib/Db/AccessToken.php
index 543d512e0ce..f9c0e6de51e 100644
--- a/apps/oauth2/lib/Db/AccessToken.php
+++ b/apps/oauth2/lib/Db/AccessToken.php
@@ -6,6 +6,7 @@
namespace OCA\OAuth2\Db;
use OCP\AppFramework\Db\Entity;
+use OCP\DB\Types;
/**
* @method int getTokenId()
@@ -36,12 +37,12 @@ class AccessToken extends Entity {
protected $tokenCount;
public function __construct() {
- $this->addType('id', 'int');
- $this->addType('tokenId', 'int');
- $this->addType('clientId', 'int');
+ $this->addType('id', Types::INTEGER);
+ $this->addType('tokenId', Types::INTEGER);
+ $this->addType('clientId', Types::INTEGER);
$this->addType('hashedCode', 'string');
$this->addType('encryptedToken', 'string');
- $this->addType('codeCreatedAt', 'int');
- $this->addType('tokenCount', 'int');
+ $this->addType('codeCreatedAt', Types::INTEGER);
+ $this->addType('tokenCount', Types::INTEGER);
}
}
diff --git a/apps/oauth2/lib/Db/Client.php b/apps/oauth2/lib/Db/Client.php
index c48ca4edfc0..458d85b24ab 100644
--- a/apps/oauth2/lib/Db/Client.php
+++ b/apps/oauth2/lib/Db/Client.php
@@ -6,6 +6,7 @@
namespace OCA\OAuth2\Db;
use OCP\AppFramework\Db\Entity;
+use OCP\DB\Types;
/**
* @method string getClientIdentifier()
@@ -28,7 +29,7 @@ class Client extends Entity {
protected $secret;
public function __construct() {
- $this->addType('id', 'int');
+ $this->addType('id', Types::INTEGER);
$this->addType('name', 'string');
$this->addType('redirectUri', 'string');
$this->addType('clientIdentifier', 'string');