org.mule.module.jaas.loginmodule
Class DefaultLoginModule

java.lang.Object
  extended by org.mule.module.jaas.loginmodule.DefaultLoginModule
All Implemented Interfaces:
LoginModule

public class DefaultLoginModule
extends Object
implements LoginModule

This is the Default Login Module for the Mule Jaas Authentication. It extends Jaas' own LoginModule interface.


Constructor Summary
DefaultLoginModule()
           
 
Method Summary
 boolean abort()
          Abort if authentication fails
 boolean commit()
          Commit if authentication succeeds, otherwise return false
 List getCredentialList(String credentials)
          This method parses the credentials string and populates the credentials list against which the username and password submitted with the request will be checked
 void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)
          Initialises the callbackHandler, the credentials and the credentials list
 boolean login()
          This method attempts to login the user by checking his credentials against those of the authorised users.
 boolean logout()
          Returns true when authentication succeeds or false when it fails
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLoginModule

public DefaultLoginModule()
Method Detail

abort

public final boolean abort()
                    throws LoginException
Abort if authentication fails

Specified by:
abort in interface LoginModule
Returns:
boolean
Throws:
LoginException

commit

public final boolean commit()
                     throws LoginException
Commit if authentication succeeds, otherwise return false

Specified by:
commit in interface LoginModule
Returns:
boolean
Throws:
LoginException

initialize

public final void initialize(Subject subject,
                             CallbackHandler callbackHandler,
                             Map sharedState,
                             Map options)
Initialises the callbackHandler, the credentials and the credentials list

Specified by:
initialize in interface LoginModule
Parameters:
subject -
callbackHandler -
sharedState -
options -

login

public final boolean login()
                    throws LoginException
This method attempts to login the user by checking his credentials against those of the authorised users.

Specified by:
login in interface LoginModule
Throws:
LoginException - This is thrown either when there is no callback Handler or else when the user fails to be authenticated

logout

public final boolean logout()
Returns true when authentication succeeds or false when it fails

Specified by:
logout in interface LoginModule
Returns:
succeeded

getCredentialList

public final List getCredentialList(String credentials)
This method parses the credentials string and populates the credentials list against which the username and password submitted with the request will be checked

Parameters:
credentials -
Returns:
outputList


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.