Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/factor/PhabricatorDuoAuthFactor.php
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | return array( | ||||
->setCredentials($credentials), | ->setCredentials($credentials), | ||||
id(new PhabricatorSelectEditField()) | id(new PhabricatorSelectEditField()) | ||||
->setLabel(pht('Duo Username')) | ->setLabel(pht('Duo Username')) | ||||
->setKey('duo.usernames') | ->setKey('duo.usernames') | ||||
->setValue($usernames) | ->setValue($usernames) | ||||
->setTransactionType($xaction_usernames) | ->setTransactionType($xaction_usernames) | ||||
->setOptions( | ->setOptions( | ||||
array( | array( | ||||
'username' => pht('Use Phabricator Username'), | 'username' => pht('Use %s Username', | ||||
PhabricatorPlatformSite::getName()), | |||||
'email' => pht('Use Primary Email Address'), | 'email' => pht('Use Primary Email Address'), | ||||
)), | )), | ||||
id(new PhabricatorSelectEditField()) | id(new PhabricatorSelectEditField()) | ||||
->setLabel(pht('Create Accounts')) | ->setLabel(pht('Create Accounts')) | ||||
->setKey('duo.enroll') | ->setKey('duo.enroll') | ||||
->setValue($enroll) | ->setValue($enroll) | ||||
->setTransactionType($xaction_enroll) | ->setTransactionType($xaction_enroll) | ||||
->setOptions( | ->setOptions( | ||||
▲ Show 20 Lines • Show All 360 Lines • ▼ Show 20 Lines | foreach ($devices as $device) { | ||||
} | } | ||||
} | } | ||||
if (!$has_push) { | if (!$has_push) { | ||||
return $this->newResult() | return $this->newResult() | ||||
->setIsError(true) | ->setIsError(true) | ||||
->setErrorMessage( | ->setErrorMessage( | ||||
pht( | pht( | ||||
'This factor has been removed from your device, so Phabricator '. | 'This factor has been removed from your device, so %s '. | ||||
'can not send you a challenge. To continue, an administrator '. | 'can not send you a challenge. To continue, an administrator '. | ||||
'must strip this factor from your account.')); | 'must strip this factor from your account.', | ||||
PhabricatorPlatformSite::getName())); | |||||
} | } | ||||
$push_info = array( | $push_info = array( | ||||
pht('Domain') => $this->getInstallDisplayName(), | pht('Domain') => $this->getInstallDisplayName(), | ||||
); | ); | ||||
$push_info = phutil_build_http_querystring($push_info); | $push_info = phutil_build_http_querystring($push_info); | ||||
$parameters = array( | $parameters = array( | ||||
▲ Show 20 Lines • Show All 344 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0