public class JDBCAuthFilter extends AuthFilter
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.
Constructor and Description |
---|
JDBCAuthFilter() |
Modifier and Type | Method and Description |
---|---|
void |
init(FilterConfig config) |
boolean |
isUserLoggedIn(HttpServletRequest req,
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.
|
destroy, doFilter
public JDBCAuthFilter()
public void init(FilterConfig config) throws ServletException
init
in interface Filter
init
in class AuthFilter
ServletException
public boolean isUserLoggedIn(HttpServletRequest req, HttpServletResponse res) throws java.sql.SQLException
isUserLoggedIn
in class AuthFilter
java.sql.SQLException