Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/factor/PhabricatorAuthFactor.php
Show All 39 Lines | abstract class PhabricatorAuthFactor extends Phobject { | ||||
} | } | ||||
protected function newChallenge( | protected function newChallenge( | ||||
PhabricatorAuthFactorConfig $config, | PhabricatorAuthFactorConfig $config, | ||||
PhabricatorUser $viewer) { | PhabricatorUser $viewer) { | ||||
$engine = $config->getSessionEngine(); | $engine = $config->getSessionEngine(); | ||||
return id(new PhabricatorAuthChallenge()) | return PhabricatorAuthChallenge::initializeNewChallenge() | ||||
->setUserPHID($viewer->getPHID()) | ->setUserPHID($viewer->getPHID()) | ||||
->setSessionPHID($viewer->getSession()->getPHID()) | ->setSessionPHID($viewer->getSession()->getPHID()) | ||||
->setFactorPHID($config->getPHID()) | ->setFactorPHID($config->getPHID()) | ||||
->setWorkflowKey($engine->getWorkflowKey()); | ->setWorkflowKey($engine->getWorkflowKey()); | ||||
} | } | ||||
final public function getNewIssuedChallenges( | final public function getNewIssuedChallenges( | ||||
PhabricatorAuthFactorConfig $config, | PhabricatorAuthFactorConfig $config, | ||||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |