SOLR-12121: Use a different JSON parser for JWTAuthPluginTest after upgrade to Hadoop3

This commit is contained in:
Jan Høydahl 2019-02-06 09:02:24 +01:00
parent 0b3ebdd290
commit d28ec13b9a
1 changed files with 1 additions and 2 deletions

View File

@ -44,7 +44,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.mortbay.util.ajax.JSON;
import static org.apache.solr.security.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.AUTZ_HEADER_PROBLEM;
import static org.apache.solr.security.JWTAuthPlugin.JWTAuthenticationResponse.AuthCode.NO_AUTZ_HEADER;
@ -398,7 +397,7 @@ public class JWTAuthPluginTest extends SolrTestCaseJ4 {
plugin.init(testConfig);
String headerBase64 = plugin.generateAuthDataHeader();
String headerJson = new String(Base64.base64ToByteArray(headerBase64), StandardCharsets.UTF_8);
Map<String,String> parsed = (Map<String, String>) JSON.parse(headerJson);
Map<String,String> parsed = (Map<String, String>) Utils.fromJSONString(headerJson);
assertEquals("solr:admin", parsed.get("scope"));
assertEquals("http://acmepaymentscorp/oauth/auz/authorize", parsed.get("authorizationEndpoint"));
assertEquals("solr-cluster", parsed.get("client_id"));