Spring + CAS Redirect to login page after logout -


i'm using spring(3.2.8) + cas (4.0.0) , i'd redirect login page after logout (instead of displaying logout confirm page).

i tried add cas.logout.followserviceredirects=true in cas.properties nothing happens.

on client-side when user wants logout, accesses: app_url/j_spring_cas_security_logout

my logout-webflow.xml looks like:

<flow xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"   xmlns="http://www.springframework.org/schema/webflow"   xsi:schemalocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">  <action-state id="terminatesession">     <on-entry>         <evaluate expression="cryptoserverlogoutinterceptor.terminatecryptosession(flowrequestcontext)"/>     </on-entry>     <evaluate expression="terminatesessionaction.terminate(flowrequestcontext)"/>     <transition to="dologout"/> </action-state>  <action-state id="dologout">     <evaluate expression="logoutaction"/>     <transition on="finish" to="finishlogout"/>     <transition on="front" to="frontlogout"/> </action-state>  <action-state id="frontlogout">     <evaluate expression="frontchannellogoutaction"/>     <transition on="finish" to="finishlogout"/>     <transition on="redirectapp" to="redirecttofrontapp"/> </action-state>  <view-state id="redirecttofrontapp"             view="externalredirect:#{currentevent.attributes.logouturl}&amp;relaystate=#{flowexecutioncontext.key}">     <transition on="next" to="frontlogout"/> </view-state>   <decision-state id="finishlogout">     <if test="flowscope.logoutredirecturl != null" then="redirectview" else="logoutview"/> </decision-state>  <end-state id="redirectview" view="externalredirect:#{flowscope.logoutredirecturl}"/>  <view-state id="logoutview" view="caslogoutview"/> 

on other way when user accesses app without being authenticated , redirected to: cas_url/login?service=app_url%2fj_spring_cas_security_check

so need add/keep somewhere: service=app_url

thx helping.

edit

when try:

<end-state id="logoutview" view="flowredirect:login"/> 

i end to:

this webpage has redirect loop

err_too_many_redirects

but works with:

<end-state id="logoutview" view="externalredirect:contextrelative:login"/> 


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -