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(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.
|
destroy, doFilter
public JDBCAuthFilter()
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
init
in class AuthFilter
javax.servlet.ServletException
public boolean isUserLoggedIn(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws SQLException
isUserLoggedIn
in class AuthFilter
SQLException