Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/storage/PhabricatorAuthTemporaryToken.php
| <?php | <?php | ||||
| final class PhabricatorAuthTemporaryToken extends PhabricatorAuthDAO | final class PhabricatorAuthTemporaryToken extends PhabricatorAuthDAO | ||||
| implements PhabricatorPolicyInterface { | implements PhabricatorPolicyInterface { | ||||
| // NOTE: This is usually a PHID, but may be some other kind of resource | // NOTE: This is usually a PHID, but may be some other kind of resource | ||||
| // identifier for some token types. | // identifier for some token types. | ||||
| protected $tokenResource; | protected $tokenResource; | ||||
| protected $tokenType; | protected $tokenType; | ||||
| protected $tokenExpires; | protected $tokenExpires; | ||||
| protected $tokenCode; | protected $tokenCode; | ||||
| protected $userPHID; | protected $userPHID; | ||||
| protected $properties; | protected $properties = array(); | ||||
| private $isNew = false; | |||||
| protected function getConfiguration() { | protected function getConfiguration() { | ||||
| return array( | return array( | ||||
| self::CONFIG_TIMESTAMPS => false, | self::CONFIG_TIMESTAMPS => false, | ||||
| self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
| 'properties' => self::SERIALIZATION_JSON, | 'properties' => self::SERIALIZATION_JSON, | ||||
| ), | ), | ||||
| self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
| ▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | final class PhabricatorAuthTemporaryToken extends PhabricatorAuthDAO | ||||
| public function setShouldForceFullSession($force_full) { | public function setShouldForceFullSession($force_full) { | ||||
| return $this->setTemporaryTokenProperty('force-full-session', $force_full); | return $this->setTemporaryTokenProperty('force-full-session', $force_full); | ||||
| } | } | ||||
| public function getShouldForceFullSession() { | public function getShouldForceFullSession() { | ||||
| return $this->getTemporaryTokenProperty('force-full-session', false); | return $this->getTemporaryTokenProperty('force-full-session', false); | ||||
| } | } | ||||
| public function setIsNewTemporaryToken($is_new) { | |||||
| $this->isNew = $is_new; | |||||
| return $this; | |||||
| } | |||||
| public function getIsNewTemporaryToken() { | |||||
| return $this->isNew; | |||||
| } | |||||
| /* -( PhabricatorPolicyInterface )----------------------------------------- */ | /* -( PhabricatorPolicyInterface )----------------------------------------- */ | ||||
| public function getCapabilities() { | public function getCapabilities() { | ||||
| return array( | return array( | ||||
| PhabricatorPolicyCapability::CAN_VIEW, | PhabricatorPolicyCapability::CAN_VIEW, | ||||
| Show All 14 Lines | |||||