You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xu...@apache.org on 2010/04/21 10:52:34 UTC

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

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;
     }
 
     /**