## org.eclipse.jetty.plus.jaas.spi
Class AbstractDatabaseLoginModule

    java.lang.Object
      org.eclipse.jetty.plus.jaas.spi.AbstractLoginModule
          org.eclipse.jetty.plus.jaas.spi.AbstractDatabaseLoginModule

All Implemented Interfaces:
  javax.security.auth.spi.LoginModule

Direct Known Subclasses:
  DataSourceLoginModule, JDBCLoginModule

    public abstract class AbstractDatabaseLoginModule

extends AbstractLoginModule

AbstractDatabaseLoginModule Abstract base class for LoginModules that interact with a database to retrieve authentication and authorization information. Used by the JDBCLoginModule and DataSourceLoginModule.

Nested Class Summary

Nested classes/interfaces inherited from class org.eclipse.jetty.plus.jaas.spi.AbstractLoginModule
`AbstractLoginModule.JAASUserInfo`

Constructor Summary
`AbstractDatabaseLoginModule()`

Method Summary
`abstract java.sql.Connection` `getConnection()`
`UserInfo` `getUserInfo(java.lang.String userName)` Load info from database
`void` `initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map sharedState, java.util.Map options)`

Methods inherited from class org.eclipse.jetty.plus.jaas.spi.AbstractLoginModule
`abort, commit, configureCallbacks, getCallbackHandler, getCurrentUser, getSubject, isAuthenticated, isCommitted, login, logout, setAuthenticated, setCallbackHandler, setCommitted, setCurrentUser, setSubject`

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

Constructor Detail

### AbstractDatabaseLoginModule

    public AbstractDatabaseLoginModule()

Method Detail

### getConnection

    public abstract java.sql.Connection getConnection()
                                               throws java.lang.Exception

  Returns:
    a java.sql.Connection from the database
  Throws:
    `java.lang.Exception`

### getUserInfo

    public UserInfo getUserInfo(java.lang.String userName)
                         throws java.lang.Exception

  Load info from database

  Specified by:
    `getUserInfo` in class `AbstractLoginModule`
  Parameters:
    `userName` - user info to load
  Throws:
    `java.sql.SQLException`
    `java.lang.Exception`

### initialize

    public void initialize(javax.security.auth.Subject subject,
                           javax.security.auth.callback.CallbackHandler callbackHandler,
                           java.util.Map sharedState,
                           java.util.Map options)

  Specified by:
    `initialize` in interface `javax.security.auth.spi.LoginModule`
  Overrides:
    `initialize` in class `AbstractLoginModule`
  See Also:
    `LoginModule.initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)`

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