Class NegSecFilter
- java.lang.Object
-
- waffle.servlet.NegotiateSecurityFilter
-
- com.github.farmgeek4life.jenkins.negotiatesso.NegSecFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
public final class NegSecFilter extends waffle.servlet.NegotiateSecurityFilter
Take a NegotiateSecurityFilter, and add a couple of items needed for Jenkins. Also, add an ability to configure the FilterProviders to use, outside of init(FilterConfig)
-
-
Field Summary
Fields Modifier and Type Field Description static String
BYPASS_HEADER
-
Constructor Summary
Constructors Constructor Description NegSecFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
Add call to advertise Jenkins headers, as appropriate.void
setAllowLocalhost(boolean allow)
void
setRedirect(boolean doEnable, String redirectTo)
-
-
-
Field Detail
-
BYPASS_HEADER
public static final String BYPASS_HEADER
- See Also:
- Constant Field Values
-
-
Method Detail
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
Add call to advertise Jenkins headers, as appropriate.- Specified by:
doFilter
in interfacejavax.servlet.Filter
- Overrides:
doFilter
in classwaffle.servlet.NegotiateSecurityFilter
- Parameters:
request
- The request - used to check for not authorized paths, check for localhost, redirect, and chain filtersresponse
- The response - used to redirect, advertise headers, or chain filterschain
- The filter chain- Throws:
IOException
- pass-through from request/response/chainjavax.servlet.ServletException
- pass-through from request/response/chain
-
setRedirect
public void setRedirect(boolean doEnable, String redirectTo)
- Parameters:
doEnable
- if redirect should be enabledredirectTo
- the site to redirect to
-
setAllowLocalhost
public void setAllowLocalhost(boolean allow)
- Parameters:
allow
- if localhost should bypass the SSO authentication
-
-