diff options
Diffstat (limited to 'auth/auth-core')
-rw-r--r-- | auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java | 3 | ||||
-rw-r--r-- | auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java | 10 |
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)) { |