Port fix bug 40524. request.getAuthType() now returns CLIENT_CERT rather than CLIENT...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 27 Jan 2007 21:32:52 +0000 (21:32 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 27 Jan 2007 21:32:52 +0000 (21:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@500629 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/authenticator/Constants.java
java/org/apache/catalina/authenticator/SSLAuthenticator.java
java/org/apache/catalina/authenticator/SingleSignOn.java
java/org/apache/catalina/authenticator/SingleSignOnEntry.java
webapps/docs/changelog.xml

index 0ffcd88..4cf47ba 100644 (file)
@@ -25,7 +25,7 @@ public class Constants {
 
     // Authentication methods for login configuration
     public static final String BASIC_METHOD = "BASIC";
-    public static final String CERT_METHOD = "CLIENT-CERT";
+    public static final String CERT_METHOD = "CLIENT_CERT";
     public static final String DIGEST_METHOD = "DIGEST";
     public static final String FORM_METHOD = "FORM";
 
@@ -55,7 +55,7 @@ public class Constants {
      * or not any user has been authenticated:</p>
      * <ul>
      * <li><strong>request.getAuthType()</strong>
-     *     will return BASIC, CLIENT-CERT, DIGEST, FORM, or <code>null</code>
+     *     will return BASIC, CLIENT_CERT, DIGEST, FORM, or <code>null</code>
      *     if there is no authenticated user.</li>
      * <li><strong>request.getUserPrincipal()</strong>
      *     will return the authenticated <code>Principal</code> returned by the
index 5c9a666..9cfc6cb 100644 (file)
@@ -102,7 +102,7 @@ public class SSLAuthenticator
 
         // NOTE: We don't try to reauthenticate using any existing SSO session,
         // because that will only work if the original authentication was
-        // BASIC or FORM, which are less secure than the CLIENT-CERT auth-type
+        // BASIC or FORM, which are less secure than the CLIENT_CERT auth-type
         // specified for this webapp
         //
         // Uncomment below to allow previous FORM or BASIC authentications
index e399f4e..00c212a 100644 (file)
@@ -616,7 +616,7 @@ public class SingleSignOn
      * <p>
      * The purpose of this method is to allow an SSO entry that was
      * established without a username/password combination (i.e. established
-     * following DIGEST or CLIENT-CERT authentication) to be updated with
+     * following DIGEST or CLIENT_CERT authentication) to be updated with
      * a username and password if one becomes available through a subsequent
      * BASIC or FORM authentication.  The SSO entry will then be usable for
      * reauthentication.
@@ -630,7 +630,7 @@ public class SingleSignOn
      * @param ssoId     identifier of Single sign to be updated
      * @param principal the <code>Principal</code> returned by the latest
      *                  call to <code>Realm.authenticate</code>.
-     * @param authType  the type of authenticator used (BASIC, CLIENT-CERT,
+     * @param authType  the type of authenticator used (BASIC, CLIENT_CERT,
      *                  DIGEST or FORM)
      * @param username  the username (if any) used for the authentication
      * @param password  the password (if any) used for the authentication
index 7cf68ac..af2a02c 100644 (file)
@@ -56,7 +56,7 @@ public class SingleSignOnEntry
      *
      * @param principal the <code>Principal</code> returned by the latest
      *                  call to <code>Realm.authenticate</code>.
-     * @param authType  the type of authenticator used (BASIC, CLIENT-CERT,
+     * @param authType  the type of authenticator used (BASIC, CLIENT_CERT,
      *                  DIGEST or FORM)
      * @param username  the username (if any) used for the authentication
      * @param password  the password (if any) used for the authentication
@@ -119,7 +119,7 @@ public class SingleSignOnEntry
      * Gets the name of the authentication type originally used to authenticate
      * the user associated with the SSO.
      *
-     * @return "BASIC", "CLIENT-CERT", "DIGEST", "FORM" or "NONE"
+     * @return "BASIC", "CLIENT_CERT", "DIGEST", "FORM" or "NONE"
      */
     public String getAuthType() {
         return (this.authType);
@@ -170,7 +170,7 @@ public class SingleSignOnEntry
      *
      * @param principal the <code>Principal</code> returned by the latest
      *                  call to <code>Realm.authenticate</code>.
-     * @param authType  the type of authenticator used (BASIC, CLIENT-CERT,
+     * @param authType  the type of authenticator used (BASIC, CLIENT_CERT,
      *                  DIGEST or FORM)
      * @param username  the username (if any) used for the authentication
      * @param password  the password (if any) used for the authentication
index 81fd38a..595a255 100644 (file)
         created during a secure request. Patch provided by Chris Halstead.
         (markt)
       </fix>
+      <fix>
+        <bug>40524</bug>: HttpServletRequest.getAuthType() now returns
+        CLIENT_CERT rather than CLIENT-CERT for certificate authentication
+        as per the spec. Note that web.xml continues to use CLIENT-CERT to
+        specify the certificate authentication should be used. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">