Class DefaultBruteForceAttackCounter
java.lang.Object
de.hybris.platform.acceleratorstorefrontcommons.security.impl.DefaultBruteForceAttackCounter
- All Implemented Interfaces:
BruteForceAttackCounter
Default implementation of
BruteForceAttackCounter-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDefaultBruteForceAttackCounter(Integer maxFailedLogins, Integer cacheExpiration, Integer cacheSizeLimit) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidevict()intgetUserFailedLogins(String userUid) Method returns current user failed login counter value.booleanMethod checks if user reached attack threshold.protected StringprepareUserUid(String userUid) voidregisterLoginFailure(String userUid) Method registers user login failure.voidresetUserCounter(String userUid) Method resets the counter for the given user uid
-
Constructor Details
-
DefaultBruteForceAttackCounter
-
-
Method Details
-
registerLoginFailure
Description copied from interface:BruteForceAttackCounterMethod registers user login failure.- Specified by:
registerLoginFailurein interfaceBruteForceAttackCounter- Parameters:
userUid- that the failure is registered for
-
isAttack
Description copied from interface:BruteForceAttackCounterMethod checks if user reached attack threshold.- Specified by:
isAttackin interfaceBruteForceAttackCounter- Parameters:
userUid- user uid against which the check is performed- Returns:
- true if this one is an attack
-
resetUserCounter
Description copied from interface:BruteForceAttackCounterMethod resets the counter for the given user uid- Specified by:
resetUserCounterin interfaceBruteForceAttackCounter- Parameters:
userUid- user uid that failed logins counter will be reset
-
getUserFailedLogins
Description copied from interface:BruteForceAttackCounterMethod returns current user failed login counter value.- Specified by:
getUserFailedLoginsin interfaceBruteForceAttackCounter- Parameters:
userUid- user uid to return failed login number- Returns:
- the number of failed logins for the user
-
get
-
prepareUserUid
-
evict
protected void evict()
-