Files
phabricator/src/applications/auth/exception/PhabricatorAuthHighSecurityRequiredException.php
epriestley a017a8e02b Make two-factor auth actually work
Summary:
Ref T4398. Allows auth factors to render and validate when prompted to take a hi-sec action.

This has a whole lot of rough edges still (see D8875) but does fundamentally work correctly.

Test Plan:
  - Added two different TOTP factors to my account for EXTRA SECURITY.
  - Took hisec actions with no auth factors, and with attached auth factors.
  - Hit all the error/failure states of the hisec entry process.
  - Verified hisec failures appear in activity logs.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4398

Differential Revision: https://secure.phabricator.com/D8886
2014-04-28 10:20:54 -07:00

38 lines
802 B
PHP

<?php
final class PhabricatorAuthHighSecurityRequiredException extends Exception {
private $cancelURI;
private $factors;
private $factorValidationResults;
public function setFactorValidationResults(array $results) {
$this->factorValidationResults = $results;
return $this;
}
public function getFactorValidationResults() {
return $this->factorValidationResults;
}
public function setFactors(array $factors) {
assert_instances_of($factors, 'PhabricatorAuthFactorConfig');
$this->factors = $factors;
return $this;
}
public function getFactors() {
return $this->factors;
}
public function setCancelURI($cancel_uri) {
$this->cancelURI = $cancel_uri;
return $this;
}
public function getCancelURI() {
return $this->cancelURI;
}
}