|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.SpyObject
net.spy.jwebkit.JWFilter
net.spy.jwebkit.auth.AuthFilter
public abstract class AuthFilter
ServletFilter to intercept requests and ensure they're authenticated and authorized.
| Field Summary | |
|---|---|
static java.lang.String |
AUTH_REQ_HEADER
The HTTP request header used to send authentication credentials. |
static java.lang.String |
AUTH_RES_HEADER
The HTTP response header used to issue the authentication challenge. |
| Constructor Summary | |
|---|---|
AuthFilter()
|
|
| Method Summary | |
|---|---|
protected void |
doAuthedChain(java.security.Principal p,
javax.servlet.http.HttpServletRequest hreq,
javax.servlet.http.HttpServletResponse hres,
javax.servlet.FilterChain chain)
Invoked when the authentication credentials match and the user should be permitted to access the requested resource. |
protected abstract void |
doCheckedFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
Run whatever authentication filters need to be attempted here. |
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
|
protected AuthAdaptor |
getAuthAdaptor()
Get the AuthAdaptor used by this filter. |
protected abstract java.lang.String |
getAuthType()
Get the authentication type used by this filter. |
protected javax.servlet.http.HttpServletRequest |
getRequestWithPrincipal(java.security.Principal p,
javax.servlet.http.HttpServletRequest hreq,
javax.servlet.http.HttpServletResponse hres)
Get a wrapper HttpServletRequest instance that wraps the given request and contains the given principal. |
protected javax.servlet.http.HttpServletRequest |
getRequestWithPrincipal(java.security.Principal p,
javax.servlet.http.HttpServletRequest hreq,
javax.servlet.http.HttpServletResponse hres,
java.lang.String authType)
Get a wrapper HttpServletRequest instance that wraps the given request and contains the given principal. |
void |
init(javax.servlet.FilterConfig c)
|
| Methods inherited from class net.spy.jwebkit.JWFilter |
|---|
destroy, getConfig |
| Methods inherited from class net.spy.SpyObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String AUTH_RES_HEADER
public static final java.lang.String AUTH_REQ_HEADER
| Constructor Detail |
|---|
public AuthFilter()
| Method Detail |
|---|
public void init(javax.servlet.FilterConfig c)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterinit in class JWFilterjavax.servlet.ServletExceptionprotected AuthAdaptor getAuthAdaptor()
protected javax.servlet.http.HttpServletRequest getRequestWithPrincipal(java.security.Principal p,
javax.servlet.http.HttpServletRequest hreq,
javax.servlet.http.HttpServletResponse hres,
java.lang.String authType)
p - the given principalhreq - the http servlet requesthres - the http servlet responseauthType - the authentication type
protected javax.servlet.http.HttpServletRequest getRequestWithPrincipal(java.security.Principal p,
javax.servlet.http.HttpServletRequest hreq,
javax.servlet.http.HttpServletResponse hres)
p - the given principalhreq - the http servlet requesthres - the http servlet response
protected abstract java.lang.String getAuthType()
HttpServletRequest
protected void doAuthedChain(java.security.Principal p,
javax.servlet.http.HttpServletRequest hreq,
javax.servlet.http.HttpServletResponse hres,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
p - the principal of the remote requesterhreq - the requesthres - the responsechain - the filter chain
java.io.IOException
javax.servlet.ServletExceptiongetRequestWithPrincipal(Principal,
HttpServletRequest, HttpServletResponse)
public void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletException
protected abstract void doCheckedFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
req - the requestres - the responsechain - the chain
java.io.IOException - if there are errors reading or writing
javax.servlet.ServletException - if there's a general error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||