src/Security/Security.php
public function getApplicableAuthenticators($service = Authenticator::LOGIN)
    {
        $authenticators = $this->getAuthenticators();

        /** @var Authenticator $authenticator */
        foreach ($authenticators as $name => $authenticator) {
            if (!($authenticator->supportedServices() & $service)) {
                unset($authenticators[$name]);
            }
        }

        if (empty($authenticators)) {
            throw new LogicException('No applicable authenticators found');
        }

        return $authenticators;
    }
public function getApplicableAuthenticators($service = Authenticator::LOGIN)
    {
        $authenticators = $this->getAuthenticators();

        /** @var Authenticator $authenticator */
        foreach ($authenticators as $name => $authenticator) {
            if (!($authenticator->supportedServices() & $service)) {
                unset($authenticators[$name]);
            }
        }

        if (empty($authenticators)) {
            throw new LogicException('No applicable authenticators found');
        }

        return $authenticators;
    }
public function getApplicableAuthenticators ( $ service = Authenticator :: LOGIN ) { $ authenticators = $ this -> getAuthenticators ( ) ; /** @var Authenticator $authenticator */ foreach ( $ authenticators as $ name => $ authenticator ) { if ( ! ( $ authenticator -> supportedServices ( ) & $ service ) ) { unset ( $ authenticators [ $ name ] ) ; } } if ( empty ( $ authenticators ) ) { throw new LogicException ( 'No applicable authenticators found' ) ; } return $ authenticators ; }
Get all registered authenticators

@param int $service The type of service that is requested
@return Authenticator[] Return an array of Authenticator objects
Get all registered authenticators