Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jetty.plus.security
Class DataSourceLoginService

    java.lang.Object
      org.eclipse.jetty.util.component.AbstractLifeCycle
          org.eclipse.jetty.security.MappedLoginService
              org.eclipse.jetty.plus.security.DataSourceLoginService

All Implemented Interfaces:
  LoginService, LifeCycle

    public class DataSourceLoginService

extends MappedLoginService

//TODO JASPI cf JDBCLoginService DataSourceUserRealm Obtain user/password/role information from a database via jndi DataSource.

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
`DataSourceLoginService()`
`DataSourceLoginService(java.lang.String name)`
`DataSourceLoginService(java.lang.String name, IdentityService identityService)`

Method Summary
`int` | `getCacheMs()`
`boolean` | `getCreateTables()`
`java.lang.String` | `getJndiName()`
`java.lang.String` | `getRoleTableKey()`
`java.lang.String` | `getRoleTableName()`
`java.lang.String` | `getRoleTableRoleField()`
`Server` | `getServer()`
`java.lang.String` | `getUserRoleTableName()`
`java.lang.String` | `getUserRoleTableRoleKey()`
`java.lang.String` | `getUserRoleTableUserKey()`
`java.lang.String` | `getUserTableKey()`
`java.lang.String` | `getUserTableName()`
`java.lang.String` | `getUserTablePasswordField()`
`java.lang.String` | `getUserTableUserField()`
`void` | `initDb()` Lookup the datasource for the jndiName and formulate the necessary sql query strings based on the configured table and column names.
`protected UserIdentity` | `loadUser(java.lang.String userName)` Load user's info from database.
`protected void` | `loadUsers()`
`void` | `setCacheMs(int ms)`
`void` | `setCreateTables(boolean createTables)`
`void` | `setJndiName(java.lang.String jndi)`
`void` | `setRoleTableKey(java.lang.String tableKey)`
`void` | `setRoleTableName(java.lang.String tableName)`
`void` | `setRoleTableRoleField(java.lang.String tableRoleField)`
`void` | `setServer(Server server)`
`void` | `setUserRoleTableName(java.lang.String roleTableName)`
`void` | `setUserRoleTableRoleKey(java.lang.String roleTableRoleKey)`
`void` | `setUserRoleTableUserKey(java.lang.String roleTableUserKey)`
`void` | `setUserTableKey(java.lang.String tableKey)`
`void` | `setUserTableName(java.lang.String name)`
`void` | `setUserTablePasswordField(java.lang.String tablePasswordField)`
`void` | `setUserTableUserField(java.lang.String tableUserField)`

Methods inherited from class org.eclipse.jetty.security.MappedLoginService
`doStart, doStop, 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

### DataSourceLoginService

    public DataSourceLoginService()

### DataSourceLoginService

    public DataSourceLoginService(java.lang.String name)

### DataSourceLoginService

    public DataSourceLoginService(java.lang.String name,
                                  IdentityService identityService)

Method Detail

### setJndiName

    public void setJndiName(java.lang.String jndi)

### getJndiName

    public java.lang.String getJndiName()

### setServer

    public void setServer(Server server)

### getServer

    public Server getServer()

### setCreateTables

    public void setCreateTables(boolean createTables)

### getCreateTables

    public boolean getCreateTables()

### setUserTableName

    public void setUserTableName(java.lang.String name)

### getUserTableName

    public java.lang.String getUserTableName()

### getUserTableKey

    public java.lang.String getUserTableKey()

### setUserTableKey

    public void setUserTableKey(java.lang.String tableKey)

### getUserTableUserField

    public java.lang.String getUserTableUserField()

### setUserTableUserField

    public void setUserTableUserField(java.lang.String tableUserField)

### getUserTablePasswordField

    public java.lang.String getUserTablePasswordField()

### setUserTablePasswordField

    public void setUserTablePasswordField(java.lang.String tablePasswordField)

### getRoleTableName

    public java.lang.String getRoleTableName()

### setRoleTableName

    public void setRoleTableName(java.lang.String tableName)

### getRoleTableKey

    public java.lang.String getRoleTableKey()

### setRoleTableKey

    public void setRoleTableKey(java.lang.String tableKey)

### getRoleTableRoleField

    public java.lang.String getRoleTableRoleField()

### setRoleTableRoleField

    public void setRoleTableRoleField(java.lang.String tableRoleField)

### getUserRoleTableName

    public java.lang.String getUserRoleTableName()

### setUserRoleTableName

    public void setUserRoleTableName(java.lang.String roleTableName)

### getUserRoleTableUserKey

    public java.lang.String getUserRoleTableUserKey()

### setUserRoleTableUserKey

    public void setUserRoleTableUserKey(java.lang.String roleTableUserKey)

### getUserRoleTableRoleKey

    public java.lang.String getUserRoleTableRoleKey()

### setUserRoleTableRoleKey

    public void setUserRoleTableRoleKey(java.lang.String roleTableRoleKey)

### setCacheMs

    public void setCacheMs(int ms)

### getCacheMs

    public int getCacheMs()

### loadUsers

    protected void loadUsers()

  Specified by:
    `loadUsers` in class `MappedLoginService`

### loadUser

    protected UserIdentity loadUser(java.lang.String userName)

  Load user's info from database.

  Specified by:
    `loadUser` in class `MappedLoginService`
  Parameters:
    `userName` -

### initDb

    public void initDb()
                throws javax.naming.NamingException,
                       java.sql.SQLException

  Lookup the datasource for the jndiName and formulate the necessary sql query strings based on the configured table and column names.

  Throws:
    `javax.naming.NamingException`
    `java.sql.SQLException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.