Package org.eclipse.net4j.util.security
Class UserManagerAuthenticator
- java.lang.Object
- 
- org.eclipse.net4j.util.event.Notifier
- 
- org.eclipse.net4j.util.lifecycle.Lifecycle
- 
- org.eclipse.net4j.util.security.UserManagerAuthenticator
 
 
 
- 
- All Implemented Interfaces:
- INotifier,- INotifier.INotifier2,- IDeactivateable,- ILifecycle,- ILifecycle.DeferrableActivation,- IAuthenticator
 
 public class UserManagerAuthenticator extends Lifecycle implements IAuthenticator - Since:
- 3.3
- Author:
- Eike Stepper
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycleILifecycle.DeferrableActivation
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifierINotifier.INotifier2
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_TOKEN_LENGTH
 - 
Constructor SummaryConstructors Constructor Description UserManagerAuthenticator()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauthenticate(java.lang.String userID, char[] password)Authenticates the user with the passeduserIDby checking whether the suppliedpasswordmatches the password stored for this user.protected byte[]createRandomToken()protected voiddoActivate()protected voiddoBeforeActivate()java.lang.StringgetEncryptionAlgorithmName()intgetEncryptionIterationCount()byte[]getEncryptionSaltBytes()IRandomizergetRandomizer()intgetTokenLength()IUserManagergetUserManager()voidsetEncryptionAlgorithmName(java.lang.String encryptionAlgorithmName)voidsetEncryptionIterationCount(int encryptionIterationCount)voidsetEncryptionSaltBytes(byte[] encryptionSaltBytes)voidsetRandomizer(IRandomizer randomizer)voidsetTokenLength(int tokenLength)voidsetUserManager(IUserManager userManager)- 
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycleactivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
 - 
Methods inherited from class org.eclipse.net4j.util.event.NotifieraddListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.net4j.util.event.INotifieraddListener, getListeners, hasListeners, removeListener
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_TOKEN_LENGTHpublic static final int DEFAULT_TOKEN_LENGTH - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getEncryptionAlgorithmNamepublic java.lang.String getEncryptionAlgorithmName() 
 - 
setEncryptionAlgorithmNamepublic void setEncryptionAlgorithmName(java.lang.String encryptionAlgorithmName) 
 - 
getEncryptionSaltBytespublic byte[] getEncryptionSaltBytes() 
 - 
setEncryptionSaltBytespublic void setEncryptionSaltBytes(byte[] encryptionSaltBytes) 
 - 
getEncryptionIterationCountpublic int getEncryptionIterationCount() 
 - 
setEncryptionIterationCountpublic void setEncryptionIterationCount(int encryptionIterationCount) 
 - 
getTokenLengthpublic int getTokenLength() 
 - 
setTokenLengthpublic void setTokenLength(int tokenLength) 
 - 
getRandomizerpublic IRandomizer getRandomizer() 
 - 
setRandomizerpublic void setRandomizer(IRandomizer randomizer) 
 - 
getUserManagerpublic IUserManager getUserManager() 
 - 
setUserManagerpublic void setUserManager(IUserManager userManager) 
 - 
authenticatepublic void authenticate(java.lang.String userID, char[] password) throws java.lang.SecurityExceptionDescription copied from interface:IAuthenticatorAuthenticates the user with the passeduserIDby checking whether the suppliedpasswordmatches the password stored for this user.The implementation is required to throw a SecurityExceptionif the passwords do not match.- Specified by:
- authenticatein interface- IAuthenticator
- Throws:
- java.lang.SecurityException
 
 - 
doBeforeActivateprotected void doBeforeActivate() throws java.lang.Exception- Overrides:
- doBeforeActivatein class- Lifecycle
- Throws:
- java.lang.Exception
 
 - 
doActivateprotected void doActivate() throws java.lang.Exception- Overrides:
- doActivatein class- Lifecycle
- Throws:
- java.lang.Exception
 
 - 
createRandomTokenprotected byte[] createRandomToken() 
 
- 
 
-