summaryrefslogtreecommitdiffstats
path: root/aai-aaf-auth
diff options
context:
space:
mode:
Diffstat (limited to 'aai-aaf-auth')
-rw-r--r--aai-aaf-auth/src/main/java/org/onap/aai/aaf/auth/AAIAuthCore.java17
-rw-r--r--aai-aaf-auth/src/main/java/org/onap/aai/aaf/auth/AafRequestFilter.java2
2 files changed, 15 insertions, 4 deletions
diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/auth/AAIAuthCore.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/auth/AAIAuthCore.java
index f591125c..72e2295e 100644
--- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/auth/AAIAuthCore.java
+++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/auth/AAIAuthCore.java
@@ -31,7 +31,19 @@ import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;
import java.nio.file.Files;
import java.nio.file.Paths;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Base64;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@@ -144,8 +156,7 @@ public final class AAIAuthCore {
LOGGER.debug("Reading from " + globalAuthFileName);
String authFile = new String(Files.readAllBytes(Paths.get(globalAuthFileName)));
- JsonParser parser = new JsonParser();
- JsonObject authObject = parser.parse(authFile).getAsJsonObject();
+ JsonObject authObject = JsonParser.parseString(authFile).getAsJsonObject();
if (authObject.has("roles")) {
JsonArray roles = authObject.getAsJsonArray("roles");
for (JsonElement role : roles) {
diff --git a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/auth/AafRequestFilter.java b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/auth/AafRequestFilter.java
index cfaa61be..2c8aaf28 100644
--- a/aai-aaf-auth/src/main/java/org/onap/aai/aaf/auth/AafRequestFilter.java
+++ b/aai-aaf-auth/src/main/java/org/onap/aai/aaf/auth/AafRequestFilter.java
@@ -99,7 +99,7 @@ public class AafRequestFilter {
return;
}
issuer = issuer.replaceAll("\\s+", "").toUpperCase();
- Enumeration hdrs = request.getHeaders(CertUtil.AAF_USER_CHAIN_HDR);
+ Enumeration<String> hdrs = request.getHeaders(CertUtil.AAF_USER_CHAIN_HDR);
while (hdrs.hasMoreElements()) {
String headerValue = (String) hdrs.nextElement();
LOGGER.debug("authorizationFilter user chain headerValue=" + headerValue);