com.force.sdk.springsecurity
Class LogoutSuccessHandler
java.lang.Object
org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
com.force.sdk.springsecurity.LogoutSuccessHandler
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean, org.springframework.security.web.authentication.logout.LogoutSuccessHandler
public class LogoutSuccessHandler
- extends org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
- implements org.springframework.beans.factory.InitializingBean
Called after all logout handlers are processed. Redirects user to the configured logout URL.
Can be configured to also log the user out of Force.com. Both options can be configured on the fss:oauth element.
The logout URL comes from the default-logout-success attribute and the flag for logging out from Force.com comes
from the logout-from-force-dot-com attribute. See @doclink force-security for more information.
- Author:
- Fiaz Hossain, John Simone
Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler |
DEFAULT_TARGET_PARAMETER, logger |
Methods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler |
getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseReferer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogoutSuccessHandler
public LogoutSuccessHandler()
- Default constructor. No values defaulted.
The oauthConnector and securityContextService must be set manually if not created in a Spring container.
setLogoutFromForceDotCom
public void setLogoutFromForceDotCom(boolean logoutFromForceDotCom)
setOauthConnector
public void setOauthConnector(ForceOAuthConnector oauthConnector)
setSecurityContextService
public void setSecurityContextService(SecurityContextService securityContextService)
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
determineTargetUrl
protected String determineTargetUrl(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Overrides:
determineTargetUrl
in class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler
onLogoutSuccess
public void onLogoutSuccess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authentication)
throws IOException,
javax.servlet.ServletException
- Clear the security context. This is necessary when cookie based storage is used.
- Specified by:
onLogoutSuccess
in interface org.springframework.security.web.authentication.logout.LogoutSuccessHandler
- Overrides:
onLogoutSuccess
in class org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
- Parameters:
request
- HttpServletRequest
response
- HttpServletResponse
authentication
- Authentication
- Throws:
IOException
- only from call to super class
javax.servlet.ServletException
- only from call to super class
Copyright © 2011. All Rights Reserved.