hudson.security
Class HudsonFilter

java.lang.Object
  extended by hudson.security.HudsonFilter
All Implemented Interfaces:
javax.servlet.Filter

public class HudsonFilter
extends Object
implements javax.servlet.Filter

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
static AuthenticationManagerProxy AUTHENTICATION_MANAGER
          Deprecated. in 1.271. This proxy always delegate to Hudson.getInstance().getSecurityRealm().getSecurityComponents().manager, so use that instead.
static RememberMeServicesProxy REMEMBER_ME_SERVICES_PROXY
          Deprecated. in 1.271. This proxy always delegate to Hudson.getInstance().getSecurityRealm().getSecurityComponents().rememberMe, so use that instead.
static UserDetailsServiceProxy USER_DETAILS_SERVICE_PROXY
          Deprecated. in 1.271. This proxy always delegate to Hudson.getInstance().getSecurityRealm().getSecurityComponents().userDetails, so use that instead.
 
Constructor Summary
HudsonFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
           
static HudsonFilter get(javax.servlet.ServletContext context)
          Gets the HudsonFilter created for the given ServletContext.
 void init(javax.servlet.FilterConfig filterConfig)
           
 void reset(SecurityRealm securityRealm)
          Reset the proxies and filter for a change in SecurityRealm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTHENTICATION_MANAGER

public static final AuthenticationManagerProxy AUTHENTICATION_MANAGER
Deprecated. in 1.271. This proxy always delegate to Hudson.getInstance().getSecurityRealm().getSecurityComponents().manager, so use that instead.
AuthenticationManager proxy so that the acegi filter chain can stay the same even when security setting is reconfigured.


USER_DETAILS_SERVICE_PROXY

public static final UserDetailsServiceProxy USER_DETAILS_SERVICE_PROXY
Deprecated. in 1.271. This proxy always delegate to Hudson.getInstance().getSecurityRealm().getSecurityComponents().userDetails, so use that instead.
UserDetailsService proxy so that the acegi filter chain can stay the same even when security setting is reconfigured.


REMEMBER_ME_SERVICES_PROXY

public static final RememberMeServicesProxy REMEMBER_ME_SERVICES_PROXY
Deprecated. in 1.271. This proxy always delegate to Hudson.getInstance().getSecurityRealm().getSecurityComponents().rememberMe, so use that instead.
RememberMeServices proxy so that the acegi filter chain can stay the same even when security setting is reconfigured.

Constructor Detail

HudsonFilter

public HudsonFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

get

public static HudsonFilter get(javax.servlet.ServletContext context)
Gets the HudsonFilter created for the given ServletContext.


reset

public void reset(SecurityRealm securityRealm)
           throws javax.servlet.ServletException
Reset the proxies and filter for a change in SecurityRealm.

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:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter


Copyright © 2004-2013. All Rights Reserved.