Package cloud.piranha.security.exousia
Class AuthorizationFilter
java.lang.Object
jakarta.servlet.GenericFilter
jakarta.servlet.http.HttpFilter
cloud.piranha.security.exousia.AuthorizationFilter
- All Implemented Interfaces:
FilterPriority
,Filter
,FilterConfig
,Serializable
This filter is used to call a Jakarta Authorization system module at the
start of an HTTP request.
Note, this Filter should be installed after the AuthorizationPre filter, and after the AuthenticationFilter, but before any application filters.
- Author:
- Arjan Tijms
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
Process the filter.void
doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
Process the filter.int
Returns the priority of this filter in the filter chain.void
init(FilterConfig filterConfig)
Initialize the filter.Methods inherited from class jakarta.servlet.GenericFilter
getFilterConfig, getFilterName, getInitParameter, getInitParameterNames, getServletContext, init
-
Field Details
-
PRIORITY
public static int PRIORITYStores the priority.
-
-
Constructor Details
-
AuthorizationFilter
public AuthorizationFilter()
-
-
Method Details
-
getPriority
public int getPriority()Description copied from interface:FilterPriority
Returns the priority of this filter in the filter chain.- Specified by:
getPriority
in interfaceFilterPriority
- Returns:
- the priority value
-
init
Description copied from interface:Filter
Initialize the filter.- Specified by:
init
in interfaceFilter
- Overrides:
init
in classGenericFilter
- Parameters:
filterConfig
- the filter configuration.- Throws:
ServletException
- when a servlet error occurs.
-
doFilter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletExceptionDescription copied from class:HttpFilter
Process the filter.- Specified by:
doFilter
in interfaceFilter
- Overrides:
doFilter
in classHttpFilter
- Parameters:
request
- the request.response
- the responsechain
- the filter chain- Throws:
IOException
- when an I/O error occurs.ServletException
- when a servlet error occurs.
-
doFilter
protected void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletExceptionDescription copied from class:HttpFilter
Process the filter.- Overrides:
doFilter
in classHttpFilter
- Parameters:
request
- the request.response
- the response.chain
- the chain.- Throws:
IOException
- when an I/O error occurs.ServletException
- when a servlet error occurs.
-