Class NegSecFilter
java.lang.Object
waffle.servlet.NegotiateSecurityFilter
com.github.farmgeek4life.jenkins.negotiatesso.NegSecFilter
- All Implemented Interfaces:
jakarta.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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doFilter
(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) Add call to advertise Jenkins headers, as appropriate.void
setAllowLocalhost
(boolean allow) void
setRedirect
(boolean doEnable, String redirectTo) Methods inherited from class waffle.servlet.NegotiateSecurityFilter
destroy, getAuth, getPrincipalFormat, getProviders, getRoleFormat, init, isAllowGuestLogin, isImpersonate, setAuth, setImpersonate, setPrincipalFormat, setRoleFormat
-
Field Details
-
BYPASS_HEADER
- See Also:
-
-
Constructor Details
-
NegSecFilter
public NegSecFilter()
-
-
Method Details
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException Add call to advertise Jenkins headers, as appropriate.- Specified by:
doFilter
in interfacejakarta.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/chainjakarta.servlet.ServletException
- pass-through from request/response/chain
-
setRedirect
- 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
-