public class UserManager extends Lifecycle implements IUserManager, IAuthenticator
ILifecycle.DeferrableActivation| Constructor and Description |
|---|
UserManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addUser(String userID,
char[] password) |
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 void |
doActivate() |
protected void |
doDeactivate() |
byte[] |
encrypt(String userID,
byte[] data,
String algorithmName,
byte[] salt,
int count) |
char[] |
getPassword(String userID) |
protected void |
load(Map<String,char[]> users) |
void |
removeUser(String userID) |
protected void |
save(Map<String,char[]> users) |
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toStringaddListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, getListeners, hasListeners, removeListenerpublic void addUser(String userID, char[] password)
addUser in interface IUserManagerpublic void removeUser(String userID)
removeUser in interface IUserManagerpublic char[] getPassword(String userID)
public void authenticate(String userID, char[] password)
IAuthenticatoruserID 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 IAuthenticatorpublic byte[] encrypt(String userID, byte[] data, String algorithmName, byte[] salt, int count) throws SecurityException
encrypt in interface IUserManagerSecurityExceptionprotected void doActivate()
throws Exception
doActivate in class LifecycleExceptionprotected void doDeactivate()
throws Exception
doDeactivate in class LifecycleExceptionprotected void load(Map<String,char[]> users) throws IORuntimeException
IORuntimeExceptionprotected void save(Map<String,char[]> users) throws IORuntimeException
IORuntimeExceptionCopyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html