org.eclipse.jetty.plus.jaas.spi

## Class DataSourceLoginModule

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

- All Implemented Interfaces:
    LoginModule

      public class DataSourceLoginModule
      extends AbstractDatabaseLoginModule

  DataSourceLoginModule A LoginModule that uses a DataSource to retrieve user authentication and authorisation information.
  See Also:
    `JDBCLoginModule`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.eclipse.jetty.plus.jaas.spi.AbstractLoginModule

      `AbstractLoginModule.JAASUserInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataSourceLoginModule()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Connection` | `getConnection()` Get a connection from the DataSource
    `void` | `initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)` Init LoginModule.

    - ### Methods inherited from class org.eclipse.jetty.plus.jaas.spi.AbstractDatabaseLoginModule

      `getUserInfo`

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

    - #### DataSourceLoginModule

          public DataSourceLoginModule()

  - ### Method Detail

    - #### initialize

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

      Init LoginModule. Called once by JAAS after new instance created.
      Specified by:
        `initialize` in interface `LoginModule`
      Overrides:
        `initialize` in class `AbstractDatabaseLoginModule`
      Parameters:
        `subject` -
        `callbackHandler` -
        `sharedState` -
        `options` -
      See Also:
        `LoginModule.initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)`

    - #### getConnection

          public Connection getConnection()
                                   throws Exception

      Get a connection from the DataSource
      Specified by:
        `getConnection` in class `AbstractDatabaseLoginModule`
      Returns:
        the connection for the datasource
      Throws:
        `Exception`
      See Also:
        `AbstractDatabaseLoginModule.getConnection()`

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