org.apache.geronimo.security.jaas
Class RemoteLoginModuleLocalWrapper

java.lang.Object
  extended byorg.apache.geronimo.security.jaas.RemoteLoginModuleLocalWrapper
All Implemented Interfaces:
LoginModule

public class RemoteLoginModuleLocalWrapper
extends Object
implements LoginModule

A wrapper used by the Geronimo security system to make sure that the principals that are put into the subject get copied into RealmPrincipals which, in turn, also get placed into the subject. It is these RealmPrincipals that are used in the principal to role mapping.

Version:
$Revision: 1.3 $ $Date: 2004/02/25 09:58:09 $

Constructor Summary
RemoteLoginModuleLocalWrapper()
           
 
Method Summary
 boolean abort()
           
 boolean commit()
           
protected  void finalize()
          Tell the server that the allocated login module is no longer needed.
 void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)
           
 boolean login()
          Login using a remote login module.
 boolean logout()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteLoginModuleLocalWrapper

public RemoteLoginModuleLocalWrapper()
Method Detail

initialize

public void initialize(Subject subject,
                       CallbackHandler callbackHandler,
                       Map sharedState,
                       Map options)
Specified by:
initialize in interface LoginModule

login

public boolean login()
              throws LoginException
Login using a remote login module.

There is a possibility that the remote login module could have been reclaimed on the server side. This can occur if a long time passes between the call to initialize() and the call to login(). If this is the case, we will receive a ExpiredLoginModuleException. When this happens, we will reallocate a new login module and attempt to login again.

Specified by:
login in interface LoginModule
Returns:
true if the authentication was successful
Throws:
LoginException - if authentication fails
See Also:
ExpiredLoginModuleException

commit

public boolean commit()
               throws LoginException
Specified by:
commit in interface LoginModule
Throws:
LoginException

abort

public boolean abort()
              throws LoginException
Specified by:
abort in interface LoginModule
Throws:
LoginException

logout

public boolean logout()
               throws LoginException
Specified by:
logout in interface LoginModule
Throws:
LoginException

finalize

protected void finalize()
                 throws Throwable
Tell the server that the allocated login module is no longer needed.

Throws:
Throwable


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.