Skip to content

Commit 24120b1

Browse files
committed
Merge branch '5.4' into 6.3
* 5.4: Update security.rst [Security] Mention customizing successful and failed authentication
2 parents 18042fa + 8822e37 commit 24120b1

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
@@ -1652,6 +1652,19 @@ and set the ``limiter`` option to its service ID:
16521652
;
16531653
};
16541654
1655+
Customize Successful and Failed Authentication Behavior
1656+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1657+
1658+
If you want to customize how the successful or failed authentication process is
1659+
handled, you don't have to overwrite the respective listeners globally. Instead,
1660+
you can set custom success failure handlers by implementing the
1661+
:class:`Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationSuccessHandlerInterface`
1662+
or the
1663+
:class:`Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationFailureHandlerInterface`.
1664+
1665+
Read :ref:`how to customize your success handler <login-link_customize-success-handler>`
1666+
for more information about this.
1667+
16551668
Login Programmatically
16561669
----------------------
16571670

@@ -2782,7 +2795,7 @@ Frequently Asked Questions
27822795
Sometimes authentication may be successful, but after redirecting, you're
27832796
logged out immediately due to a problem loading the ``User`` from the session.
27842797
To see if this is an issue, check your log file (``var/log/dev.log``) for
2785-
the log message:
2798+
the log message.
27862799

27872800
**Cannot refresh token because user has changed**
27882801
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)