Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single Signout issue/question #13

Open
dubininss opened this issue Sep 6, 2016 · 1 comment
Open

Single Signout issue/question #13

dubininss opened this issue Sep 6, 2016 · 1 comment

Comments

@dubininss
Copy link

I've configured CAS and several services. Everything is okay except one feature - single logout.
When user goes to /logout on a service, he logout on the service and redirects to CAS. After that CAS sends POST requests to all registered (which has been authenticated) services where request is handled by org.jasig.cas.client.session.SingleSignOutFilter which calls destroySession method of org.jasig.cas.client.session.SingleSignOutHandler. In that method we find session by token and call session.invalidate(). Looks good, but it doesn't make user (authenticated on the other services) logged out. He will still authenticated on the services, where he didn't call /logout.
It seems we need to do something else with spring security session. But I'm not sure what exactly. Probably we need to remove session information in SessionRegistry like: sessionRegistry.removeSessionInformation(sessionId); But if so, I'm a little bit confused why it's not realized. Could you please clarify how to deal with this situation? And If I understand things wrong correct me if possible.
Thanks in advance!

@flparedes
Copy link

I had a similar issue (can't really logout the user) and after read several blogs, pages and tutorials find that to logout a user you must use "logoff" instead of "logout".

This is the logout code I used in my webapp and hope it helps:

`


sec:ifLoggedIn
Usuario: ${sec.loggedInUserInfo(field:'fullName')} (sec:username/)

<g:link elementId='_logout' controller='logoff'>Salir</g:link>
</sec:ifLoggedIn>

`

Good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants