X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-oauth%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Foauth%2Fmapper%2FMapper1_0.java;h=027a51a7685b07961227dc59dedccfb1d5022060;hb=refs%2Fchanges%2F87%2F65287%2F1;hp=4be079e41a467e230dcc756e3a03650b6940aa14;hpb=ead32f193586e39b59bb366bddf70e665173a52d;p=aaf%2Fauthz.git diff --git a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java index 4be079e4..027a51a7 100644 --- a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java +++ b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java @@ -78,7 +78,7 @@ public class Mapper1_0 extends MapperIntrospect1_0 implements Mapper map = req.getParameterMap(); - for(Entry es : map.entrySet()) { + for (Entry es : map.entrySet()) { switch(es.getKey()) { case "client_id": - if(es.getValue().length==1) { + if (es.getValue().length==1) { tr.setClientId(es.getValue()[0]); data = true; } break; case "client_secret": - if(es.getValue().length==1) { + if (es.getValue().length==1) { tr.setClientSecret(es.getValue()[0]); data = true; } break; case "username": - if(es.getValue().length==1) { + if (es.getValue().length==1) { tr.setUsername(es.getValue()[0]); data = true; } break; case "password": - if(es.getValue().length==1) { + if (es.getValue().length==1) { tr.setPassword(es.getValue()[0]); data = true; } break; case "scope": - if(es.getValue().length==1) { + if (es.getValue().length==1) { tr.setScope(es.getValue()[0]); data = true; } break; case "grant_type": - if(es.getValue().length==1) { + if (es.getValue().length==1) { tr.setGrantType(es.getValue()[0]); data = true; } break; case "refresh_token": - if(es.getValue().length==1) { + if (es.getValue().length==1) { tr.setRefreshToken(es.getValue()[0]); data = true; } @@ -158,12 +158,12 @@ public class Mapper1_0 extends MapperIntrospect1_0 implements Mapper ss = tdd.scopes(true); - for(String s: Split.split(' ', tokReq.getScope())) { + for (String s: Split.split(' ', tokReq.getScope())) { ss.add(s); } } @@ -193,12 +193,12 @@ public class Mapper1_0 extends MapperIntrospect1_0 implements Mapper tokenFromData(Result rd) { - if(rd.notOK()) { + if (rd.notOK()) { return Result.err(rd); } Data d = rd.value; Token token = new Token(); - if(OAuthService.TOKEN_TYPE.values().length>d.type) { + if (OAuthService.TOKEN_TYPE.values().length>d.type) { token.setTokenType(OAuthService.TOKEN_TYPE.values()[d.type].name()); } else { token.setTokenType("Invalid");