X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-locate%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Flocate%2FBasicAuthCode.java;h=30258d80042d760c58bd3a41c86d61bbb5361b08;hb=7e966914050e66219689001ff4ab601a49eef0ac;hp=c5239a5aaaf0e8f7d7986cd56dae33096d9ed580;hpb=ead32f193586e39b59bb366bddf70e665173a52d;p=aaf%2Fauthz.git diff --git a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/BasicAuthCode.java b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/BasicAuthCode.java index c5239a5a..30258d80 100644 --- a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/BasicAuthCode.java +++ b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/BasicAuthCode.java @@ -45,7 +45,7 @@ public class BasicAuthCode extends LocateCode { @Override public void handle(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp) throws Exception { Principal p = trans.getUserPrincipal(); - if(p == null) { + if (p == null) { trans.error().log("Transaction not Authenticated... no Principal"); } else if (p instanceof BasicPrincipal) { // the idea is that if call is made with this credential, and it's a BasicPrincipal, it's ok @@ -55,12 +55,12 @@ public class BasicAuthCode extends LocateCode { } else if (p instanceof X509Principal) { // Since X509Principal has priority, BasicAuth Info might be there, but not validated. String ba; - if((ba=req.getHeader("Authorization"))!=null && ba.startsWith("Basic ")) { + if ((ba=req.getHeader("Authorization"))!=null && ba.startsWith("Basic ")) { ba = Symm.base64noSplit.decode(ba.substring(6)); int colon = ba.indexOf(':'); - if(colon>=0) { + if (colon>=0) { String err; - if((err=authn.validate(ba.substring(0, colon), ba.substring(colon+1),trans))==null) { + if ((err=authn.validate(ba.substring(0, colon), ba.substring(colon+1),trans))==null) { resp.setStatus(HttpStatus.OK_200); } else { trans.audit().log(ba.substring(0,colon),": ",err);