Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/storage/PhabricatorAuthFactorConfig.php
<?php | <?php | ||||
final class PhabricatorAuthFactorConfig extends PhabricatorAuthDAO { | final class PhabricatorAuthFactorConfig extends PhabricatorAuthDAO { | ||||
protected $userPHID; | protected $userPHID; | ||||
protected $factorKey; | protected $factorKey; | ||||
protected $factorName; | protected $factorName; | ||||
protected $factorSecret; | protected $factorSecret; | ||||
protected $properties = array(); | protected $properties = array(); | ||||
private $sessionEngine; | |||||
protected function getConfiguration() { | protected function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
'properties' => self::SERIALIZATION_JSON, | 'properties' => self::SERIALIZATION_JSON, | ||||
), | ), | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
'factorKey' => 'text64', | 'factorKey' => 'text64', | ||||
Show All 25 Lines | if (!$impl) { | ||||
'Attempting to operate on multi-factor auth which has no '. | 'Attempting to operate on multi-factor auth which has no '. | ||||
'corresponding implementation (factor key is "%s").', | 'corresponding implementation (factor key is "%s").', | ||||
$this->getFactorKey())); | $this->getFactorKey())); | ||||
} | } | ||||
return $impl; | return $impl; | ||||
} | } | ||||
public function setSessionEngine(PhabricatorAuthSessionEngine $engine) { | |||||
$this->sessionEngine = $engine; | |||||
return $this; | |||||
} | |||||
public function getSessionEngine() { | |||||
if (!$this->sessionEngine) { | |||||
throw new PhutilInvalidStateException('setSessionEngine'); | |||||
} | |||||
return $this->sessionEngine; | |||||
} | |||||
} | } |