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.UserPrincipal| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
_config |
protected org.eclipse.jetty.util.resource.Resource |
_configResource |
protected PropertyUserStore |
_propertyUserStore |
protected boolean |
hotReload |
_fullValidate, _identityService, _name| 构造器和说明 |
|---|
HashLoginService() |
HashLoginService(String name) |
HashLoginService(String name,
String config) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
doStart() |
protected void |
doStop() |
String |
getConfig() |
void |
getConfig(String config) |
org.eclipse.jetty.util.resource.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 config)
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, validateprotected PropertyUserStore _propertyUserStore
protected String _config
protected org.eclipse.jetty.util.resource.Resource _configResource
protected boolean hotReload
public HashLoginService()
public HashLoginService(String name)
public String getConfig()
public void getConfig(String config)
public org.eclipse.jetty.util.resource.Resource getConfigResource()
public void setConfig(String config)
config - Filename or url 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 在类中 AbstractLoginServiceprotected AbstractLoginService.UserPrincipal loadUserInfo(String userName)
loadUserInfo 在类中 AbstractLoginServiceprotected void doStart()
throws Exception
doStart 在类中 org.eclipse.jetty.util.component.AbstractLifeCycleExceptionAbstractLifeCycle.doStart()Copyright © 2017. All rights reserved.