Package hudson.security
Class HudsonFilter
java.lang.Object
hudson.security.HudsonFilter
- All Implemented Interfaces:
 jakarta.servlet.Filter,org.kohsuke.stapler.CompatibleFilter
Filter that Jenkins uses to implement security support.
 
 This is the instance the servlet container creates, but
 internally this just acts as a proxy to the real Filter,
 created by SecurityRealm.createFilter(FilterConfig).
- Since:
 - 1.160
 - Author:
 - Kohsuke Kawaguchi
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AuthenticationManagerProxyDeprecated.in 1.271.static final RememberMeServicesProxyDeprecated.in 1.271.static final UserDetailsServiceProxyDeprecated.in 1.271. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) static HudsonFilterget(jakarta.servlet.ServletContext context) Gets theHudsonFiltercreated for the givenServletContext.voidinit(jakarta.servlet.FilterConfig filterConfig) voidreset(SecurityRealm securityRealm) Reset the proxies and filter for a change inSecurityRealm.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kohsuke.stapler.CompatibleFilter
doFilter, init 
- 
Field Details
- 
AUTHENTICATION_MANAGER
Deprecated.in 1.271. This proxy always delegate toHudson.getInstance().getSecurityRealm().getSecurityComponents().manager, so use that instead.AuthenticationManagerproxy so that the Spring Security filter chain can stay the same even when security setting is reconfigured. - 
USER_DETAILS_SERVICE_PROXY
Deprecated.in 1.271. This proxy always delegate toHudson.getInstance().getSecurityRealm().getSecurityComponents().userDetails, so use that instead.UserDetailsServiceproxy so that the Spring Security filter chain can stay the same even when security setting is reconfigured. - 
REMEMBER_ME_SERVICES_PROXY
Deprecated.in 1.271. This proxy always delegate toHudson.getInstance().getSecurityRealm().getSecurityComponents().rememberMe, so use that instead.RememberMeServicesproxy so that the Spring Security filter chain can stay the same even when security setting is reconfigured. 
 - 
 - 
Constructor Details
- 
HudsonFilter
public HudsonFilter() 
 - 
 - 
Method Details
- 
init
public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException - Specified by:
 initin interfacejakarta.servlet.Filter- Throws:
 jakarta.servlet.ServletException
 - 
get
Gets theHudsonFiltercreated for the givenServletContext. - 
reset
Reset the proxies and filter for a change inSecurityRealm.- Throws:
 jakarta.servlet.ServletException
 - 
doFilter
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Specified by:
 doFilterin interfacejakarta.servlet.Filter- Throws:
 IOExceptionjakarta.servlet.ServletException
 - 
destroy
public void destroy()- Specified by:
 destroyin interfacejakarta.servlet.Filter
 
 -