public abstract class AuthFilter extends java.lang.Object implements Filter
There are 2 ways that the original URL can be saved. One is to save it as a temporary cookie. This implies that the client must have cookies enabled. The other way is to tack it on to the URL as a url parameter. In either case, the original target is saved as a parameter with name=login.target and value=URLEncoder.encode(target_page)
The following keys must be specified as the init parameters.
WebApp
).
Constructor and Description |
---|
AuthFilter() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
doFilter(ServletRequest req,
ServletResponse res,
FilterChain chain) |
void |
init(FilterConfig config) |
abstract boolean |
isUserLoggedIn(HttpServletRequest req,
HttpServletResponse res)
This method should somehow check to see if the user is logged in or not.
|
public AuthFilter()
public void init(FilterConfig config) throws ServletException
init
in interface Filter
ServletException
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws ServletException, java.io.IOException
doFilter
in interface Filter
ServletException
java.io.IOException
public abstract boolean isUserLoggedIn(HttpServletRequest req, HttpServletResponse res) throws java.lang.Exception
java.lang.Exception