org.apache.geronimo.security.realm.providers
Class ConstantLoginModule

java.lang.Object
  extended by org.apache.geronimo.security.realm.providers.ConstantLoginModule
All Implemented Interfaces:
LoginModule

public class ConstantLoginModule
extends Object
implements LoginModule

ConstantLoginModule allows a single user and multiple group principals to be added to an authenticated Subject via configuration during application deployment. ConstantLoginModule would normally be used along with a more conventional LoginModule. A potential use case for ConstantLoginModule is a situation where you want to associate a single user (or group) to an authenticated user, but the authentication mechanism does not contain such a group. For example, ConstantLoginModule could allow an "Authenticated" user principal to be added to the Subject.

To configure, add the following to the of your geronimo deployment plan: Constant org.apache.geronimo.security.realm.providers.ConstantLoginModule authenticated group1,group2


Constructor Summary
ConstantLoginModule()
           
 
Method Summary
 boolean abort()
           
 boolean commit()
          Add the user and group principals to the Subject.
 void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)
          Save the userName and groupNames settings for use during commit()
 boolean login()
           
 boolean logout()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantLoginModule

public ConstantLoginModule()
Method Detail

abort

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

commit

public boolean commit()
               throws LoginException
Add the user and group principals to the Subject. Group names are separated by ',' characters.

Specified by:
commit in interface LoginModule
Throws:
LoginException

initialize

public void initialize(Subject subject,
                       CallbackHandler callbackHandler,
                       Map sharedState,
                       Map options)
Save the userName and groupNames settings for use during commit()

Specified by:
initialize in interface LoginModule

login

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

logout

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


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.