Package org.eclipse.jetty.security
Class HashLoginService
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.security.AbstractLoginService
org.eclipse.jetty.security.HashLoginService
- All Implemented Interfaces:
LoginService,org.eclipse.jetty.util.component.Container,org.eclipse.jetty.util.component.Destroyable,org.eclipse.jetty.util.component.Dumpable,org.eclipse.jetty.util.component.Dumpable.DumpableContainer,org.eclipse.jetty.util.component.LifeCycle
Properties User Realm.
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:.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.security.AbstractLoginService
AbstractLoginService.RolePrincipal, AbstractLoginService.UserPrincipalNested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
Fields inherited from class org.eclipse.jetty.security.AbstractLoginService
_fullValidate, _identityService, _nameFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoStart()protected voiddoStop()org.eclipse.jetty.util.resource.ResourceDeprecated.booleanIs hot reload enabled on this user storeprotected String[]protected AbstractLoginService.UserPrincipalloadUserInfo(String userName) voidLoad realm users from properties file.voidsetHotReload(boolean enable) Enable Hot Reload of the Property FilevoidsetUserStore(UserStore userStore) Configure theUserStoreimplementation to use.Methods inherited from class org.eclipse.jetty.security.AbstractLoginService
getIdentityService, getName, isFullValidate, login, logout, setFullValidate, setIdentityService, setName, toString, validateMethods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dumpSelfMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Constructor Details
-
HashLoginService
public HashLoginService() -
HashLoginService
-
HashLoginService
-
-
Method Details
-
getConfig
-
getConfigResource
Deprecated. -
setConfig
Load realm users from properties file.The property file maps usernames to password specs followed by an optional comma separated list of role names.
- Parameters:
config- uri or url or path to realm properties file
-
isHotReload
public boolean isHotReload()Is hot reload enabled on this user store- Returns:
- true if hot reload was enabled before startup
-
setHotReload
public void setHotReload(boolean enable) Enable Hot Reload of the Property File- Parameters:
enable- true to enable, false to disable
-
setUserStore
Configure theUserStoreimplementation to use. If none, for backward compat if none thePropertyUserStorewill be used- Parameters:
userStore- theUserStoreimplementation to use
-
loadRoleInfo
- Specified by:
loadRoleInfoin classAbstractLoginService
-
loadUserInfo
- Specified by:
loadUserInfoin classAbstractLoginService
-
doStart
- Overrides:
doStartin classorg.eclipse.jetty.util.component.ContainerLifeCycle- Throws:
Exception- See Also:
-
AbstractLifeCycle.doStart()
-
doStop
- Overrides:
doStopin classorg.eclipse.jetty.util.component.ContainerLifeCycle- Throws:
Exception- See Also:
-
AbstractLifeCycle.doStop()
-