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

    Constructors
    Constructor and Description
    `AbstractDatabaseLoginModule()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Connection` | `getConnection()`
    `UserInfo` | `getUserInfo(String userName)` Load info from database
    `void` | `initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> 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 Connection getConnection()
                                            throws Exception

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

    - #### getUserInfo

          public UserInfo getUserInfo(String userName)
                               throws Exception

      Load info from database
      Specified by:
        `getUserInfo` in class `AbstractLoginModule`
      Parameters:
        `userName` - user info to load
      Throws:
        `SQLException`
        `Exception`

    - #### initialize

          public void initialize(Subject subject,
                        CallbackHandler callbackHandler,
                        Map<String,?> sharedState,
                        Map<String,?> options)

      Specified by:
        `initialize` in interface `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-2012 Mort Bay Consulting. All Rights Reserved.