summaryrefslogtreecommitdiffstats
path: root/auth/auth-core/src/main
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-06-19 12:35:58 -0500
committerInstrumental <jonathan.gathman@att.com>2018-06-19 12:36:31 -0500
commit08a868676801f78f41a62b8061deb46c89ac7255 (patch)
tree7cd0cf0e5454601578fbfbe19e7af82eeba2b3e4 /auth/auth-core/src/main
parent4e6f7bc234a18194dd4370ad8e3c36aba9df2355 (diff)
Fix HttpClient/Filter
Issue-ID: AAF-364 Change-Id: Ic21a769226cf309571d96a0f75b583d4f75c7887 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-core/src/main')
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java3
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java10
2 files changed, 7 insertions, 6 deletions
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java
index a25c5f31..cbc0737c 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java
@@ -62,9 +62,10 @@ public class AuthzTransFilter extends TransFilter<AuthzTrans> {
}
@Override
- protected AuthzTrans newTrans() {
+ protected AuthzTrans newTrans(HttpServletRequest req) {
AuthzTrans at = env.newTrans();
at.setLur(getLur());
+ at.set(req);
return at;
}
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java
index 1011767a..400c539c 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java
@@ -84,22 +84,22 @@ public abstract class TransFilter<TRANS extends TransStore> implements Filter {
return cadi.getLur();
}
- protected abstract TRANS newTrans();
+ protected abstract TRANS newTrans(HttpServletRequest request);
protected abstract TimeTaken start(TRANS trans, ServletRequest request);
protected abstract void authenticated(TRANS trans, Principal p);
protected abstract void tallyHo(TRANS trans);
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
- TRANS trans = newTrans();
+ HttpServletRequest req = (HttpServletRequest)request;
+ HttpServletResponse res = (HttpServletResponse)response;
+
+ TRANS trans = newTrans(req);
TimeTaken overall = start(trans,request);
try {
request.setAttribute(TRANS_TAG, trans);
- HttpServletRequest req = (HttpServletRequest)request;
- HttpServletResponse res = (HttpServletResponse)response;
-
if(no_authn!=null) {
for(String prefix : no_authn) {
if(req.getPathInfo().startsWith(prefix)) {