Logout redirect with ASP.Net client

149 views
Skip to first unread message

Valentine Rouzaud

unread,
Apr 28, 2016, 9:57:10 AM4/28/16
to CAS Community
Hello,

I want to redirect to my home page after logging out from CAS so I've changed the "cas.logout.followServiceRedirects" to true in the cas.properties file but nothing seemed to happen and I still got stuck to my "localhost/cas/logout" page. 
I then realized that never did I pick which page I'd like to be redirected to in the config so it probably came from there.
And indeed the URL of my logout page is just localhost/cas/logout, there are no ?service=xxx parameter...
I'm not sure if I have to add a property in the cas.properties/deployerConfigContext.xml or if it's something to add in the Web.config of my ASP.Net project?
I'd appreciate any help, thank you.
Regards

 Valentine 

Neil Sabol

unread,
Apr 28, 2016, 4:59:15 PM4/28/16
to Valentine Rouzaud, CAS Community

Hello Valentine,

 

Although I’m not familiar with the exact process in .NET, I believe this is something you handle in your application.

 

Basically, you need to redirect to the CAS logout URL with the service parameter set to the URL you want to redirect to once CAS logout occurs.

 

Example: /cas/logout?service=www.mywebsite.com

 

You should be able to point your application’s logout handler to that URL (after destroying the session in your application of course).

 

The phpCAS client has a built in function for this: phpCAS::logoutWithRedirectService – I’ve not had luck locating an equivalent in the .NET implementation.

 

Let me know if that helps and makes sense (and others, feel free to chime in if this is not correct).

 

Thanks,

-Neil

--
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To post to this group, send email to cas-...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/697becfa-c47d-48f4-8a50-1d862de8115a%40apereo.org.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.

Reply all
Reply to author
Forward
0 new messages