tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1366720 - /tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java
Date Sat, 28 Jul 2012 18:01:48 GMT
Author: markt
Date: Sat Jul 28 18:01:47 2012
New Revision: 1366720

URL: http://svn.apache.org/viewvc?rev=1366720&view=rev
Log:
No need to parse user name twice with different methods

Modified:
    tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java

Modified: tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java?rev=1366720&r1=1366719&r2=1366720&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java (original)
+++ tomcat/trunk/java/org/apache/catalina/authenticator/DigestAuthenticator.java Sat Jul 28
18:01:47 2012
@@ -244,7 +244,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);
                 return (true);
@@ -280,7 +280,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
@@ -486,6 +489,12 @@ public class DigestAuthenticator extends
             this.validateUri = validateUri;
         }
 
+
+        public String getUsername() {
+            return userName;
+        }
+
+
         public boolean validate(Request request, String authorization) {
             // Validate the authorization credentials format
             if (authorization == null) {



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


Mime
View raw message