Skip to content

Commit 1609c74

Browse files
wouterjfabpot
authored andcommitted
[Security] Added login throttling feature
1 parent 0cb2e86 commit 1609c74

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Security\Core\Exception;
13+
14+
/**
15+
* This exception is thrown if there where too many failed login attempts in
16+
* this session.
17+
*
18+
* @author Wouter de Jong <[email protected]>
19+
*/
20+
class TooManyLoginAttemptsAuthenticationException extends AuthenticationException
21+
{
22+
/**
23+
* {@inheritdoc}
24+
*/
25+
public function getMessageKey(): string
26+
{
27+
return 'Too many failed login attempts, please try again later.';
28+
}
29+
}

Resources/translations/security.en.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
<source>Account is locked.</source>
6363
<target>Account is locked.</target>
6464
</trans-unit>
65+
<trans-unit id="17">
66+
<source>Too many failed login attempts, please try again later.</source>
67+
<target>Too many failed login attempts, please try again later.</target>
68+
</trans-unit>
6569
</body>
6670
</file>
6771
</xliff>

Resources/translations/security.nl.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
<source>Account is locked.</source>
6363
<target>Account is geblokkeerd.</target>
6464
</trans-unit>
65+
<trans-unit id="17">
66+
<source>Too many failed login attempts, please try again later.</source>
67+
<target>Er waren teveel mislukte inlogpogingen, probeer het later opnieuw.</target>
68+
</trans-unit>
6569
</body>
6670
</file>
6771
</xliff>

0 commit comments

Comments
 (0)