LoginService, LifeCyclepublic 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:.
AbstractLifeCycle.AbstractLifeCycleListenerAbstractLoginService.RolePrincipal, AbstractLoginService.UserPrincipalLifeCycle.ListenerFAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING_fullValidate, _identityService, _name| Constructor | Description |
|---|---|
HashLoginService() |
|
HashLoginService(java.lang.String name) |
|
HashLoginService(java.lang.String name,
java.lang.String config) |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
doStart() |
|
protected void |
doStop() |
|
java.lang.String |
getConfig() |
|
Resource |
getConfigResource() |
Deprecated.
|
boolean |
isHotReload() |
Is hot reload enabled on this user store
|
protected java.lang.String[] |
loadRoleInfo(AbstractLoginService.UserPrincipal user) |
|
protected AbstractLoginService.UserPrincipal |
loadUserInfo(java.lang.String userName) |
|
void |
setConfig(java.lang.String config) |
Load realm users from properties file.
|
void |
setHotReload(boolean enable) |
Enable Hot Reload of the Property File
|
void |
setUserStore(UserStore userStore) |
Configure the
UserStore implementation to use. |
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stopgetIdentityService, getName, isFullValidate, login, logout, setFullValidate, setIdentityService, setName, toString, validatepublic HashLoginService()
public HashLoginService(java.lang.String name)
public HashLoginService(java.lang.String name,
java.lang.String config)
public java.lang.String getConfig()
@Deprecated public Resource getConfigResource()
public void setConfig(java.lang.String config)
The property file maps usernames to password specs followed by an optional comma separated list of role names.
config - uri or url or path to realm properties filepublic boolean isHotReload()
public void setHotReload(boolean enable)
enable - true to enable, false to disablepublic void setUserStore(UserStore userStore)
UserStore implementation to use.
If none, for backward compat if none the PropertyUserStore will be useduserStore - the UserStore implementation to useprotected java.lang.String[] loadRoleInfo(AbstractLoginService.UserPrincipal user)
loadRoleInfo in class AbstractLoginServiceprotected AbstractLoginService.UserPrincipal loadUserInfo(java.lang.String userName)
loadUserInfo in class AbstractLoginServiceprotected void doStart()
throws java.lang.Exception
doStart in class AbstractLifeCyclejava.lang.ExceptionAbstractLifeCycle.doStart()protected void doStop()
throws java.lang.Exception
doStop in class AbstractLifeCyclejava.lang.ExceptionAbstractLifeCycle.doStop()Copyright © 1995–2017 Webtide. All rights reserved.