File tree 3 files changed +8
-1
lines changed
3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ defensive measure to protect services from excessive use (intended or not) and
11
11
maintain their availability. It's also useful to control your internal or
12
12
outbound processes (e.g. limit the number of simultaneously processed messages).
13
13
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 >` ,
15
15
which limits how many failed login attempts a user can make in a given period of
16
16
time, but you can use them for your own features too.
17
17
Original file line number Diff line number Diff line change @@ -1368,6 +1368,8 @@ Enable remote user authentication using the ``remote_user`` key:
1368
1368
:ref: `the configuration reference <reference-security-firewall-remote-user >`
1369
1369
for more details.
1370
1370
1371
+ .. _security-login-throttling :
1372
+
1371
1373
Limiting Login Attempts
1372
1374
~~~~~~~~~~~~~~~~~~~~~~~
1373
1375
Original file line number Diff line number Diff line change @@ -168,6 +168,11 @@ can define what happens in these cases:
168
168
useful for e.g. login forms, where the login controller is run again
169
169
with the login errors.
170
170
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
+
171
176
**Caution **: Never use ``$exception->getMessage() `` for ``AuthenticationException ``
172
177
instances. This message might contain sensitive information that you
173
178
don't want to be publicly exposed. Instead, use ``$exception->getMessageKey() ``
You can’t perform that action at this time.
0 commit comments