summaryrefslogtreecommitdiffstats
path: root/auth/auth-oauth/src/main
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-06-23 11:01:25 -0500
committerInstrumental <jonathan.gathman@att.com>2018-06-23 11:13:11 -0500
commit732344f175150fed87e0140ad75152d325364c8b (patch)
tree472d8fd03ed111a22863f1b0387c60bb51c80825 /auth/auth-oauth/src/main
parent68f3e5a2875f74863b6cbe8eb6dc7138b89668a5 (diff)
JettyStartups to improve new Filters
Issue-ID: AAF-361 Change-Id: I74cac231ebac81466778c1c3ebca16c63ae6f78a Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-oauth/src/main')
-rw-r--r--auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/AAF_OAuth.java21
-rw-r--r--auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/DirectOAuthTAF.java1
-rw-r--r--auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/mapper/Mapper1_0.java1
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()) {