From 35267423287eb0325d326ec575e6bf393123b2a9 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Tue, 26 Sep 2023 18:22:58 +0200 Subject: [PATCH] [Security] Mention customizing successful and failed authentication --- security.rst | 14 ++++++++++++++ security/login_link.rst | 2 ++ 2 files changed, 16 insertions(+) diff --git a/security.rst b/security.rst index 5b38acb53ea..1ed65029c86 100644 --- a/security.rst +++ b/security.rst @@ -1602,6 +1602,20 @@ and set the ``limiter`` option to its service ID: ; }; +Customize Successful and Failed Authentication Behavior +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you want to customize the success or failure handling process, instead of +overwriting the respective listeners globally, you can set custom success +failure handlers by implementing the +:class:`Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationSuccessHandlerInterface` +or the +:class:`Symfony\\Component\\Security\\Http\\Authentication\\AuthenticationFailureHandlerInterface`. + +If you want more information about this, you can have a look at the section +about +:ref:`customizing your success handler `. + .. _security-logging-out: Logging Out diff --git a/security/login_link.rst b/security/login_link.rst index 4dea64c7662..d747202ff93 100644 --- a/security/login_link.rst +++ b/security/login_link.rst @@ -693,6 +693,8 @@ from the first hash value and the ``kernel.secret`` container parameter. This allows Symfony to sign this final hash, which is contained in the login URL. The final hash is also a Base64 encoded SHA-256 hash. +.. _login-link_customize-success-handler: + Customizing the Success Handler -------------------------------