2024-03-06 13:20:38 +03:00
|
|
|
<?php
|
2024-03-09 18:57:05 +03:00
|
|
|
/**
|
|
|
|
* @package Joomla.Administrator
|
|
|
|
* @subpackage com_oauthserver
|
|
|
|
*
|
|
|
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
|
|
|
* @license MIT; see LICENSE.txt
|
|
|
|
**/
|
2024-03-06 13:20:38 +03:00
|
|
|
|
|
|
|
namespace Webmasterskaya\Component\OauthServer\Administrator\Table;
|
|
|
|
|
|
|
|
use Joomla\CMS\Table\Table;
|
|
|
|
use Joomla\Database\DatabaseDriver;
|
|
|
|
|
2024-03-09 18:57:05 +03:00
|
|
|
\defined('_JEXEC') or die;
|
|
|
|
|
2024-03-06 15:01:57 +03:00
|
|
|
/**
|
2024-03-11 00:19:41 +03:00
|
|
|
* @property int $id
|
|
|
|
* @property string $identifier
|
|
|
|
* @property \DateTimeInterface|string $expiry
|
|
|
|
* @property int|null $userId
|
|
|
|
* @property string|array $scopes
|
|
|
|
* @property int $clientId
|
|
|
|
* @property bool|int $revoked
|
2024-03-06 15:01:57 +03:00
|
|
|
*
|
|
|
|
* @since version
|
|
|
|
*/
|
|
|
|
class AccessTokenTable extends Table implements RevokedTableInterface
|
2024-03-06 13:20:38 +03:00
|
|
|
{
|
2024-03-06 15:01:57 +03:00
|
|
|
use RevokedTableTrait;
|
|
|
|
|
2024-03-06 13:20:38 +03:00
|
|
|
/**
|
|
|
|
* Indicates that columns fully support the NULL value in the database
|
|
|
|
*
|
|
|
|
* @var boolean
|
|
|
|
* @since version
|
|
|
|
*/
|
|
|
|
protected $_supportNullValue = true;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An array of key names to be json encoded in the bind function
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
* @since version
|
|
|
|
*/
|
|
|
|
protected $_jsonEncode = ['scopes'];
|
|
|
|
|
|
|
|
public function __construct(DatabaseDriver $db)
|
|
|
|
{
|
|
|
|
parent::__construct('#__webmasterskaya_oauthserver_access_tokens', 'id', $db);
|
2024-03-11 00:19:41 +03:00
|
|
|
|
|
|
|
$this->setColumnAlias('client_id', 'clientId');
|
|
|
|
$this->setColumnAlias('user_id', 'userId');
|
2024-03-06 13:20:38 +03:00
|
|
|
}
|
2024-03-09 18:57:05 +03:00
|
|
|
}
|