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
- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivation
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
authenticate
(String userID, char[] password) Authenticates the user with the passeduserID
by checking whether the suppliedpassword
matches the password stored for this user.protected void
protected void
byte[]
char[]
getPassword
(String userID) protected void
void
removeUser
(String userID) protected void
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, 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.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Field Details
-
users
-
-
Constructor Details
-
UserManager
public UserManager()
-
-
Method Details
-
addUser
- Specified by:
addUser
in interfaceIUserManager
-
removeUser
- Specified by:
removeUser
in interfaceIUserManager
-
getPassword
- Since:
- 3.3
-
authenticate
Description copied from interface:IAuthenticator
Authenticates the user with the passeduserID
by checking whether the suppliedpassword
matches the password stored for this user.The implementation is required to throw a
SecurityException
if the passwords do not match.- Specified by:
authenticate
in interfaceIAuthenticator
- Since:
- 3.3
-
encrypt
public byte[] encrypt(String userID, byte[] data, String algorithmName, byte[] salt, int count) throws SecurityException - Specified by:
encrypt
in interfaceIUserManager
- Throws:
SecurityException
- Since:
- 2.0
-
doActivate
- Overrides:
doActivate
in classLifecycle
- Throws:
Exception
-
doDeactivate
- Overrides:
doDeactivate
in classLifecycle
- Throws:
Exception
-
load
- Throws:
IORuntimeException
-
save
- Throws:
IORuntimeException
-