cancel
Showing results for 
Search instead for 
Did you mean: 

Logout with cas

litllel
Champ in-the-making
Champ in-the-making
Hello guys, I have my CAS enable on my alfresco, but when SSO is enable, the button to logout is disable, how can I reenable it in order to be able to logout from my share and from my cas without having to clear my history each time.
6 REPLIES 6

afaust
Legendary Innovator
Legendary Innovator
Logging out from CAS is not really possible from inside Alfresco. You need to have a special UI or URL of your CAS that provides "log out" functionality. If your CAS provides such an UI or URL, you could customize the Alfresco Share header to have a menu item "Logout via CAS" in the menu (alternative to the disabled standard logout), which redirects to that CAS logout UI or URL.

litllel
Champ in-the-making
Champ in-the-making
Ok, Thank you I will look out for this. I think I have to customize the share-header.lib.js. to reenable the logout button but how can I redirect my URL to my cas logout.

abhishek2341
Champ in-the-making
Champ in-the-making
Hi
how did u integrate the alfresco Via cas. kindly share any POC or steps ??

idwright
Star Collaborator
Star Collaborator
This is slightly complicated…

First you need to put back the logout menu option, that's relatively straightforward.
Then you need to replace the LogoutService so that you can pass the redirectURLQueryKey (and redirectURLQueryValue) to the logout servlet, complicated by the fact that the servlet doesn't understand JSON.
Probably the easiest thing to do is look at my github - https://github.com/wrighting/alfresco-cas
There's some explanation in the wiki as well as the code.
(It's different for earlier versions….)

litllel
Champ in-the-making
Champ in-the-making
I have alfresco-community 5.1, and I don't understand how to add the logoutService in it, I found how to reenable the button to logout, but when I try to make it logout from cas it didn't work so I tryied to create a class to overried the SlingshotLogoutController but I failed to get the Alf_ticket to destroy it at the end cause if i want to use
/api/login/ticket/
I need the password of the user, and i don't think it's secure to use it here in cleartext.

idwright
Star Collaborator
Star Collaborator
You can do it on the java/repo end, the trick is to forward to the CAS logout page, but I prefer to make the changes in share as the servlet will accept the parameters you can use to tell it where to go. (Arguably it would be better to allow these values to be set via properties)


SeeSmiley Sadnot all the files you need but the main ones)
https://github.com/wrighting/alfresco-cas/blob/master/share-amp/src/main/amp/config/alfresco/web-ext...
https://github.com/wrighting/alfresco-cas/tree/master/share-amp/src/main/amp/web/js/Authentication