Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/factor/PhabricatorAuthFactorResult.php
<?php | <?php | ||||
final class PhabricatorAuthFactorResult | final class PhabricatorAuthFactorResult | ||||
extends Phobject { | extends Phobject { | ||||
private $answeredChallenge; | private $answeredChallenge; | ||||
private $isWait = false; | private $isWait = false; | ||||
private $isError = false; | private $isError = false; | ||||
private $isContinue = false; | private $isContinue = false; | ||||
private $errorMessage; | private $errorMessage; | ||||
private $value; | private $value; | ||||
private $issuedChallenges = array(); | private $issuedChallenges = array(); | ||||
private $icon; | |||||
public function setAnsweredChallenge(PhabricatorAuthChallenge $challenge) { | public function setAnsweredChallenge(PhabricatorAuthChallenge $challenge) { | ||||
if (!$challenge->getIsAnsweredChallenge()) { | if (!$challenge->getIsAnsweredChallenge()) { | ||||
throw new PhutilInvalidStateException('markChallengeAsAnswered'); | throw new PhutilInvalidStateException('markChallengeAsAnswered'); | ||||
} | } | ||||
if ($challenge->getIsCompleted()) { | if ($challenge->getIsCompleted()) { | ||||
throw new Exception( | throw new Exception( | ||||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | public function setIssuedChallenges(array $issued_challenges) { | ||||
$this->issuedChallenges = $issued_challenges; | $this->issuedChallenges = $issued_challenges; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getIssuedChallenges() { | public function getIssuedChallenges() { | ||||
return $this->issuedChallenges; | return $this->issuedChallenges; | ||||
} | } | ||||
public function setIcon(PHUIIconView $icon) { | |||||
$this->icon = $icon; | |||||
return $this; | |||||
} | |||||
public function getIcon() { | |||||
return $this->icon; | |||||
} | |||||
} | } |