Package hudson.security
Class HudsonFilter
- java.lang.Object
-
- hudson.security.HudsonFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
public class HudsonFilter extends Object implements javax.servlet.Filter
Filterthat 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 bySecurityRealm.createFilter(FilterConfig).- Since:
- 1.160
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description static AuthenticationManagerProxyAUTHENTICATION_MANAGERDeprecated.in 1.271.static RememberMeServicesProxyREMEMBER_ME_SERVICES_PROXYDeprecated.in 1.271.static UserDetailsServiceProxyUSER_DETAILS_SERVICE_PROXYDeprecated.in 1.271.
-
Constructor Summary
Constructors Constructor Description HudsonFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)static HudsonFilterget(javax.servlet.ServletContext context)Gets theHudsonFiltercreated for the givenServletContext.voidinit(javax.servlet.FilterConfig filterConfig)voidreset(SecurityRealm securityRealm)Reset the proxies and filter for a change inSecurityRealm.
-
-
-
Field Detail
-
AUTHENTICATION_MANAGER
@Deprecated public static final AuthenticationManagerProxy 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 public static final UserDetailsServiceProxy 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 public static final RememberMeServicesProxy 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.
-
-
Method Detail
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException- Specified by:
initin interfacejavax.servlet.Filter- Throws:
javax.servlet.ServletException
-
get
public static HudsonFilter get(javax.servlet.ServletContext context)
Gets theHudsonFiltercreated for the givenServletContext.
-
reset
public void reset(SecurityRealm securityRealm) throws javax.servlet.ServletException
Reset the proxies and filter for a change inSecurityRealm.- Throws:
javax.servlet.ServletException
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException- Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-
destroy
public void destroy()
- Specified by:
destroyin interfacejavax.servlet.Filter
-
-