Package org.eclipse.net4j.util.security
Class UserManager
- java.lang.Object
- 
- org.eclipse.net4j.util.event.Notifier
- 
- org.eclipse.net4j.util.lifecycle.Lifecycle
- 
- org.eclipse.net4j.util.security.UserManager
 
 
 
- 
- All Implemented Interfaces:
- INotifier,- INotifier.INotifier2,- IDeactivateable,- ILifecycle,- ILifecycle.DeferrableActivation,- IAuthenticator,- IUserManager
 - Direct Known Subclasses:
- FileUserManager
 
 public class UserManager extends Lifecycle implements IUserManager, IAuthenticator - 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
 
- 
 - 
Constructor SummaryConstructors Constructor Description UserManager()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddUser(java.lang.String userID, char[] password)voidauthenticate(java.lang.String userID, char[] password)Authenticates the user with the passeduserIDby checking whether the suppliedpasswordmatches the password stored for this user.protected voiddoActivate()protected voiddoDeactivate()byte[]encrypt(java.lang.String userID, byte[] data, java.lang.String algorithmName, byte[] salt, int count)char[]getPassword(java.lang.String userID)protected voidload(java.util.Map<java.lang.String,char[]> users)voidremoveUser(java.lang.String userID)protected voidsave(java.util.Map<java.lang.String,char[]> users)- 
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycleactivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, 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
 
- 
 
- 
- 
- 
Method Detail- 
addUserpublic void addUser(java.lang.String userID, char[] password)- Specified by:
- addUserin interface- IUserManager
 
 - 
removeUserpublic void removeUser(java.lang.String userID) - Specified by:
- removeUserin interface- IUserManager
 
 - 
getPasswordpublic char[] getPassword(java.lang.String userID) - Since:
- 3.3
 
 - 
authenticatepublic void authenticate(java.lang.String userID, char[] password)Description 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
- Since:
- 3.3
 
 - 
encryptpublic byte[] encrypt(java.lang.String userID, byte[] data, java.lang.String algorithmName, byte[] salt, int count) throws java.lang.SecurityException- Specified by:
- encryptin interface- IUserManager
- Throws:
- java.lang.SecurityException
- Since:
- 2.0
 
 - 
doActivateprotected void doActivate() throws java.lang.Exception- Overrides:
- doActivatein class- Lifecycle
- Throws:
- java.lang.Exception
 
 - 
doDeactivateprotected void doDeactivate() throws java.lang.Exception- Overrides:
- doDeactivatein class- Lifecycle
- Throws:
- java.lang.Exception
 
 - 
loadprotected void load(java.util.Map<java.lang.String,char[]> users) throws IORuntimeException- Throws:
- IORuntimeException
 
 - 
saveprotected void save(java.util.Map<java.lang.String,char[]> users) throws IORuntimeException- Throws:
- IORuntimeException
 
 
- 
 
-