Page MenuHomePhorge

PhabricatorOAuthServerAccessToken.php
No OneTemporary

Size
870 B
Referenced Files
None
Subscribers
None

PhabricatorOAuthServerAccessToken.php

<?php
final class PhabricatorOAuthServerAccessToken
extends PhabricatorOAuthServerDAO {
protected $id;
protected $token;
protected $userPHID;
protected $clientPHID;
protected function getConfiguration() {
return array(
self::CONFIG_COLUMN_SCHEMA => array(
'token' => 'text32',
),
self::CONFIG_KEY_SCHEMA => array(
'token' => array(
'columns' => array('token'),
'unique' => true,
),
),
) + parent::getConfiguration();
}
public function isExpired() {
$now = PhabricatorTime::getNow();
$expires_epoch = $this->getExpiresEpoch();
return ($now > $expires_epoch);
}
public function getExpiresEpoch() {
return $this->getDateCreated() + 3600;
}
public function getExpiresDuration() {
return PhabricatorTime::getNow() - $this->getExpiresEpoch();
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Jun 18, 8:35 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
238969
Default Alt Text
PhabricatorOAuthServerAccessToken.php (870 B)

Event Timeline