org.eclipse.jetty.plus.jaas.spi

## Class AbstractLoginModule

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

- All Implemented Interfaces:
    LoginModule
  Direct Known Subclasses:
    AbstractDatabaseLoginModule, LdapLoginModule, PropertyFileLoginModule

      public abstract class AbstractLoginModule
      extends Object
      implements LoginModule

  AbstractLoginModule Abstract base class for all LoginModules. Subclasses should just need to implement getUserInfo method.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `AbstractLoginModule.JAASUserInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractLoginModule()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `abort()`
    `boolean` | `commit()`
    `Callback[]` | `configureCallbacks()`
    `CallbackHandler` | `getCallbackHandler()`
    `AbstractLoginModule.JAASUserInfo` | `getCurrentUser()`
    `Subject` | `getSubject()`
    `abstract UserInfo` | `getUserInfo(String username)`
    `void` | `initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)`
    `boolean` | `isAuthenticated()`
    `boolean` | `isCommitted()`
    `boolean` | `login()`
    `boolean` | `logout()`
    `void` | `setAuthenticated(boolean authState)`
    `void` | `setCallbackHandler(CallbackHandler h)`
    `void` | `setCommitted(boolean commitState)`
    `void` | `setCurrentUser(AbstractLoginModule.JAASUserInfo u)`
    `void` | `setSubject(Subject s)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractLoginModule

          public AbstractLoginModule()

  - ### Method Detail

    - #### getSubject

          public Subject getSubject()

    - #### setSubject

          public void setSubject(Subject s)

    - #### getCurrentUser

          public AbstractLoginModule.JAASUserInfo getCurrentUser()

    - #### setCurrentUser

          public void setCurrentUser(AbstractLoginModule.JAASUserInfo u)

    - #### getCallbackHandler

          public CallbackHandler getCallbackHandler()

    - #### setCallbackHandler

          public void setCallbackHandler(CallbackHandler h)

    - #### isAuthenticated

          public boolean isAuthenticated()

    - #### isCommitted

          public boolean isCommitted()

    - #### setAuthenticated

          public void setAuthenticated(boolean authState)

    - #### setCommitted

          public void setCommitted(boolean commitState)

    - #### abort

          public boolean abort()
                        throws LoginException

      Specified by:
        `abort` in interface `LoginModule`
      Throws:
        `LoginException`
      See Also:
        `LoginModule.abort()`

    - #### commit

          public boolean commit()
                         throws LoginException

      Specified by:
        `commit` in interface `LoginModule`
      Returns:
        true if committed, false if not (likely not authenticated)
      Throws:
        `LoginException`
      See Also:
        `LoginModule.commit()`

    - #### configureCallbacks

          public Callback[] configureCallbacks()

    - #### getUserInfo

          public abstract UserInfo getUserInfo(String username)
                                        throws Exception

      Throws:
        `Exception`

    - #### login

          public boolean login()
                        throws LoginException

      Specified by:
        `login` in interface `LoginModule`
      Returns:
        true if is authenticated, false otherwise
      Throws:
        `LoginException`
      See Also:
        `LoginModule.login()`

    - #### logout

          public boolean logout()
                         throws LoginException

      Specified by:
        `logout` in interface `LoginModule`
      Returns:
        true always
      Throws:
        `LoginException`
      See Also:
        `LoginModule.logout()`

    - #### initialize

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

      Specified by:
        `initialize` in interface `LoginModule`
      Parameters:
        `subject` -
        `callbackHandler` -
        `sharedState` -
        `options` -
      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.