CAS logout的一个解决方案2

while implementing jasig-CAS I've faced the next problem: I want to implement the logout. For now it works fine, but I want CAS server to redirect the user after logging out to the server where the request came from(for instance, http://localhost:8080/myApp). I've tried to add "service" in security context, but nothing happened here is a piece of my spring security context:

<security:logout logout-url="/logout"
                        logout-success-url="https://localhost:9543/cas-server-webapp-3.4.10/logout?service=http://localhost:8080/myApp" 
                        invalidate-session="true"/>

all configs and procedures are taken from this manual.

share | improve this question
 
 
Sorry for misleading you with redirect prefix, it was config of cas webflow. I deleted that answer. –  Aleksandr M Oct 9 '12 at 10:47
 
About your issue: How exactly it is not working? Have you tried to put some simple url in logout-success-url parameter? –  Aleksandr M  Oct 9 '12 at 10:49
 
@AleksandrM now it logs out normally. BUT it logs out and goes to CAS logout page and I want to go(to be redirected) to myApp index page(or whatever) and not to stay at CAS logout page. –  John Smith  Oct 9 '12 at 10:51
 
Can't you just use http://localhost:8080/myApp as logout-success-url? –  Aleksandr M  Oct 9 '12 at 11:00
 
nope, because in this case user is not actually logged out –  John Smith  Oct 9 '12 at 11:01

1 Answer

up vote 1 down vote accepted

Does this helps from default cas-servlet.xml

<bean id="logoutController"class="org.jasig.cas.web.LogoutController"
    p:centralAuthenticationService-ref="centralAuthenticationService"
    p:logoutView="casLogoutView"
    p:warnCookieGenerator-ref="warnCookieGenerator"
    p:ticketGrantingTicketCookieGenerator-ref="ticketGrantingTicketCookieGenerator"
    p:servicesManager-ref="servicesManager"
    p:followServiceRedirects="${cas.logout.followServiceRedirects:false}"/>

Look at last line ${cas.logout.followServiceRedirects:false}.

share | improve this answer
 
 
where I should add this prefix and what is the correct form of this prefix? or where can I look for it? –  John Smith  Oct 9 '12 at 10:34
 
undeleted and edited my answer :) –  Aleksandr M  Oct 9 '12 at 11:23
 
in this bean there was no such property, so I just added it and set it to true(so it enables redirecting). thanks for the answer and saved hours! ;) –  John Smith  Oct 9 '12 at 12:11
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值