public class HashLoginService extends AbstractLoginService
An implementation of UserRealm that stores users and roles in-memory in HashMaps.
Typically these maps are populated by calling the load() method or passing a properties resource to the constructor. The format of the properties file is:
username: password [,rolename ...]Passwords may be clear text, obfuscated or checksummed. The class com.eclipse.Util.Password should be used to generate obfuscated passwords or password checksums.
If DIGEST Authentication is used, the password must be in a recoverable format, either plain text or OBF:.
AbstractLoginService.RolePrincipal, AbstractLoginService.UserPrincipalAbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener_fullValidate, _identityService, _nameFAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING| Constructor and Description |
|---|
HashLoginService() |
HashLoginService(String name) |
HashLoginService(String name,
String config) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart() |
protected void |
doStop() |
String |
getConfig() |
void |
getConfig(String config)
Deprecated.
use
setConfig(String) instead |
Resource |
getConfigResource() |
boolean |
isHotReload()
Is hot reload enabled on this user store
|
protected String[] |
loadRoleInfo(AbstractLoginService.UserPrincipal user) |
protected AbstractLoginService.UserPrincipal |
loadUserInfo(String userName) |
void |
setConfig(String configFile)
Load realm users from properties file.
|
void |
setHotReload(boolean enable)
Enable Hot Reload of the Property File
|
getIdentityService, getName, isFullValidate, login, logout, setFullValidate, setIdentityService, setName, toString, validateaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stoppublic HashLoginService()
public HashLoginService(String name)
public String getConfig()
@Deprecated public void getConfig(String config)
setConfig(String) insteadpublic Resource getConfigResource()
public void setConfig(String configFile)
The property file maps usernames to password specs followed by an optional comma separated list of role names.
configFile - Filename of user properties file.public boolean isHotReload()
public void setHotReload(boolean enable)
enable - true to enable, false to disableprotected String[] loadRoleInfo(AbstractLoginService.UserPrincipal user)
loadRoleInfo in class AbstractLoginServiceprotected AbstractLoginService.UserPrincipal loadUserInfo(String userName)
loadUserInfo in class AbstractLoginServiceprotected void doStart()
throws Exception
doStart in class AbstractLifeCycleExceptionAbstractLifeCycle.doStart()protected void doStop()
throws Exception
doStop in class AbstractLifeCycleExceptionAbstractLifeCycle.doStop()Copyright © 1995–2017 Webtide. All rights reserved.