Class JDBCAuthFilter
java.lang.Object
fc.web.servlet.AuthFilter
fc.web.servlet.JDBCAuthFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
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(HttpServletRequest)
Uses the default database as specified in web.xml and requires
JDBCSession to work against that database.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(jakarta.servlet.FilterConfig config) booleanisUserLoggedIn(jakarta.servlet.http.HttpServletRequest req, jakarta.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 AuthFilter
destroy, doFilter
-
Constructor Details
-
JDBCAuthFilter
public JDBCAuthFilter()
-
-
Method Details
-
init
- Specified by:
initin interfacejakarta.servlet.Filter- Overrides:
initin classAuthFilter- Throws:
jakarta.servlet.ServletException
-
isUserLoggedIn
public boolean isUserLoggedIn(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws 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:
isUserLoggedInin classAuthFilter- Throws:
SQLException
-