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"/>
<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.




java  spring  spring-security  cas




 

share | improve this question


Oct 9 '12 at 10:20






John Smith
141 1 13




1 Answer



active oldest votes



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}"/>
<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


edited  Oct 9 '12 at 11:20


 


 



Oct 9 '12 at 10:25






Aleksandr M
5,078 3 9 25