Rename providerset method to get primary providers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
c6e47e8a51
commit
d8197f2b97
|
@ -334,7 +334,7 @@ class LoginController extends Controller {
|
|||
if ($this->twoFactorManager->isTwoFactorAuthenticated($loginResult)) {
|
||||
$this->twoFactorManager->prepareTwoFactorLogin($loginResult, $remember_login);
|
||||
|
||||
$providers = $this->twoFactorManager->getProviderSet($loginResult)->get3rdPartyProviders();
|
||||
$providers = $this->twoFactorManager->getProviderSet($loginResult)->getPrimaryProviders();
|
||||
if (count($providers) === 1) {
|
||||
// Single provider, hence we can redirect to that provider's challenge page directly
|
||||
/* @var $provider IProvider */
|
||||
|
|
|
@ -70,7 +70,7 @@ class ProviderSet {
|
|||
/**
|
||||
* @return IProvider[]
|
||||
*/
|
||||
public function get3rdPartyProviders(): array {
|
||||
public function getPrimaryProviders(): array {
|
||||
return array_filter($this->providers, function(IProvider $provider) {
|
||||
return !($provider instanceof BackupCodesProvider);
|
||||
});
|
||||
|
|
|
@ -64,7 +64,7 @@ class ProviderSetTest extends TestCase {
|
|||
|
||||
$set = new ProviderSet([$p2, $p1], false);
|
||||
|
||||
$this->assertEquals($expected, $set->get3rdPartyProviders());
|
||||
$this->assertEquals($expected, $set->getPrimaryProviders());
|
||||
}
|
||||
|
||||
public function testGetProvider() {
|
||||
|
|
Loading…
Reference in New Issue