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>
</code>
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 accessDeniedHandler)
Sets the access denied handler.
|
protected boolean |
setAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authentication)
Sets the authentication.
|
void |
setAuthenticationFailureHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler authenticationFailureHandler)
Sets the authentication failure handler.
|
void |
setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
Sets the authentication manager.
|
void |
setAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler authenticationSuccessHandler)
Sets the authentication success handler.
|
doFilter, getDefaultGrantedAuthority, getGrantedAuthorityFactory, getPrincipalFormat, getProvider, getRoleFormat, isAllowGuestLogin, sendUnauthorized, setAllowGuestLogin, setDefaultGrantedAuthority, setGrantedAuthorityFactory, setPrincipalFormat, setPrincipalFormatEnum, setProvider, setRoleFormat, setRoleFormatEnum
public DelegatingNegotiateSecurityFilter()
public org.springframework.security.web.access.AccessDeniedHandler getAccessDeniedHandler()
public void setAccessDeniedHandler(org.springframework.security.web.access.AccessDeniedHandler accessDeniedHandler)
accessDeniedHandler
- the accessDeniedHandler to setpublic org.springframework.security.web.authentication.AuthenticationFailureHandler getAuthenticationFailureHandler()
public void setAuthenticationFailureHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler authenticationFailureHandler)
authenticationFailureHandler
- the authenticationFailureHandler to setprotected boolean setAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)
NegotiateSecurityFilter
setAuthentication
in class NegotiateSecurityFilter
request
- the requestresponse
- the responseauthentication
- the authenticationpublic void afterPropertiesSet() throws javax.servlet.ServletException
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class NegotiateSecurityFilter
javax.servlet.ServletException
public org.springframework.security.web.authentication.AuthenticationSuccessHandler getAuthenticationSuccessHandler()
public void setAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler authenticationSuccessHandler)
authenticationSuccessHandler
- the authenticationSuccessHandler to setpublic org.springframework.security.authentication.AuthenticationManager getAuthenticationManager()
public void setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
authenticationManager
- the authenticationManager to setCopyright © 2010–2015 com.github.dblock. All rights reserved.