uawdijnntqw1x1x1
IP : 216.73.216.107
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
.
/
apps
/
craft4-newsite-space
/
.
/
.
/
vendor
/
craftcms
/
cms
/
src
/
.
/
models
/
CraftIdToken.php
/
/
<?php /** * @link https://craftcms.com/ * @copyright Copyright (c) Pixel & Tonic, Inc. * @license https://craftcms.github.io/license/ */ namespace craft\models; use craft\base\Model; use DateTime; /** * Class CraftIdToken model. * * @author Pixel & Tonic, Inc. <support@pixelandtonic.com> * @since 3.0.0 */ class CraftIdToken extends Model { /** * @var int|null */ public ?int $id = null; /** * @var int|null */ public ?int $userId = null; /** * @var string|null */ public ?string $accessToken = null; /** * @var DateTime|null */ public ?DateTime $expiryDate = null; /** * @var DateTime|null */ public ?DateTime $dateCreated = null; /** * @var DateTime|null */ public ?DateTime $dateUpdated = null; /** * @var string|null */ public ?string $uid = null; /** * Has token expired. * * @return bool */ public function hasExpired(): bool { $now = new DateTime(); $expiryDate = $this->expiryDate; return $now->getTimestamp() > $expiryDate->getTimestamp(); } /** * Remaining seconds before token expiry. * * @return int */ public function getRemainingSeconds(): int { $now = new DateTime(); $expiryDate = $this->expiryDate; return $expiryDate->getTimestamp() - $now->getTimestamp(); } }
/srv/users/craft4/./apps/craft4-newsite-space/././vendor/craftcms/cms/src/./models/CraftIdToken.php