diff options
author | Instrumental <jonathan.gathman@att.com> | 2018-09-06 06:47:30 -0500 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2018-09-06 07:24:31 -0500 |
commit | 5882678eebcbaa5d640dbc04a56cbd6f8678719e (patch) | |
tree | 9f881bdb8587595d9c57ecd380614b9fd4fe295a /auth | |
parent | e0a2e0d0c79dcaf4532d0ca3aeefd3f5546af404 (diff) |
Add timing CadiFilter
Issue-ID: AAF-468
Change-Id: I335a1106609ac99e12eeb0640a06c9eb969e9bbb
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth')
4 files changed, 11 insertions, 10 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Perm.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Perm.java index 469284a2..acfb3390 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Perm.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Perm.java @@ -106,7 +106,9 @@ public class Perm implements Comparable<Perm> { try { while(iter.hasNext()) { row = iter.next(); - Perm pk = new Perm(row.getString(0),row.getString(1),row.getString(2),row.getString(3), row.getString(4), row.getSet(5,String.class)); + Perm pk = new Perm( + row.getString(0),row.getString(1),row.getString(2), + row.getString(3), row.getString(4), row.getSet(5,String.class)); keys.put(pk.encode(), pk); data.put(pk,pk.roles); } diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java index bc563f39..96349aed 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/CachingFileAccess.java @@ -37,7 +37,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; -import java.util.Date; import java.util.HashSet; import java.util.Map; import java.util.Map.Entry; @@ -553,10 +552,10 @@ public class CachingFileAccess<TRANS extends Trans> extends HttpCode<TRANS, Void content.remove(entry.getKey()); //System.out.println("removed Cache Item " + entry.getKey() + "/" + new Date(entry.getValue().access).toString()); } - for(int i=end;i<size;++i) { - Entry<String, Content> entry = scont.get(i).entry; - //System.out.println("remaining Cache Item " + entry.getKey() + "/" + new Date(entry.getValue().access).toString()); - } +// for(int i=end;i<size;++i) { +// Entry<String, Content> entry = scont.get(i).entry; +// //System.out.println("remaining Cache Item " + entry.getKey() + "/" + new Date(entry.getValue().access).toString()); +// } } } } diff --git a/auth/auth-fs/src/test/java/org/onap/aaf/auth/fs/test/JU_AAF_FS.java b/auth/auth-fs/src/test/java/org/onap/aaf/auth/fs/test/JU_AAF_FS.java index 27f771c1..3c68f61d 100644 --- a/auth/auth-fs/src/test/java/org/onap/aaf/auth/fs/test/JU_AAF_FS.java +++ b/auth/auth-fs/src/test/java/org/onap/aaf/auth/fs/test/JU_AAF_FS.java @@ -48,8 +48,6 @@ import java.io.File; import java.io.IOException; import java.io.PrintStream; -import org.junit.Test; - public class JU_AAF_FS { AuthzEnv aEnv; AAF_FS aafFs; diff --git a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/OAuth2FormHttpTafResp.java b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/OAuth2FormHttpTafResp.java index 23d87e3e..6adb4641 100644 --- a/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/OAuth2FormHttpTafResp.java +++ b/auth/auth-oauth/src/main/java/org/onap/aaf/auth/oauth/OAuth2FormHttpTafResp.java @@ -32,19 +32,20 @@ import org.onap.aaf.cadi.taf.AbsTafResp; import org.onap.aaf.cadi.taf.TafResp; public class OAuth2FormHttpTafResp extends AbsTafResp implements TafResp { + private static final String tafName = DirectOAuthTAF.class.getSimpleName(); private HttpServletResponse httpResp; private RESP status; private final boolean wasFailed; public OAuth2FormHttpTafResp(Access access, OAuth2FormPrincipal principal, String desc, RESP status, HttpServletResponse resp, boolean wasFailed) { - super(access,principal, desc); + super(access,tafName,principal, desc); httpResp = resp; this.status = status; this.wasFailed = wasFailed; } public OAuth2FormHttpTafResp(Access access, TrustPrincipal principal, String desc, RESP status,HttpServletResponse resp) { - super(access,principal, desc); + super(access,tafName,principal, desc); httpResp = resp; this.status = status; wasFailed = true; // if Trust Principal added, must be good @@ -62,4 +63,5 @@ public class OAuth2FormHttpTafResp extends AbsTafResp implements TafResp { public boolean isFailedAttempt() { return wasFailed; } + } |