public class UserManagerAuthenticator extends Lifecycle implements IAuthenticator
ILifecycle.DeferrableActivation
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TOKEN_LENGTH |
Constructor and Description |
---|
UserManagerAuthenticator() |
Modifier and Type | Method and Description |
---|---|
void |
authenticate(String userID,
char[] password)
Authenticates the user with the passed
userID by checking whether the supplied password
matches the password stored for this user. |
protected byte[] |
createRandomToken() |
protected void |
doActivate() |
protected void |
doBeforeActivate() |
String |
getEncryptionAlgorithmName() |
int |
getEncryptionIterationCount() |
byte[] |
getEncryptionSaltBytes() |
IRandomizer |
getRandomizer() |
int |
getTokenLength() |
IUserManager |
getUserManager() |
void |
setEncryptionAlgorithmName(String encryptionAlgorithmName) |
void |
setEncryptionIterationCount(int encryptionIterationCount) |
void |
setEncryptionSaltBytes(byte[] encryptionSaltBytes) |
void |
setRandomizer(IRandomizer randomizer) |
void |
setTokenLength(int tokenLength) |
void |
setUserManager(IUserManager userManager) |
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
addListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, getListeners, hasListeners, removeListener
public static final int DEFAULT_TOKEN_LENGTH
public String getEncryptionAlgorithmName()
public void setEncryptionAlgorithmName(String encryptionAlgorithmName)
public byte[] getEncryptionSaltBytes()
public void setEncryptionSaltBytes(byte[] encryptionSaltBytes)
public int getEncryptionIterationCount()
public void setEncryptionIterationCount(int encryptionIterationCount)
public int getTokenLength()
public void setTokenLength(int tokenLength)
public IRandomizer getRandomizer()
public void setRandomizer(IRandomizer randomizer)
public IUserManager getUserManager()
public void setUserManager(IUserManager userManager)
public void authenticate(String userID, char[] password) throws SecurityException
IAuthenticator
userID
by checking whether the supplied password
matches the password stored for this user.
The implementation is required to throw a SecurityException
if the passwords do not match.
authenticate
in interface IAuthenticator
SecurityException
protected void doBeforeActivate() throws Exception
doBeforeActivate
in class Lifecycle
Exception
protected void doActivate() throws Exception
doActivate
in class Lifecycle
Exception
protected byte[] createRandomToken()
Copyright (c) 2011-2014 Eike Stepper (Berlin, Germany) and others.