Skip to content

Commit 4292c65

Browse files
ThomasLandauerxabbuh
authored andcommitted
Adding info about login throttling
1 parent 9e11eea commit 4292c65

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

rate_limiter.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defensive measure to protect services from excessive use (intended or not) and
1111
maintain their availability. It's also useful to control your internal or
1212
outbound processes (e.g. limit the number of simultaneously processed messages).
1313

14-
Symfony uses these rate limiters in built-in features like "login throttling",
14+
Symfony uses these rate limiters in built-in features like :ref:`login throttling <security-login-throttling>`,
1515
which limits how many failed login attempts a user can make in a given period of
1616
time, but you can use them for your own features too.
1717

security.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,8 @@ Enable remote user authentication using the ``remote_user`` key:
13681368
:ref:`the configuration reference <reference-security-firewall-remote-user>`
13691369
for more details.
13701370

1371+
.. _security-login-throttling:
1372+
13711373
Limiting Login Attempts
13721374
~~~~~~~~~~~~~~~~~~~~~~~
13731375

security/custom_authenticator.rst

+5
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ can define what happens in these cases:
168168
useful for e.g. login forms, where the login controller is run again
169169
with the login errors.
170170

171+
If you're using :ref:`login throttling <security-login-throttling>`,
172+
you can check if ``$exception`` is an instance of
173+
:class:`Symfony\\Component\\Security\\Core\\Exception\\TooManyLoginAttemptsAuthenticationException`
174+
(e.g. to display an appropriate message).
175+
171176
**Caution**: Never use ``$exception->getMessage()`` for ``AuthenticationException``
172177
instances. This message might contain sensitive information that you
173178
don't want to be publicly exposed. Instead, use ``$exception->getMessageKey()``

0 commit comments

Comments
 (0)