Package com.pingidentity.adapter.support
Class LogoutHandler
java.lang.Object
com.pingidentity.adapter.support.LogoutHandler
- All Implemented Interfaces:
org.sourceid.websso.servlet.adapter.Handler
The LogoutHandler allows the logout method of an IdP adapter to be invoked independently of the normal SSO/SLO flow of PF.
Three different options of what to do after the logout are provided.
If the redirectDestination is set, the user will be redirected to that location after logout.
If the templateName is set, the PF engine will look for and attempt to render a template of that name in the pingfederate/server/default/conf/template/ directory.
If neither redirectDestination nor templateName is set, the defaultContent is rendered directly into the response.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default used if no explicit value is set for defaultContent -
Constructor Summary
ConstructorsConstructorDescriptionLogoutHandler(IdpAuthenticationAdapter adapter, String path) Creates and registers a new LogoutHandler -
Method Summary
Modifier and TypeMethodDescriptionReturns the default HTML content to render after logout if redirectDestination and templateName are not set.Returns the location that the user will be redirected to after the logout.Returns the name of the template to render after the logout.voidhandle(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) Implementation of the Handler interface called by the PF runtime.voidsetDefaultContent(String defaultContent) Sets the default HTML content to render after logout if redirectDestination and templateName are not set.voidsetRedirectDestination(String redirectDestination) Sets the location that the user will be redirected to after the logout.voidsetTemplateName(String templateName) Sets the name of the template to render after the logout.
-
Field Details
-
DEFAULT_CONTENT
The default used if no explicit value is set for defaultContent- See Also:
-
-
Constructor Details
-
LogoutHandler
Creates and registers a new LogoutHandler- Parameters:
adapter- the IdP adapter that will have its logout method calledpath- the sub path that the handler will be registered at. Must to start with a "/". The actual path will be [pf-home]/ext{path}
-
-
Method Details
-
getRedirectDestination
Returns the location that the user will be redirected to after the logout.- Returns:
- The location that the user will be redirected to after the logout.
-
setRedirectDestination
Sets the location that the user will be redirected to after the logout.- Parameters:
redirectDestination- the URL or relative path that the user will be redirected to
-
getDefaultContent
Returns the default HTML content to render after logout if redirectDestination and templateName are not set.- Returns:
- The default HTML content to render after logout if redirectDestination and templateName are not set.
-
setDefaultContent
Sets the default HTML content to render after logout if redirectDestination and templateName are not set.- Parameters:
defaultContent- HTML content
-
getTemplateName
Returns the name of the template to render after the logout.- Returns:
- The name of the template to render after the logout.
-
setTemplateName
Sets the name of the template to render after the logout.- Parameters:
templateName- the name of the HTML template file
-
handle
public void handle(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException Implementation of the Handler interface called by the PF runtime.- Specified by:
handlein interfaceorg.sourceid.websso.servlet.adapter.Handler- Throws:
javax.servlet.ServletExceptionIOException
-