tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1366723 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/authenticator/DigestAuthenticator.java
Date Sat, 28 Jul 2012 18:04:29 GMT
Author: markt
Date: Sat Jul 28 18:04:29 2012
New Revision: 1366723

URL: http://svn.apache.org/viewvc?rev=1366723&view=rev
Log:
Don't parse username twice with different methods

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1366720

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java?rev=1366723&r1=1366722&r2=1366723&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java Sat
Jul 28 18:04:29 2012
@@ -273,7 +273,7 @@ public class DigestAuthenticator extends
             }
             
             if (principal != null) {
-                String username = parseUsername(authorization);
+                String username = digestInfo.getUsername();
                 register(request, response, principal,
                         HttpServletRequest.DIGEST_AUTH,
                          username, null);
@@ -310,7 +310,10 @@ public class DigestAuthenticator extends
      * can be identified, return <code>null</code>
      *
      * @param authorization Authorization string to be parsed
+     *
+     * @deprecated  Unused. Will be removed in Tomcat 8.0.x
      */
+    @Deprecated
     protected String parseUsername(String authorization) {
 
         // Validate the authorization credentials format
@@ -518,6 +521,11 @@ public class DigestAuthenticator extends
             this.validateUri = validateUri;
         }
 
+
+        public String getUsername() {
+            return userName;
+        }
+
         public boolean validate(Request request, String authorization,
                 LoginConfig config) {
             // Validate the authorization credentials format



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message