diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-11-10 09:21:49 +0000 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-11-10 09:31:12 +0000 |
commit | 5eb0e49534114edf8a76fef5b2a8e50c7bdaa812 (patch) | |
tree | b69c0e5d60fc48dd0c8084dfffb178b89566b83f /aai-aaf-auth/src | |
parent | 8b504f6db32630ae4b6774efabc87ed76a950053 (diff) |
Replace deprecated methods in aai-common
Issue-ID: AAI-3589
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I9e32b879ee0d143a6b66e06d425bed7412139e58
Diffstat (limited to 'aai-aaf-auth/src')
-rw-r--r-- | aai-aaf-auth/src/main/java/org/onap/aai/aaf/auth/AAIAuthCore.java | 17 |
1 files changed, 14 insertions, 3 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) { |