3 final class PhabricatorAuthChallengeQuery
4 extends PhabricatorCursorPagedPolicyAwareQuery
{
10 private $challengeTTLMin;
11 private $challengeTTLMax;
13 public function withIDs(array $ids) {
18 public function withPHIDs(array $phids) {
19 $this->phids
= $phids;
23 public function withUserPHIDs(array $user_phids) {
24 $this->userPHIDs
= $user_phids;
28 public function withFactorPHIDs(array $factor_phids) {
29 $this->factorPHIDs
= $factor_phids;
33 public function withChallengeTTLBetween($challenge_min, $challenge_max) {
34 $this->challengeTTLMin
= $challenge_min;
35 $this->challengeTTLMax
= $challenge_max;
39 public function newResultObject() {
40 return new PhabricatorAuthChallenge();
43 protected function loadPage() {
44 return $this->loadStandardPage($this->newResultObject());
47 protected function buildWhereClauseParts(AphrontDatabaseConnection
$conn) {
48 $where = parent
::buildWhereClauseParts($conn);
50 if ($this->ids
!== null) {
57 if ($this->phids
!== null) {
64 if ($this->userPHIDs
!== null) {
71 if ($this->factorPHIDs
!== null) {
74 'factorPHID IN (%Ls)',
78 if ($this->challengeTTLMin
!== null) {
82 $this->challengeTTLMin
);
85 if ($this->challengeTTLMax
!== null) {
89 $this->challengeTTLMax
);
95 public function getQueryApplicationClass() {
96 return 'PhabricatorAuthApplication';