org.eclipse.jetty.security
Class HashLoginService
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.security.MappedLoginService
org.eclipse.jetty.security.HashLoginService
- All Implemented Interfaces:
- LoginService, LifeCycle
public class HashLoginService
- extends MappedLoginService
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:.
Methods inherited from class org.eclipse.jetty.security.MappedLoginService |
getIdentityService, getName, getUsers, login, logout, putUser, putUser, removeUser, setIdentityService, setName, setUsers, toString, validate |
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
HashLoginService
public HashLoginService()
HashLoginService
public HashLoginService(String name)
HashLoginService
public HashLoginService(String name,
String config)
getConfig
public String getConfig()
getConfig
public void getConfig(String config)
getConfigResource
public Resource getConfigResource()
setConfig
public void setConfig(String config)
- 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
- Filename or url of user properties file.
setRefreshInterval
public void setRefreshInterval(int msec)
getRefreshInterval
public int getRefreshInterval()
loadUser
protected UserIdentity loadUser(String username)
- Specified by:
loadUser
in class MappedLoginService
loadUsers
public void loadUsers()
throws IOException
- Specified by:
loadUsers
in class MappedLoginService
- Throws:
IOException
doStart
protected void doStart()
throws Exception
- Overrides:
doStart
in class MappedLoginService
- Throws:
Exception
- See Also:
AbstractLifeCycle.doStart()
doStop
protected void doStop()
throws Exception
- Overrides:
doStop
in class MappedLoginService
- Throws:
Exception
- See Also:
AbstractLifeCycle.doStop()
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.