Commit 64739900 authored by David Surville's avatar David Surville
Browse files

L'utilisation des types d'authentification 'db' et 'ldap' pour l'affichage des...

L'utilisation des types d'authentification 'db' et 'ldap' pour l'affichage des formulaires n'est plus nécessaire
parent 1d05f6d4
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -48,10 +48,6 @@ class AuthController extends AbstractActionController
    use UserContextServiceAwareTrait;
    use ModuleOptionsAwareTrait;

    /**
     * @var string
     */
    protected $defaultAuthType = self::AUTH_TYPE_LOCAL_DB;

    /**
     * @var LoginForm[] ['type' => LoginForm]
@@ -79,10 +75,6 @@ class AuthController extends AbstractActionController
     */
    public function getLoginFormForType(string $type): LoginForm
    {
        if ($type === self::AUTH_TYPE_LOCAL) {
            $type = $this->defaultAuthType;
        }

        if (! isset($this->loginFormForType[$type])) {
            throw new RuntimeException("Pas de formulaire spécifié pour le type '$type'");
        }
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ class LoginForm extends Login
    /**
     * @var string[]
     */
    protected $types = ['db', 'ldap'];
    protected $types = ['local'];

    /**
     * @var bool
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ $form->setAttributes([
/** @var AbstractConnectViewHelper[] $helpers */
$helpers = [];
foreach ($types as $t => $config) {
    $helpers[$t] = $this->connect($t, $form);
    $helpers[$t] = $this->connect($t, $forms[$t]);
}

$activeHelper = null;