## 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:.

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.jetty.security.MappedLoginService
`MappedLoginService.Anonymous, MappedLoginService.KnownUser, MappedLoginService.RolePrincipal, MappedLoginService.UserPrincipal`

Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
`AbstractLifeCycle.AbstractLifeCycleListener`

Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
`LifeCycle.Listener`

Field Summary

Fields inherited from class org.eclipse.jetty.security.MappedLoginService
`_identityService, _name, _users`

Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
`_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING`

Constructor Summary
`HashLoginService()`
`HashLoginService(String name)`
`HashLoginService(String name, String config)`

Method Summary
`protected void` `doStart()`
`protected void` `doStop()`
`String` `getConfig()`
`void` `getConfig(String config)`
`Resource` `getConfigResource()`
`int` `getRefreshInterval()`
`protected UserIdentity` `loadUser(String username)`
`void` `loadUsers()`
`void` `setConfig(String config)` Load realm users from properties file.
`void` `setRefreshInterval(int msec)`

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, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### HashLoginService

    public HashLoginService()

### HashLoginService

    public HashLoginService(String name)

### HashLoginService

    public HashLoginService(String name,
                            String config)

Method Detail

### 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-2010 Mort Bay Consulting. All Rights Reserved.