public class AuthCheckFilter extends Object implements javax.servlet.Filter
Constructor and Description |
---|
AuthCheckFilter() |
Modifier and Type | Method and Description |
---|---|
static void |
addExclude(String exclude)
Adds a new string that when present in the requested URL will skip
the "is logged" checking.
|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain) |
static AuthCheckFilter |
getInstance()
Returns a singleton instance of the AuthCheckFilter.
|
void |
init(javax.servlet.FilterConfig config) |
static boolean |
isServletRequestAuthenticatorInstanceOf(Class<? extends ServletRequestAuthenticator> clazz)
Indicates if the currently-installed ServletRequestAuthenticator is an instance of a specific class.
|
static void |
removeExclude(String exclude)
Removes a string that when present in the requested URL will skip
the "is logged" checking.
|
static boolean |
testURLPassesExclude(String url,
String exclude)
Returns true if a URL passes an exclude rule.
|
public static AuthCheckFilter getInstance()
public static boolean isServletRequestAuthenticatorInstanceOf(Class<? extends ServletRequestAuthenticator> clazz)
clazz
- the class to checktrue
if the currently-installed ServletRequestAuthenticator is an instance of clazz, otherwise false
.public static void addExclude(String exclude)
exclude
- the string to exclude.public static void removeExclude(String exclude)
exclude
- the string that was being excluded.public static boolean testURLPassesExclude(String url, String exclude)
url
- the URL to test.exclude
- the exclude rule.public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
public void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
IOException
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
Copyright © 2003-2008 Jive Software.