public class DelegatingNegotiateSecurityFilter extends NegotiateSecurityFilter
Supports optional injection of spring security entities, allowing Waffle to act as an interface towards an identity provider(the AD).
Below mentioned entities are verified to be set before invoked, inherited entities are not.AuthenticationManager allows for the service provider to authorize the principal.authenticationSuccessHandler allows for the service provider to further populate the
Authentication object.AuthenticationFailureHandler is called if the AuthenticationManager throws an
AuthenticationException.AccessDeniedHandler is called if the AuthenticationManager throws an
AccessDeniedException.
<bean id="waffleNegotiateSecurityFilter"
class="waffle.spring.DelegatingNegotiateSecurityFilter"
scope="tenant">
<property name="allowGuestLogin" value="false" />
<property name="Provider" ref="waffleSecurityFilterProviderCollection" />
<property name="authenticationManager" ref="authenticationManager" />
<property name="authenticationSuccessHandler" ref="authenticationSuccessHandler" />
<property name="authenticationFailureHandler" ref="authenticationFailureHandler" />
<property name="accessDeniedHandler" ref="accessDeniedHandler" />
<property name="defaultGrantedAuthority">
<null />
</property>
</bean>
| Constructor and Description |
|---|
DelegatingNegotiateSecurityFilter()
Instantiates a new delegating negotiate security filter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
org.springframework.security.web.access.AccessDeniedHandler |
getAccessDeniedHandler()
Gets the access denied handler.
|
org.springframework.security.web.authentication.AuthenticationFailureHandler |
getAuthenticationFailureHandler()
Gets the authentication failure handler.
|
org.springframework.security.authentication.AuthenticationManager |
getAuthenticationManager()
Gets the authentication manager.
|
org.springframework.security.web.authentication.AuthenticationSuccessHandler |
getAuthenticationSuccessHandler()
Gets the authentication success handler.
|
void |
setAccessDeniedHandler(org.springframework.security.web.access.AccessDeniedHandler value)
Sets the access denied handler.
|
protected boolean |
setAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authentication)
Invoked when authentication towards ad was succesful to populate securitycontext Override to add service provider
authorization checks.
|
void |
setAuthenticationFailureHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler value)
Sets the authentication failure handler.
|
void |
setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager value)
Sets the authentication manager.
|
void |
setAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler value)
Sets the authentication success handler.
|
doFilter, getDefaultGrantedAuthority, getGrantedAuthorityFactory, getPrincipalFormat, getProvider, getRoleFormat, isAllowGuestLogin, isImpersonate, sendUnauthorized, setAllowGuestLogin, setDefaultGrantedAuthority, setGrantedAuthorityFactory, setImpersonate, setPrincipalFormat, setPrincipalFormatEnum, setProvider, setRoleFormat, setRoleFormatEnumpublic DelegatingNegotiateSecurityFilter()
public org.springframework.security.web.access.AccessDeniedHandler getAccessDeniedHandler()
public void setAccessDeniedHandler(org.springframework.security.web.access.AccessDeniedHandler value)
value - the accessDeniedHandler to setpublic org.springframework.security.web.authentication.AuthenticationFailureHandler getAuthenticationFailureHandler()
public void setAuthenticationFailureHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler value)
value - the authenticationFailureHandler to setprotected boolean setAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authentication)
NegotiateSecurityFiltersetAuthentication in class NegotiateSecurityFilterrequest - the requestresponse - the responseauthentication - the authenticationpublic void afterPropertiesSet()
throws javax.servlet.ServletException
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanafterPropertiesSet in class NegotiateSecurityFilterjavax.servlet.ServletExceptionpublic org.springframework.security.web.authentication.AuthenticationSuccessHandler getAuthenticationSuccessHandler()
public void setAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler value)
value - the authenticationSuccessHandler to setpublic org.springframework.security.authentication.AuthenticationManager getAuthenticationManager()
public void setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager value)
value - the authenticationManager to setCopyright © 2010–2020 com.github.waffle. All rights reserved.