[WAGON-552] Replace Commons Codec with Plexus Utils
diff --git a/wagon-tcks/wagon-tck-http/pom.xml b/wagon-tcks/wagon-tck-http/pom.xml
index 3462708..c73bcae 100644
--- a/wagon-tcks/wagon-tck-http/pom.xml
+++ b/wagon-tcks/wagon-tck-http/pom.xml
@@ -55,11 +55,6 @@
<artifactId>wagon-provider-api</artifactId>
</dependency>
<dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.4</version>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>compile</scope>
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/AuthSnoopFilter.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/AuthSnoopFilter.java
index dd23d9b..79110aa 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/AuthSnoopFilter.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/AuthSnoopFilter.java
@@ -20,6 +20,7 @@
*/
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
@@ -29,13 +30,12 @@
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.codec.binary.Base64;
-
+import org.codehaus.plexus.util.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
+ *
*/
public class AuthSnoopFilter
implements Filter
@@ -56,7 +56,7 @@
{
logger.info( "Authorization: " + authHeader );
String data = authHeader.substring( "BASIC ".length() );
- String decoded = new String( Base64.decodeBase64( data ) );
+ String decoded = new String( Base64.decodeBase64( data.getBytes( StandardCharsets.US_ASCII ) ) );
logger.info( decoded );
String[] creds = decoded.split( ":" );
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ProxyAuthenticationFilter.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ProxyAuthenticationFilter.java
index 2da6aa4..c851fee 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ProxyAuthenticationFilter.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/fixture/ProxyAuthenticationFilter.java
@@ -19,9 +19,8 @@
* under the License.
*/
-import org.apache.commons.codec.binary.Base64;
-
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
@@ -32,8 +31,10 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.codehaus.plexus.util.Base64;
+
/**
- *
+ *
*/
public class ProxyAuthenticationFilter
implements Filter
@@ -69,7 +70,7 @@
else
{
String data = header.substring( "BASIC ".length() );
- data = new String( Base64.decodeBase64( data ) );
+ data = new String( Base64.decodeBase64( data.getBytes( StandardCharsets.US_ASCII ) ) );
String[] creds = data.split( ":" );
if ( !creds[0].equals( username ) || !creds[1].equals( password ) )