问题描述
我正在尝试使用CAS服务器从Spring引导应用程序中注销singleLog。我能够从Spring应用程序和CAS服务器中注销,但是我想重定向到我的Spring应用程序的自定义注销页面 而不是CAS注销页面,即
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.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应用程序页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!