Home » geronimo-2.2-source-release » org.apache.geronimo.security.realm.providers » [javadoc | source]
org.apache.geronimo.security.realm.providers
public class: ConstantLoginModule [javadoc | source]
java.lang.Object
   org.apache.geronimo.security.realm.providers.ConstantLoginModule

All Implemented Interfaces:
    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
Method from org.apache.geronimo.security.realm.providers.ConstantLoginModule Summary:
abort,   commit,   initialize,   login,   logout
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.geronimo.security.realm.providers.ConstantLoginModule Detail:
 public boolean abort() throws LoginException 
 public boolean commit() throws LoginException 
    Add the user and group principals to the Subject. Group names are separated by ',' characters.
 public  void initialize(Subject subject,
    CallbackHandler callbackHandler,
    Map sharedState,
    Map options) 
    Save the userName and groupNames settings for use during commit()
 public boolean login() throws LoginException 
 public boolean logout() throws LoginException