public class LockOutManager extends Object
Modifier and Type | Method and Description |
---|---|
void |
disableAccount(String username,
Date startTime,
Date endTime)
Sets an account to disabled, starting at an optional time and ending at an optional time.
|
void |
enableAccount(String username)
Enables an account that may or may not have previously been disabled.
|
LockOutFlag |
getDisabledStatus(String username)
Returns a LockOutFlag for a given username, which contains information about the time
period that the specified account is going to be disabled.
|
static LockOutManager |
getInstance()
Returns a singleton instance of LockOutManager.
|
static LockOutProvider |
getLockOutProvider()
Returns the currently-installed LockOutProvider.
|
boolean |
isAccountDisabled(String username)
Returns true or false if an account is currently locked out.
|
void |
recordFailedLogin(String username)
"Records" (notifies all listeners) that a failed login occurred.
|
public static LockOutProvider getLockOutProvider()
public static LockOutManager getInstance()
public LockOutFlag getDisabledStatus(String username)
username
- Username of account to request status of.public boolean isAccountDisabled(String username)
username
- Username of account to check on.public void disableAccount(String username, Date startTime, Date endTime) throws UnsupportedOperationException
username
- User whose account will be disabled.startTime
- When to start the lockout, or null if immediately.endTime
- When to end the lockout, or null if forever.UnsupportedOperationException
- if the provider is readonly.public void enableAccount(String username) throws UnsupportedOperationException
username
- User to enable.UnsupportedOperationException
- if the provider is readonly.public void recordFailedLogin(String username)
username
- Locked out user that attempted to login.Copyright © 2003-2008 Jive Software.