You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2017/10/13 15:44:44 UTC
svn commit: r1812145 -
/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/websocket/BasicAuthenticator.java
Author: remm
Date: Fri Oct 13 15:44:43 2017
New Revision: 1812145
URL: http://svn.apache.org/viewvc?rev=1812145&view=rev
Log:
Fix compilation of BasicAuthenticator.
Modified:
tomcat/tc8.5.x/trunk/java/org/apache/tomcat/websocket/BasicAuthenticator.java
Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/websocket/BasicAuthenticator.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/websocket/BasicAuthenticator.java?rev=1812145&r1=1812144&r2=1812145&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/tomcat/websocket/BasicAuthenticator.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/tomcat/websocket/BasicAuthenticator.java Fri Oct 13 15:44:43 2017
@@ -18,9 +18,10 @@ package org.apache.tomcat.websocket;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
-import java.util.Base64;
import java.util.Map;
+import org.apache.tomcat.util.codec.binary.Base64;
+
/**
* Authenticator supporting the BASIC auth method.
*/
@@ -53,7 +54,7 @@ public class BasicAuthenticator extends
charset = StandardCharsets.ISO_8859_1;
}
- String base64 = Base64.getEncoder().encodeToString(userPass.getBytes(charset));
+ String base64 = Base64.encodeBase64String(userPass.getBytes(charset));
return " Basic " + base64;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org