From: James Forsyth Date: Wed, 13 Mar 2019 00:52:01 +0000 (+0000) Subject: Merge "Add missing INFO.yaml blocks" X-Git-Tag: 1.4.1~28 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aai%2Fbabel.git;a=commitdiff_plain;h=895cafe7aaf5f462e0bf3c3a2ab7fcb863bba78e;hp=5fe1f19ac983319815b2e37c2bfaa1c917ae21d8 Merge "Add missing INFO.yaml blocks" --- diff --git a/License.txt b/License.txt index 5ce31aa..50054e3 100644 --- a/License.txt +++ b/License.txt @@ -1,8 +1,8 @@ ============LICENSE_START======================================================= org.onap.aai ================================================================================ -Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. -Copyright © 2017-2019 European Software Marketing Ltd. +Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. +Copyright (c) 2017-2019 European Software Marketing Ltd. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/main/java/org/onap/aai/auth/AAIAuthException.java b/src/main/java/org/onap/aai/auth/AAIAuthException.java index a29ee98..35adb5a 100644 --- a/src/main/java/org/onap/aai/auth/AAIAuthException.java +++ b/src/main/java/org/onap/aai/auth/AAIAuthException.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright © 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,10 +18,11 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.auth; public class AAIAuthException extends Exception { - /** */ + private static final long serialVersionUID = 1L; public AAIAuthException(String string) { diff --git a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java index ee5fb26..0eec7e1 100644 --- a/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java +++ b/src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 European Software Marketing Ltd. + * Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2017-2019 European Software Marketing Ltd. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.aai.auth; import com.fasterxml.jackson.core.JsonProcessingException; @@ -26,12 +27,14 @@ import com.fasterxml.jackson.databind.ObjectMapper; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Map.Entry; +import java.util.Optional; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.TimeUnit; @@ -43,15 +46,15 @@ public class AAIMicroServiceAuthCore { private static LogHelper applicationLogger = LogHelper.INSTANCE; - private static final String CONFIG_HOME = System.getProperty("CONFIG_HOME"); - - public static final String FILESEP = - (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator"); - public static final String APPCONFIG_DIR = - (CONFIG_HOME == null) ? System.getProperty("APP_HOME") + FILESEP + "appconfig" : CONFIG_HOME; - - private static String appConfigAuthDir = APPCONFIG_DIR + FILESEP + "auth"; - private static String defaultAuthFileName = appConfigAuthDir + FILESEP + "auth_policy.json"; + /** + * The default policy file is expected to be located in either one of + *