Class AuthenticationFilter
java.lang.Object
com.openmeet.webapp.logicLayer.filters.AuthenticationFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
This class is used to filter all requests and check if the user is authenticated.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AuthenticationFilter
public AuthenticationFilter()
-
-
Method Details
-
init
public void init(jakarta.servlet.FilterConfig fConfig) - Specified by:
initin interfacejakarta.servlet.Filter
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse resp, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException Checks if the user is authenticated. If not, the user will be redirected to the login page.- Specified by:
doFilterin interfacejakarta.servlet.Filter- Parameters:
req- the request. It is used to get the session and the request URI.resp- the response. It is used to redirect the user to the login page.- Throws:
IOExceptionjakarta.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejakarta.servlet.Filter
-