Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » realm » [javadoc | source]
org.apache.catalina.realm
public class: JAASMemoryLoginModule [javadoc | source]
java.lang.Object
   org.apache.catalina.realm.RealmBase
      org.apache.catalina.realm.MemoryRealm
         org.apache.catalina.realm.JAASMemoryLoginModule

All Implemented Interfaces:
    LoginModule, Realm, MBeanRegistration, Lifecycle

Implementation of the JAAS LoginModule interface, primarily for use in testing JAASRealm. It utilizes an XML-format data file of username/password/role information identical to that supported by org.apache.catalina.realm.MemoryRealm (except that digested passwords are not supported).

This class recognizes the following string-valued options, which are specified in the configuration file (and passed to our constructor in the options argument:

IMPLEMENTATION NOTE - This class implements Realm only to satisfy the calling requirements of the GenericPrincipal constructor. It does not actually perform the functionality required of a Realm implementation.

Field Summary
protected  CallbackHandler callbackHandler    The callback handler responsible for answering our requests. 
protected  boolean committed    Has our own commit() returned successfully? 
protected  Map options    The configuration information for this LoginModule
protected  String pathname    The absolute or relative pathname to the XML configuration file. 
protected  Principal principal    The Principal identified by our validation, or null if validation falied. 
protected  HashMap principals    The set of Principals loaded from our configuration file. 
protected static  StringManager sm    The string manager for this package. 
protected  Map sharedState    The state information that is shared with other configured LoginModule instances. 
protected  Subject subject    The subject for which we are performing authentication. 
Fields inherited from org.apache.catalina.realm.MemoryRealm:
info,  name
Fields inherited from org.apache.catalina.realm.RealmBase:
container,  containerLog,  digest,  digestEncoding,  info,  lifecycle,  md,  md5Encoder,  md5Helper,  sm,  started,  support,  validate,  allRolesMode,  type,  domain,  host,  path,  oname,  controller,  mserver,  initialized
Constructor:
 public JAASMemoryLoginModule() 
Method from org.apache.catalina.realm.JAASMemoryLoginModule Summary:
abort,   commit,   findSecurityConstraints,   initialize,   load,   login,   logout
Methods from org.apache.catalina.realm.MemoryRealm:
addUser,   authenticate,   getDigester,   getInfo,   getName,   getPassword,   getPathname,   getPrincipal,   getPrincipals,   setPathname,   start,   stop
Methods from org.apache.catalina.realm.RealmBase:
Digest,   addLifecycleListener,   addPropertyChangeListener,   authenticate,   authenticate,   authenticate,   authenticate,   backgroundProcess,   destroy,   digest,   findLifecycleListeners,   findSecurityConstraints,   getAllRolesMode,   getContainer,   getController,   getDigest,   getDigest,   getDigestEncoding,   getDomain,   getInfo,   getName,   getObjectName,   getPassword,   getPrincipal,   getPrincipal,   getType,   getValidate,   hasMessageDigest,   hasResourcePermission,   hasRole,   hasUserDataPermission,   init,   main,   postDeregister,   postRegister,   preDeregister,   preRegister,   removeLifecycleListener,   removePropertyChangeListener,   setAllRolesMode,   setContainer,   setController,   setDigest,   setDigestEncoding,   setValidate,   start,   stop
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.realm.JAASMemoryLoginModule Detail:
 public boolean abort() throws LoginException 
    Phase 2 of authenticating a Subject when Phase 1 fails. This method is called if the LoginContext failed somewhere in the overall authentication chain.
 public boolean commit() throws LoginException 
    Phase 2 of authenticating a Subject when Phase 1 was successful. This method is called if the LoginContext succeeded in the overall authentication chain.
 public SecurityConstraint[] findSecurityConstraints(Request request,
    Context context) 
    Return the SecurityConstraints configured to guard the request URI for this request, or null if there is no such constraint.
 public  void initialize(Subject subject,
    CallbackHandler callbackHandler,
    Map sharedState,
    Map options) 
    Initialize this LoginModule with the specified configuration information.
 protected  void load() 
    Load the contents of our configuration file.
 public boolean login() throws LoginException 
    Phase 1 of authenticating a Subject.
 public boolean logout() throws LoginException 
    Log out this user.