Package org.apache.nifi.web.server.log
Class RequestAuthenticationFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.apache.nifi.web.server.log.RequestAuthenticationFilter
- All Implemented Interfaces:
jakarta.servlet.Filter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.EnvironmentAware,org.springframework.core.env.EnvironmentCapable,org.springframework.web.context.ServletContextAware
public class RequestAuthenticationFilter
extends org.springframework.web.filter.OncePerRequestFilter
Request Authentication Filter sets Jetty Request Authentication using Spring Security Authentication as Principal
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]private static final Subjectprivate static final org.slf4j.Loggerprivate static final StringFields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoFilterInternal(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, jakarta.servlet.FilterChain filterChain) Read Authentication username from request attribute and set Jetty Authentication when foundMethods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Field Details
-
DEFAULT_SUBJECT
-
DEFAULT_ROLES
-
METHOD
- See Also:
-
logger
private static final org.slf4j.Logger logger
-
-
Constructor Details
-
RequestAuthenticationFilter
public RequestAuthenticationFilter()
-
-
Method Details
-
doFilterInternal
protected void doFilterInternal(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse, jakarta.servlet.FilterChain filterChain) throws jakarta.servlet.ServletException, IOException Read Authentication username from request attribute and set Jetty Authentication when found- Specified by:
doFilterInternalin classorg.springframework.web.filter.OncePerRequestFilter- Parameters:
httpServletRequest- HTTP Servlet RequesthttpServletResponse- HTTP Servlet ResponsefilterChain- Filter Chain- Throws:
jakarta.servlet.ServletException- Thrown on FilterChain.doFilter()IOException- Thrown on FilterChain.doFilter()
-