Skip to content

Commit 14ad5c0

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: Update security.rst [Security] Mention customizing successful and failed authentication
2 parents 63eea10 + 24120b1 commit 14ad5c0

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

security.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1701,6 +1701,19 @@ and set the ``limiter`` option to its service ID:
17011701
;
17021702
};
17031703
1704+
Customize Successful and Failed Authentication Behavior
1705+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1706+
1707+
If you want to customize how the successful or failed authentication process is
1708+
handled, you don't have to overwrite the respective listeners globally. Instead,
1709+
you can set custom success failure handlers by implementing the
1710+
:class:`Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationSuccessHandlerInterface`
1711+
or the
1712+
:class:`Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationFailureHandlerInterface`.
1713+
1714+
Read :ref:`how to customize your success handler <login-link_customize-success-handler>`
1715+
for more information about this.
1716+
17041717
Login Programmatically
17051718
----------------------
17061719

@@ -2840,7 +2853,7 @@ Frequently Asked Questions
28402853
Sometimes authentication may be successful, but after redirecting, you're
28412854
logged out immediately due to a problem loading the ``User`` from the session.
28422855
To see if this is an issue, check your log file (``var/log/dev.log``) for
2843-
the log message:
2856+
the log message.
28442857

28452858
**Cannot refresh token because user has changed**
28462859
If you see this, there are two possible causes. First, there may be a problem

security/login_link.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ from the first hash value and the ``kernel.secret`` container parameter. This
668668
allows Symfony to sign this final hash, which is contained in the login URL.
669669
The final hash is also a Base64 encoded SHA-256 hash.
670670

671+
.. _login-link_customize-success-handler:
672+
671673
Customizing the Success Handler
672674
-------------------------------
673675

0 commit comments

Comments
 (0)