aboutsummaryrefslogtreecommitdiffstats
path: root/cmso-optimizer/src/main/java
diff options
context:
space:
mode:
authorJerry Flood <jflood@att.com>2020-01-22 07:02:20 -0500
committerJerry Flood <jflood@att.com>2020-01-22 09:41:50 -0500
commit4504d02f860b740a17a3d72c19ef5d04803896e6 (patch)
treec6cb8a00c1d1dde0ba4c83f5c2b6f05d43268cac /cmso-optimizer/src/main/java
parent8ca99e970af44e64ed6bd73f1e7b66e49b35cc60 (diff)
Update robot docker build
Issue-ID: OPTFRA-681 Change-Id: Id72cdaad6c8ab8ddcb448ff9b5b3c10a7566b76d Signed-off-by: Jerry Flood <jflood@att.com>
Diffstat (limited to 'cmso-optimizer/src/main/java')
-rwxr-xr-xcmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java5
-rwxr-xr-xcmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafClientCache.java8
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java2
3 files changed, 8 insertions, 7 deletions
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java
index 61c1eb8..2f2fe45 100755
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthProvider.java
@@ -66,8 +66,9 @@ public class AafAuthProvider implements AuthenticationProvider {
sessionId = webAuthDetails.getRemoteAddress() + ":" + webAuthDetails.getSessionId();
}
}
- if ((env.getProperty(AafProperties.aafEnabled.toString(), Boolean.class, true)) && (clientCache.authenticate(name, password, sessionId) != AuthorizationResult.Authenticated)) {
- return null;
+ if ((env.getProperty(AafProperties.aafEnabled.toString(), Boolean.class, true))
+ && (clientCache.authenticate(name, password, sessionId) != AuthorizationResult.Authenticated)) {
+ return null;
}
return new UsernamePasswordAuthenticationToken(name, password, new ArrayList<>());
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafClientCache.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafClientCache.java
index 1ce581a..72ea552 100755
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafClientCache.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafClientCache.java
@@ -139,11 +139,11 @@ public class AafClientCache {
}
permissions = cache.get(getCacheKey(auth));
if ((permissions == null) && (!auth.get("password").equals(""))) {
- permissions = getPermissionsFromAaf(auth);
- if (permissions != null) {
- cache.put(getCacheKey(auth), permissions);
- }
+ permissions = getPermissionsFromAaf(auth);
+ if (permissions != null) {
+ cache.put(getCacheKey(auth), permissions);
}
+ }
}
return permissions;
}
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java
index 02d8886..788cf60 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java
@@ -69,7 +69,7 @@ public class CmsoClientFilters implements ClientRequestFilter, ClientResponseFil
String transactionId = (String) headers.getFirst(MessageHeaders.HeadersEnum.TransactionID.toString());
String mdcId = MDC.get(MDC_KEY_REQUEST_ID);
if ((transactionId == null || transactionId.equals("")) && (mdcId != null)) {
- headers.add(HeadersEnum.TransactionID.toString(), mdcId);
+ headers.add(HeadersEnum.TransactionID.toString(), mdcId);
}
headers.add(HeadersEnum.FromAppID.toString(), appId);
}