Package org.apereo.cas.web.flow.logout
Class TerminateSessionAction
- java.lang.Object
-
- org.springframework.webflow.action.AbstractAction
-
- org.apereo.cas.web.flow.logout.TerminateSessionAction
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,org.springframework.webflow.execution.Action
public class TerminateSessionAction extends org.springframework.webflow.action.AbstractActionTerminates the CAS SSO session by destroying all SSO state data (i.e. TGT, cookies).- Since:
- 4.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apereo.cas.CentralAuthenticationServicecentralAuthenticationServiceThe authentication service.protected org.springframework.webflow.action.EventFactorySupporteventFactorySupportThe event factory.protected org.apereo.cas.configuration.model.core.logout.LogoutPropertieslogoutPropertiesThe logout properties.static java.lang.StringREQUEST_PARAM_LOGOUT_REQUEST_CONFIRMEDParameter to indicate logout request is confirmed.protected org.apereo.cas.web.cookie.CasCookieBuilderticketGrantingTicketCookieGeneratorThe TGT cookie generator.protected org.apereo.cas.web.cookie.CasCookieBuilderwarnCookieGeneratorThe warn cookie generator.
-
Constructor Summary
Constructors Constructor Description TerminateSessionAction()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddestroyApplicationSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Destroy application session.org.springframework.webflow.execution.EventdoExecute(org.springframework.webflow.execution.RequestContext requestContext)protected static booleanisLogoutRequestConfirmed(org.springframework.webflow.execution.RequestContext requestContext)Check if the logout must be confirmed.org.springframework.webflow.execution.Eventterminate(org.springframework.webflow.execution.RequestContext context)Terminates the CAS SSO session by destroying the TGT (if any) and removing cookies related to the SSO session.
-
-
-
Field Detail
-
REQUEST_PARAM_LOGOUT_REQUEST_CONFIRMED
public static final java.lang.String REQUEST_PARAM_LOGOUT_REQUEST_CONFIRMED
Parameter to indicate logout request is confirmed.- See Also:
- Constant Field Values
-
eventFactorySupport
protected final org.springframework.webflow.action.EventFactorySupport eventFactorySupport
The event factory.
-
centralAuthenticationService
protected final org.apereo.cas.CentralAuthenticationService centralAuthenticationService
The authentication service.
-
ticketGrantingTicketCookieGenerator
protected final org.apereo.cas.web.cookie.CasCookieBuilder ticketGrantingTicketCookieGenerator
The TGT cookie generator.
-
warnCookieGenerator
protected final org.apereo.cas.web.cookie.CasCookieBuilder warnCookieGenerator
The warn cookie generator.
-
logoutProperties
protected final org.apereo.cas.configuration.model.core.logout.LogoutProperties logoutProperties
The logout properties.
-
-
Method Detail
-
isLogoutRequestConfirmed
protected static boolean isLogoutRequestConfirmed(org.springframework.webflow.execution.RequestContext requestContext)
Check if the logout must be confirmed.- Parameters:
requestContext- the request context- Returns:
- if the logout must be confirmed
-
doExecute
public org.springframework.webflow.execution.Event doExecute(org.springframework.webflow.execution.RequestContext requestContext)
- Specified by:
doExecutein classorg.springframework.webflow.action.AbstractAction
-
terminate
public org.springframework.webflow.execution.Event terminate(org.springframework.webflow.execution.RequestContext context)
Terminates the CAS SSO session by destroying the TGT (if any) and removing cookies related to the SSO session.- Parameters:
context- Request context.- Returns:
- "success"
-
destroyApplicationSession
protected void destroyApplicationSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Destroy application session. Also kills all delegated authn profiles via pac4j.- Parameters:
request- the requestresponse- the response
-
-