chargement propre pour le login
This commit is contained in:
parent
fa114ce6a5
commit
d7b1aa6692
@ -20,14 +20,14 @@ security:
|
|||||||
provider: app_user_provider
|
provider: app_user_provider
|
||||||
|
|
||||||
form_login:
|
form_login:
|
||||||
login_path: app_login
|
login_path: _login
|
||||||
check_path: app_login
|
check_path: _login
|
||||||
enable_csrf: true
|
enable_csrf: true
|
||||||
csrf_token_id: authenticate
|
csrf_token_id: authenticate
|
||||||
|
|
||||||
logout:
|
logout:
|
||||||
path: app_logout
|
path: _logout
|
||||||
target: app_login
|
target: _login
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
|||||||
|
|
||||||
class AuthenticationController extends AbstractController
|
class AuthenticationController extends AbstractController
|
||||||
{
|
{
|
||||||
#[Route(path: '/', name: 'app_login')]
|
#[Route(path: '/', name: '_login')]
|
||||||
public function login(AuthenticationUtils $authenticationUtils): Response
|
public function login(AuthenticationUtils $authenticationUtils): Response
|
||||||
{
|
{
|
||||||
// get the login error if there is one
|
// get the login error if there is one
|
||||||
@ -24,7 +24,7 @@ class AuthenticationController extends AbstractController
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Route(path: '/logout', name: 'app_logout')]
|
#[Route(path: '/logout', name: '_logout')]
|
||||||
public function logout(): void
|
public function logout(): void
|
||||||
{
|
{
|
||||||
throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.');
|
throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.');
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
{% if app.user %}
|
{% if app.user %}
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
Vous êtes connecté en tant que {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Déconnexion</a>
|
Vous êtes connecté en tant que {{ app.user.userIdentifier }}, <a href="{{ path('_logout') }}">Déconnexion</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<label>
|
<label>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user