tomcat-dev mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1366721&view=rev
Log:
Remove unnecessary code

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=1366721&r1=1366720&r2=1366721&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:02:27 2012
@@ -14,18 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.apache.catalina.authenticator;
 
-
 import java.io.IOException;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.security.Principal;
 import java.util.LinkedHashMap;
 import java.util.Map;
-import java.util.StringTokenizer;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -39,7 +35,6 @@ import org.apache.juli.logging.LogFactor
 import org.apache.tomcat.util.buf.B2CConverter;
 
 
-
 /**
  * An <b>Authenticator</b> and <b>Valve</b> implementation of HTTP
DIGEST
  * Authentication (see RFC 2069).
@@ -48,7 +43,6 @@ import org.apache.tomcat.util.buf.B2CCon
  * @author Remy Maucherat
  * @version $Id$
  */
-
 public class DigestAuthenticator extends AuthenticatorBase {
 
     private static final Log log = LogFactory.getLog(DigestAuthenticator.class);
@@ -276,49 +270,6 @@ public class DigestAuthenticator extends
 
 
     /**
-     * Parse the username from the specified authorization string.  If none
-     * 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
-        if (authorization == null) {
-            return (null);
-        }
-        if (!authorization.startsWith("Digest ")) {
-            return (null);
-        }
-        authorization = authorization.substring(7).trim();
-
-        StringTokenizer commaTokenizer =
-            new StringTokenizer(authorization, ",");
-
-        while (commaTokenizer.hasMoreTokens()) {
-            String currentToken = commaTokenizer.nextToken();
-            int equalSign = currentToken.indexOf('=');
-            if (equalSign < 0) {
-                return null;
-            }
-            String currentTokenName =
-                currentToken.substring(0, equalSign).trim();
-            String currentTokenValue =
-                currentToken.substring(equalSign + 1).trim();
-            if ("username".equals(currentTokenName)) {
-                return (removeQuotes(currentTokenValue));
-            }
-        }
-
-        return (null);
-
-    }
-
-
-    /**
      * Removes the quotes on a string. RFC2617 states quotes are optional for
      * all parameters except realm.
      */



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


Mime
View raw message