Package cloud.piranha.security.exousia
Class AuthorizationPreFilter
- java.lang.Object
-
- javax.servlet.GenericFilter
-
- javax.servlet.http.HttpFilter
-
- cloud.piranha.security.exousia.AuthorizationPreFilter
-
- All Implemented Interfaces:
FilterPriority
,Serializable
,Filter
,FilterConfig
public class AuthorizationPreFilter extends HttpFilter implements FilterPriority
This filter is uses to call a Jakarta Authentication system module at the start of an HTTP request.Note, this Filter *MUST* be installed as the first filter, and it should *NOT* be possible to place a filter before this filter. The standard Servlet API does not provide facilities for this.
- Author:
- Arjan Tijms
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ThreadLocal<HttpServletRequest>
localServletRequest
static int
PRIORITY
-
Constructor Summary
Constructors Constructor Description AuthorizationPreFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
Process the filter.void
doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
Process the filter.int
getPriority()
Returns the priority of this filter in the filter chain.void
init(FilterConfig filterConfig)
Initialize the filter.-
Methods inherited from class javax.servlet.GenericFilter
destroy, getFilterConfig, getFilterName, getInitParameter, getInitParameterNames, getServletContext, init
-
-
-
-
Field Detail
-
localServletRequest
public static ThreadLocal<HttpServletRequest> localServletRequest
-
PRIORITY
public static int PRIORITY
-
-
Method Detail
-
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
public void init(FilterConfig filterConfig) throws ServletException
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, ServletException
Description 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, ServletException
Description 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.
-
-