从CAS服务器注销后无法重定向到Spring应用程序页面 [英] Unable to redirect to Spring application page after logout from CAS Server
问题描述
我正在尝试使用CAS服务器从Spring引导应用程序中注销singleLog。我能够从Spring应用程序和CAS服务器中注销,但是我想重定向到我的Spring应用程序的自定义注销页面 https:// applicationip:port / application / logoutsuccesspage 而不是CAS注销页面,即 https:// casserverip:port / cas / logout
I'm trying singleLogout from Spring boot application using CAS server.I'm able to logout from Spring application and CAS server but I want to redirect to my custom logout page of spring application https://applicationip:port/application/logoutsuccesspage rather than CAS logout page i.e. https://casserverip:port/cas/logout
推荐答案
文档是您的朋友。
引用官方文档:
根据CAS协议,/ logout终结点负责
销毁当前的SSO会话。注销后,也可能需要
重定向回服务。通过
通过service参数指定重定向链接来控制。指定的
服务必须在CAS的服务注册表中注册并启用
,并且必须允许CAS进行服务重定向。
Per the CAS Protocol, the /logout endpoint is responsible for destroying the current SSO session. Upon logout, it may also be desirable to redirect back to a service. This is controlled via specifying the redirect link via the service parameter. The specified service must be registered in the service registry of CAS and enabled and CAS must be allowed to follow service redirects.
和相关应用程序属性:
# cas.logout.followServiceRedirects=false
# cas.logout.redirectParameter=service
# cas.logout.redirectUrl=https://www.github.com
# cas.logout.confirmLogout=false
# cas.logout.removeDescendantTickets=false
因此,首先,您必须指示cas通过设置以下内容来重定向注销:
So first, you have to instruct cas to follow logout redirects by setting:
cas.logout.followServiceRedirects = true
,然后提供所需的网址在注销后重定向用户:
and then provide the url that you wish to redirect users after logout:
cas.logout.redirectUrl = https:// applicationip:port / application / logoutsuccesspage
References: Logout - Single Logout & CAS Properties
注意:文档参考5.3.x分支。
Note: Docs refer to 5.3.x branch.
这篇关于从CAS服务器注销后无法重定向到Spring应用程序页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!