User: starksm 
  Date: 01/12/28 20:32:45

  Modified:    src/main/org/jboss/security/auth/spi Tag: Branch_2_4
                        AbstractServerLoginModule.java
  Log:
  Clean up the tests
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.3   +50 -32    
jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java
  
  Index: AbstractServerLoginModule.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosssx/src/main/org/jboss/security/auth/spi/AbstractServerLoginModule.java,v
  retrieving revision 1.1.4.2
  retrieving revision 1.1.4.3
  diff -u -r1.1.4.2 -r1.1.4.3
  --- AbstractServerLoginModule.java    2001/12/09 00:55:21     1.1.4.2
  +++ AbstractServerLoginModule.java    2001/12/29 04:32:45     1.1.4.3
  @@ -25,25 +25,34 @@
   import org.jboss.security.NestableGroup;
   import org.jboss.security.SimpleGroup;
   
  -/** This class implements the common functionality required for a JAAS
  - server side LoginModule and implements the JBossSX standard Subject usage
  - pattern of storing identities and roles. Subclass this module to create your
  - own custom LoginModule and override the getRoles() and getIdentity()
  - methods.
  - 
  - You may also wish to override
  - public void initialize(Subject subject, CallbackHandler callbackHandler, Map 
sharedState, Map options)
  - 
  - In which case the first line of your initialize() method should be:
  - super.initialize(subject, callbackHandler, sharedState, options);
  - You may also wish to override
  - public boolean login() throws LoginException
  - In which case the last line of your login() method should be
  - return super.login();
  - 
  - @author <a href="[EMAIL PROTECTED]">Edward Kenworthy</a>, 12th Dec 
2000
  - @author [EMAIL PROTECTED]
  - @version $Revision: 1.1.4.2 $
  +/**
  + * This class implements the common functionality required for a JAAS
  + * server side LoginModule and implements the JBossSX standard Subject usage
  + * pattern of storing identities and roles. Subclass this module to create your
  + * own custom LoginModule and override the login(), getRoleSets() and getIdentity()
  + * methods.
  + * <p>
  + * You may also wish to override
  + * <pre>
  + *    public void initialize(Subject subject, CallbackHandler callbackHandler, Map 
sharedState, Map options)
  + * </pre>
  + * In which case the first line of your initialize() method should be:
  + * <pre>
  + *    super.initialize(subject, callbackHandler, sharedState, options);
  + * </pre>
  + * <p>
  + * You may also wish to override
  + * <pre>
  + *    public boolean login() throws LoginException
  + * </pre>
  + * In which case the last line of your login() method should be
  + * <pre>
  + *    return super.login();
  + * </pre>
  + *
  + *@author <a href="[EMAIL PROTECTED]">Edward Kenworthy</a>, 12th 
Dec 2000
  + *@author [EMAIL PROTECTED]
  + *@version $Revision: 1.1.4.3 $
    */
   public abstract class AbstractServerLoginModule implements LoginModule
   {
  @@ -56,15 +65,24 @@
      /** Flag indicating if the shared credential should be used */
      protected boolean useFirstPass;
      
  -   //--- Begin LoginModule interface methods
  -   /** Initialize the login module. This stores the subject, callbackHandler
  -    and sharedState and options for the login session.
  -    @param options,
  -    @option
  -    @option password-stacking: if true, the login identity will be taken from the
  -    javax.security.auth.login.name value of the sharedState map, and
  -    the proof of identity from the javax.security.auth.login.password
  -    value sharedState map.
  +//--- Begin LoginModule interface methods
  +   /**
  +    * Initialize the login module. This stores the subject, callbackHandler
  +    * and sharedState and options for the login session. Subclasses should override
  +    * if they need to process their own options. A call to super.initialize(...)
  +    * must be made in the case of an override.
  +    * <p>
  +    * The options are checked for the <em>password-stacking</em> parameter.
  +    * If this is set to "useFirstPass", the login identity will be taken from the
  +    * <code>javax.security.auth.login.name</code> value of the sharedState map,
  +    * and the proof of identity from the
  +    * <code>javax.security.auth.login.password</code> value of the sharedState map.
  +    *
  +    * @param subject the Subject to update after a successful login.
  +    * @param callbackHandler the CallbackHandler that will be used to obtain the
  +    *    the user identity and credentials.
  +    * @param sharedState a Map shared between all configured login module instances
  +    * @param options the parameters passed to the login module.
       */
      public void initialize(Subject subject, CallbackHandler callbackHandler, Map 
sharedState, Map options)
      {
  @@ -74,10 +92,10 @@
         this.options = options;
         log = Logger.getLogger(getClass());
         log.trace("initialize");
  -        /* Check for password sharing options. Any non-null value for
  -            password_stacking sets useFirstPass as this module has no way to
  -            validate any shared password.
  -         */
  +     /* Check for password sharing options. Any non-null value for
  +         password_stacking sets useFirstPass as this module has no way to
  +         validate any shared password.
  +      */
         String passwordStacking = (String) options.get("password-stacking");
         if( passwordStacking != null && 
passwordStacking.equalsIgnoreCase("useFirstPass") )
            useFirstPass = true;
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to