瀏覽代碼

Merge branch 'develop'

develop
Guillaume 3 年之前
父節點
當前提交
ad8ce9491f
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. +5
    -1
      Authenticator/LoginFormAuthenticator.php
  2. +1
    -0
      Controller/ControllerTrait.php

+ 5
- 1
Authenticator/LoginFormAuthenticator.php 查看文件

@@ -13,6 +13,7 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Security\Http\Authenticator\AbstractLoginFormAuthenticator;
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\CsrfTokenBadge;
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\RememberMeBadge;
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\PasswordCredentials;
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
@@ -58,7 +59,10 @@ class LoginFormAuthenticator extends AbstractLoginFormAuthenticator
return $this->userStore->getOneByEmail($userIdentifier);
}),
new PasswordCredentials($password),
[new CsrfTokenBadge('authenticate', $csrfToken)]
[
new CsrfTokenBadge('authenticate', $csrfToken),
new RememberMeBadge()
]
);
}


+ 1
- 0
Controller/ControllerTrait.php 查看文件

@@ -33,6 +33,7 @@ use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Security\Http\RememberMe\TokenBasedRememberMeServices;
use Symfony\Contracts\Translation\TranslatorInterface;
use Twig\Environment;


Loading…
取消
儲存