@@ -1396,14 +1396,10 @@ You must enable this using the ``login_throttling`` setting:
1396
1396
# by default, the feature allows 5 login attempts per minute
1397
1397
login_throttling : null
1398
1398
1399
- # configure the maximum login attempts (per minute)
1399
+ # configure the maximum login attempts
1400
1400
login_throttling :
1401
- max_attempts : 3
1402
-
1403
- # configure the maximum login attempts in a custom period of time
1404
- login_throttling :
1405
- max_attempts : 3
1406
- interval : ' 15 minutes'
1401
+ max_attempts : 3 # per minute ...
1402
+ # interval: '15 minutes' # ... or in a custom period
1407
1403
1408
1404
# use a custom rate limiter via its service ID
1409
1405
login_throttling :
@@ -1426,13 +1422,9 @@ You must enable this using the ``login_throttling`` setting:
1426
1422
<!-- ... -->
1427
1423
1428
1424
<firewall name =" main" >
1429
- <!-- by default, the feature allows 5 login attempts per minute -->
1430
- <login-throttling />
1431
-
1432
- <!-- configure the maximum login attempts (per minute) -->
1433
- <login-throttling max-attempts =" 3" />
1434
-
1435
- <!-- configure the maximum login attempts in a custom period of time -->
1425
+ <!-- by default, the feature allows 5 login attempts per minute
1426
+ max-attempts: (optional) You can configure the maximum attempts ...
1427
+ interval: (optional) ... and the period of time. -->
1436
1428
<login-throttling max-attempts =" 3" interval =" 15 minutes" />
1437
1429
1438
1430
<!-- use a custom rate limiter via its service ID -->
@@ -1452,17 +1444,9 @@ You must enable this using the ``login_throttling`` setting:
1452
1444
$mainFirewall = $security->firewall('main');
1453
1445
1454
1446
// by default, the feature allows 5 login attempts per minute
1455
- $mainFirewall->loginThrottling();
1456
-
1457
- // configure the maximum login attempts (per minute)
1458
- $mainFirewall->loginThrottling()
1459
- ->maxAttempts(3)
1460
- ;
1461
-
1462
- // configure the maximum login attempts in a custom period of time
1463
1447
$mainFirewall->loginThrottling()
1464
- ->maxAttempts(3)
1465
- ->interval('15 minutes')
1448
+ // ->maxAttempts(3) // Optional: You can configure the maximum attempts ...
1449
+ // ->interval('15 minutes') // ... and the period of time.
1466
1450
;
1467
1451
};
1468
1452
0 commit comments