diff options
Diffstat (limited to 'auth/auth-oauth/src')
3 files changed, 14 insertions, 9 deletions
diff --git a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/AAF_OAuth.java b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/AAF_OAuth.java index ecc2ae5b..d73c3be3 100644 --- a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/AAF_OAuth.java +++ b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/AAF_OAuth.java @@ -140,19 +140,26 @@ public class AAF_OAuth extends AbsService<AuthzEnv,AuthzTrans> { } @Override - public Filter[] filters() throws CadiException, LocatorException { + public Filter[] _filters(Object ... additionalTafLurs) throws CadiException, LocatorException { try { - DirectOAuthTAF doat; - return new Filter[] {new AuthzTransFilter(env,aafCon(), + DirectOAuthTAF doat = new DirectOAuthTAF(env,question,facade1_0); + Object[] atl=new Object[additionalTafLurs.length+2]; + atl[0] = doat; + atl[1] = doat.directUserPass(); + + if(additionalTafLurs.length>0) { + System.arraycopy(additionalTafLurs, 0, atl, 2, additionalTafLurs.length); + } + + return new Filter[] { + new AuthzTransFilter(env,aafCon(), new AAFTrustChecker((Env)env), - doat = new DirectOAuthTAF(env,question,facade1_0), - doat.directUserPass() - )}; + atl + )}; } catch (NumberFormatException | APIException e) { throw new CadiException("Invalid Property information", e); } } - @SuppressWarnings("unchecked") @Override diff --git a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/DirectOAuthTAF.java b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/DirectOAuthTAF.java index 16d72686..e602e863 100644 --- a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/DirectOAuthTAF.java +++ b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/DirectOAuthTAF.java @@ -101,7 +101,6 @@ public class DirectOAuthTAF implements HttpTaf { } if("application/x-www-form-urlencoded".equals(req.getContentType())) { - @SuppressWarnings("unchecked") Map<String, String[]> map = req.getParameterMap(); String client_id=null,client_secret=null,username=null,password=null; for(Map.Entry<String, String[]> es : map.entrySet()) { 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 ee4237c8..688a03ce 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 @@ -88,7 +88,6 @@ public class Mapper1_0 extends MapperIntrospect1_0 implements Mapper<TokenReques public TokenRequest tokenReqFromParams(HttpServletRequest req) { TokenRequest tr = new TokenRequest(); boolean data = false; - @SuppressWarnings("unchecked") Map<String, String[]> map = req.getParameterMap(); for(Entry<String, String[]> es : map.entrySet()) { switch(es.getKey()) { |