mirror of https://github.com/apache/activemq.git
[AMQ-9235] Convert activemq-web to use j.util.Base64
This commit is contained in:
parent
e7f023ce8b
commit
33ceb9fe8a
|
@ -58,10 +58,6 @@
|
|||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>activemq-unit-tests</artifactId>
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.io.IOException;
|
|||
import java.io.ObjectInput;
|
||||
import java.io.ObjectOutput;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Base64;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
@ -385,7 +386,7 @@ public class WebClient implements HttpSessionActivationListener, HttpSessionBind
|
|||
String[] tokens = auth.split(" ");
|
||||
if (tokens.length == 2) {
|
||||
String encoded = tokens[1].trim();
|
||||
String credentials = new String(javax.xml.bind.DatatypeConverter.parseBase64Binary(encoded));
|
||||
String credentials = new String(Base64.getDecoder().decode(encoded));
|
||||
String[] creds = credentials.split(":");
|
||||
if (creds.length == 2) {
|
||||
client.setUsername(creds[0]);
|
||||
|
|
Loading…
Reference in New Issue