public class WebAuthFilter
extends java.lang.Object
implements javax.servlet.Filter
web app
,
and authenticates with the FWD server, saving a context switcher in the session's
fwd.switcher
attribute. This allows the servlet requests to switch to the
requester's context, before executing FWD appserver calls.Modifier and Type | Field and Description |
---|---|
private static java.lang.ThreadLocal<javax.servlet.http.HttpServletRequest> |
currentRequest
The current request being processed, on this thread.
|
Constructor and Description |
---|
WebAuthFilter() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
No-op.
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain filter)
Filter the servlet request.
|
static javax.servlet.http.HttpServletRequest |
getCurrentRequest()
Get the current servlet request, being executed on this thread.
|
void |
init(javax.servlet.FilterConfig arg0)
No-op.
|
private static java.lang.ThreadLocal<javax.servlet.http.HttpServletRequest> currentRequest
public static javax.servlet.http.HttpServletRequest getCurrentRequest()
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain filter) throws java.io.IOException, javax.servlet.ServletException
fwd.switcher
attribute set, it will authenticate to the in-process FWD server using these
web.xml
init parameters:
fwd.processalias
, with the process alias to authenticate.fwd.keystorefile
, with the key-store file with the private-key.fwd.keystorepass
, the private-key password.ContextSwitcher
instance as
returned by SecurityManager.getContextSwitcher(java.lang.Runnable)
, in the fwd.switcher
session attribute.doFilter
in interface javax.servlet.Filter
request
- The servlet request.response
- The servlet response.filter
- The filter chain.java.io.IOException
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
public void init(javax.servlet.FilterConfig arg0) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException