fc.web.servlet
Class JDBCAuthFilter
java.lang.Object
fc.web.servlet.AuthFilter
fc.web.servlet.JDBCAuthFilter
- All Implemented Interfaces:
- javax.servlet.Filter
public class JDBCAuthFilter
- extends AuthFilter
Implements a simple jdbc based authentication filter. Uses JDBCSession
to check for the valid existence of the session ID. The
session ID itself is expected to be inside a cookie (the presence of a
cookie is checked by invoking LoginServlet.getSIDCookie(javax.servlet.http.HttpServletRequest)
Uses the default database as specified in web.xml and requires
JDBCSession
to work against that database.
Method Summary |
void |
init(javax.servlet.FilterConfig config)
|
boolean |
isUserLoggedIn(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Checks to see if the session id (sid) exists in the cookie and it that
points to a valid (non-expired) database session. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBCAuthFilter
public JDBCAuthFilter()
init
public void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
- Specified by:
init
in interface javax.servlet.Filter
- Overrides:
init
in class AuthFilter
- Throws:
javax.servlet.ServletException
isUserLoggedIn
public boolean isUserLoggedIn(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws java.sql.SQLException
- Checks to see if the session id (sid) exists in the cookie and it that
points to a valid (non-expired) database session.
- Specified by:
isUserLoggedIn
in class AuthFilter
- Throws:
java.sql.SQLException