diff options
Diffstat (limited to 'cmso-optimizer/src/main/java')
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); } |