Clover coverage report - Cactus 1.4b1 for J2EE API 12
Coverage timestamp: Mon Jul 29 2002 00:33:16 BST
file stats: LOC: 100   Methods: 5
NCLOC: 27   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
AbstractAuthentication.java - 0% 0% 0%
 1   
 /*   Generated by AspectJ version 1.0.5 */
 2   
 package org.apache.cactus.client.authentication;
 3   
 import org.apache.cactus.WebRequest;
 4   
 
 5   
 /** 
 6   
  * This class was designed with the simple assumption that ALL authentication 
 7   
  * implementations will have a String <code>Name</code> and a String 
 8   
  * <code>Password</code>. Two abstract functions <code>validateName</code> and 
 9   
  * <code>validatePassword</code> provide for concrete implementations to 
 10   
  * perform character validation. All the work is then done in the 
 11   
  * <code>configure</code> abstract function. In the 
 12   
  * <code>BasicAuthentication</code> class, for example, the configuring is done 
 13   
  * by adding the request property "Authorization" with a value 
 14   
  * "Basic &lt;base64encode of 'userid:password'&gt;". 
 15   
  * 
 16   
  * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a> 
 17   
  * @author <a href="mailto:Jason.Robertson@acs-inc.com">Jason Robertson</a> 
 18   
  * 
 19   
  * @since 1.3 
 20   
  * 
 21   
  * @version $Id: AbstractAuthentication.java,v 1.2 2002/07/24 20:46:48 vmassol Exp $ 
 22   
  */
 23   
 public abstract class AbstractAuthentication {
 24   
   /** 
 25   
        * User name part of the Credential 
 26   
        */
 27   
   private String name;
 28   
   /** 
 29   
        * Password part of the Credential 
 30   
        */
 31   
   private String password;
 32   
   /** 
 33   
        * @param theName user name of the Credential 
 34   
        * @param thePassword user password of the Credential 
 35   
        */
 36  0
   public AbstractAuthentication(String theName, String thePassword) {
 37  0
     super();
 38  0
     this.setName(theName);
 39  0
     this.setPassword(thePassword);
 40   
   } 
 41   
   /** 
 42   
        * Sets the user name. 
 43   
        * 
 44   
        * @param theName user name of the Credential 
 45   
        */
 46  0
   public void setName(String theName) {
 47  0
     this.validateName(theName);
 48  0
     this.name = theName;
 49   
   } 
 50   
 
 51   
   /** 
 52   
        * @return the user name of the Credential 
 53   
        */
 54  0
   public String getName() {
 55  0
     return this.name;
 56   
   } 
 57   
 
 58   
   /** 
 59   
        * Sets the user password of the Credential. 
 60   
        * 
 61   
        * @param thePassword the user password of the Credential 
 62   
        */
 63  0
   public void setPassword(String thePassword) {
 64  0
     this.validatePassword(thePassword);
 65  0
     this.password = thePassword;
 66   
   } 
 67   
 
 68   
   /** 
 69   
        * Verify that the user name passed as parameter is a valid user name 
 70   
        * for the current authentication scheme. 
 71   
        * 
 72   
        * @param theName the user name to validate 
 73   
        */
 74   
   protected abstract void validateName(String theName);
 75   
 
 76   
   /** 
 77   
        * Verify that the user password passed as parameter is a valid user 
 78   
        * password for the current authentication scheme. 
 79   
        * 
 80   
        * @param thePassword the user password to validate 
 81   
        */
 82   
   protected abstract void validatePassword(String thePassword);
 83   
 
 84   
   /** 
 85   
        * Modify the <code>WebRequest</code> passed as parameter so 
 86   
        * that it will carry authentication information. 
 87   
        * 
 88   
        * @param theRequest the request object that will be sent to the Cactus 
 89   
        *        Redirector over HTTP 
 90   
        */
 91   
   public abstract void configure(WebRequest theRequest);
 92   
 
 93   
   /** 
 94   
        * @return the user password of the Credential 
 95   
        */
 96  0
   protected String getPassword() {
 97  0
     return this.password;
 98   
   } 
 99   
 
 100   
 }