Package org.pac4j.springframework.web
Class LogoutController
java.lang.Object
org.pac4j.springframework.web.LogoutController
This controller handles the (application + identity provider) logout process.
- Since:
- 1.0.0
- Author:
- Jerome Leleu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet whether it is a central logout.org.pac4j.core.config.ConfigGet the security config.Get the default URL.Get whether the session shoudl be destroyed at logout.Get whether it is a local logout.org.pac4j.core.engine.LogoutLogicGet the specific logout logic.Get the logout URL pattern.voidlogout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handle the logout process.voidsetCentralLogout(Boolean centralLogout) Define whether it is a central logout.voidsetConfig(org.pac4j.core.config.Config config) Define the security config.voidsetDefaultUrl(String defaultUrl) Set the default URL.voidsetDestroySession(Boolean destroySession) Define whether the session shoudl be destroyed at logout.voidsetLocalLogout(Boolean localLogout) Define whether it is a local logout.voidsetLogoutLogic(org.pac4j.core.engine.LogoutLogic logoutLogic) Set the specific logout logic.voidsetLogoutUrlPattern(String logoutUrlPattern) Set the logout URL pattern.
-
Constructor Details
-
LogoutController
public LogoutController()
-
-
Method Details
-
logout
@RequestMapping("${pac4j.logout.path:/logout}") public void logout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Handle the logout process.- Parameters:
request- the HTTP requestresponse- the HTTP response
-
getDefaultUrl
Get the default URL.- Returns:
- the default URL
-
setDefaultUrl
Set the default URL.- Parameters:
defaultUrl- the default URL
-
getLogoutUrlPattern
Get the logout URL pattern.- Returns:
- the logout URL pattern
-
setLogoutUrlPattern
Set the logout URL pattern.- Parameters:
logoutUrlPattern- the logout URL pattern
-
getLogoutLogic
public org.pac4j.core.engine.LogoutLogic getLogoutLogic()Get the specific logout logic.- Returns:
- the logout logic
-
setLogoutLogic
public void setLogoutLogic(org.pac4j.core.engine.LogoutLogic logoutLogic) Set the specific logout logic.- Parameters:
logoutLogic- the logout logic
-
getConfig
public org.pac4j.core.config.Config getConfig()Get the security config.- Returns:
- the config
-
setConfig
public void setConfig(org.pac4j.core.config.Config config) Define the security config.- Parameters:
config- the config
-
getLocalLogout
Get whether it is a local logout.- Returns:
- whether it is a local logout
-
setLocalLogout
Define whether it is a local logout.- Parameters:
localLogout- whether it is a local logout
-
getCentralLogout
Get whether it is a central logout.- Returns:
- whether it is a central logout
-
setCentralLogout
Define whether it is a central logout.- Parameters:
centralLogout- whether it is a central logout
-
getDestroySession
Get whether the session shoudl be destroyed at logout.- Returns:
- whether the session shoudl be destroyed
-
setDestroySession
Define whether the session shoudl be destroyed at logout.- Parameters:
destroySession- whether the session shoudl be destroyed
-