AccessToken.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\OAuth2\Db;
  7. use OCP\AppFramework\Db\Entity;
  8. /**
  9. * @method int getTokenId()
  10. * @method void setTokenId(int $identifier)
  11. * @method int getClientId()
  12. * @method void setClientId(int $identifier)
  13. * @method string getEncryptedToken()
  14. * @method void setEncryptedToken(string $token)
  15. * @method string getHashedCode()
  16. * @method void setHashedCode(string $token)
  17. * @method int getCodeCreatedAt()
  18. * @method void setCodeCreatedAt(int $createdAt)
  19. * @method int getTokenCount()
  20. * @method void setTokenCount(int $tokenCount)
  21. */
  22. class AccessToken extends Entity {
  23. /** @var int */
  24. protected $tokenId;
  25. /** @var int */
  26. protected $clientId;
  27. /** @var string */
  28. protected $hashedCode;
  29. /** @var string */
  30. protected $encryptedToken;
  31. /** @var int */
  32. protected $codeCreatedAt;
  33. /** @var int */
  34. protected $tokenCount;
  35. public function __construct() {
  36. $this->addType('id', 'int');
  37. $this->addType('tokenId', 'int');
  38. $this->addType('clientId', 'int');
  39. $this->addType('hashedCode', 'string');
  40. $this->addType('encryptedToken', 'string');
  41. $this->addType('codeCreatedAt', 'int');
  42. $this->addType('tokenCount', 'int');
  43. }
  44. }