Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 47077 invoked from network); 21 Apr 2010 08:53:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Apr 2010 08:53:25 -0000 Received: (qmail 41858 invoked by uid 500); 21 Apr 2010 08:53:24 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 41758 invoked by uid 500); 21 Apr 2010 08:53:23 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 41750 invoked by uid 99); 21 Apr 2010 08:53:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Apr 2010 08:53:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Apr 2010 08:53:20 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D4D772388978; Wed, 21 Apr 2010 08:52:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r936206 - in /geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication: BasicAuthenticator.java ClientCertAuthenticator.java DigestAuthenticator.java FormAuthenticator.java Date: Wed, 21 Apr 2010 08:52:34 -0000 To: scm@geronimo.apache.org From: xuhaihong@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100421085234.D4D772388978@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: xuhaihong Date: Wed Apr 21 08:52:34 2010 New Revision: 936206 URL: http://svn.apache.org/viewvc?rev=936206&view=rev Log: Incorrect auth type is returned for client cert, replace all the return value with the static variable in the HTTPServletRequest Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/BasicAuthenticator.java geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/ClientCertAuthenticator.java geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/DigestAuthenticator.java geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/FormAuthenticator.java Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/BasicAuthenticator.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/BasicAuthenticator.java?rev=936206&r1=936205&r2=936206&view=diff ============================================================================== --- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/BasicAuthenticator.java (original) +++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/BasicAuthenticator.java Wed Apr 21 08:52:34 2010 @@ -22,6 +22,7 @@ package org.apache.geronimo.tomcat.secur import java.io.IOException; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.connector.Request; @@ -137,6 +138,6 @@ public class BasicAuthenticator implemen } public String getAuthType() { - return "BASIC"; + return HttpServletRequest.BASIC_AUTH; } } \ No newline at end of file Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/ClientCertAuthenticator.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/ClientCertAuthenticator.java?rev=936206&r1=936205&r2=936206&view=diff ============================================================================== --- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/ClientCertAuthenticator.java (original) +++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/ClientCertAuthenticator.java Wed Apr 21 08:52:34 2010 @@ -23,6 +23,7 @@ package org.apache.geronimo.tomcat.secur import java.io.IOException; import java.security.cert.X509Certificate; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.Globals; @@ -95,6 +96,6 @@ public class ClientCertAuthenticator imp } public String getAuthType() { - return "CLIENT-CERT"; + return HttpServletRequest.CLIENT_CERT_AUTH; } } Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/DigestAuthenticator.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/DigestAuthenticator.java?rev=936206&r1=936205&r2=936206&view=diff ============================================================================== --- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/DigestAuthenticator.java (original) +++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/DigestAuthenticator.java Wed Apr 21 08:52:34 2010 @@ -25,6 +25,7 @@ import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.StringTokenizer; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.connector.Request; @@ -107,7 +108,7 @@ public class DigestAuthenticator impleme } public String getAuthType() { - return "DIGEST"; + return HttpServletRequest.DIGEST_AUTH; } /** Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/FormAuthenticator.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/FormAuthenticator.java?rev=936206&r1=936205&r2=936206&view=diff ============================================================================== --- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/FormAuthenticator.java (original) +++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/security/authentication/FormAuthenticator.java Wed Apr 21 08:52:34 2010 @@ -28,6 +28,7 @@ import java.util.Locale; import javax.servlet.RequestDispatcher; import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.Session; @@ -205,7 +206,7 @@ public class FormAuthenticator implement } public String getAuthType() { - return "FORM"; + return HttpServletRequest.FORM_AUTH; } /**