public class LoginAttemptServiceImpl extends Object implements LoginAttemptService
| Constructor and Description |
|---|
LoginAttemptServiceImpl() |
LoginAttemptServiceImpl(int maxAttempts) |
LoginAttemptServiceImpl(int maxAttempts,
boolean useUserName,
boolean useRemoteAddress) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAttempts()
clears all attempts
|
LocalDateTime |
getLastAccess(String userName) |
void |
invalidate(String userName)
resets the user attempts
|
boolean |
isBlocked(String userName)
checks if user is blocked
|
boolean |
isUseRemoteAddress()
for external control, if remote address should be used
|
boolean |
isUseUserName()
for external control, if user name should be used
|
void |
loginFailed(String userName)
increments the user attempts
|
void |
setUseRemoteAddress(boolean useRemoteAddress) |
void |
setUseUserName(boolean useUserName) |
public LoginAttemptServiceImpl()
public LoginAttemptServiceImpl(int maxAttempts)
public LoginAttemptServiceImpl(int maxAttempts,
boolean useUserName,
boolean useRemoteAddress)
public void invalidate(String userName)
LoginAttemptServiceinvalidate in interface LoginAttemptServicepublic void loginFailed(String userName)
LoginAttemptServiceloginFailed in interface LoginAttemptServicepublic boolean isBlocked(String userName)
LoginAttemptServiceisBlocked in interface LoginAttemptServicepublic LocalDateTime getLastAccess(String userName)
public boolean isUseUserName()
LoginAttemptServiceisUseUserName in interface LoginAttemptServicepublic void setUseUserName(boolean useUserName)
public boolean isUseRemoteAddress()
LoginAttemptServiceisUseRemoteAddress in interface LoginAttemptServicepublic void setUseRemoteAddress(boolean useRemoteAddress)
public void clearAttempts()
LoginAttemptServiceclearAttempts in interface LoginAttemptServiceCopyright © 2016–2018. All rights reserved.