public abstract class AuthFilter extends Object implements javax.servlet.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(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain) |
void |
init(javax.servlet.FilterConfig config) |
abstract boolean |
isUserLoggedIn(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
This method should somehow check to see if the user is logged in or not.
|
public AuthFilter()
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain) throws javax.servlet.ServletException, IOException
doFilter
in interface javax.servlet.Filter
javax.servlet.ServletException
IOException
public abstract boolean isUserLoggedIn(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws Exception
Exception