Redirect to Liferay page after logout in CAS

To redirect any webpage after logout in CAS, follow the instructions below:

1. Change Liferay CAS configuration. Go to
Control Panel > Settings > Authentication > CAS

2. Update “Logout URL” property:

https://directorysrv1:8443/cas-server-webapp-3.3.5/logout?service=$my-logout-page

Where:
${my-logout-page}: http://lfry01:8080/web/guest/lfry01-logout-page

3. Change CAS configuration. Set the “followServiceRedirects” property to “true”
on the “logoutController” bean defined in the cas-servlet.xml.

[root@directorysrv1 ~]# vim /usr/share/tomcat5/webapps/cas-server-webapp-3.3.5/WEB-INF/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:followServiceRedirects="true"/>
[...]

4. Re-start Tomcat (CAS-server):

[root@directorysrv1 ~]# service tomcat5 restart
Stopping tomcat5:                                          [  OK  ]
Starting tomcat5:                                          [  OK  ]
[root@directorysrv1 ~]#

5. Test redirect.

Page redirected by CAS

Page redirected by CAS

@Chilcano

Tagged with: , ,
Posted in Portal, Security
3 comments on “Redirect to Liferay page after logout in CAS
  1. Chua Wen Ching says:

    Hi Roger,

    Till now, I can’t find any information on this one. If i set CAS and the ldap configuration enabled, how do I access test@liferay.com user or any similar admin user? Right now, all my ldap users are just normal users.

    When i login using test@liferay.com, i see this:-
    The credentials you provided cannot be determined to be authentic.

    I will like to change the settings like above, just no idea. Any help? Thanks.

    • No, you should login with test because you have not disabled this auth method. Test admin user is not of ldad or cas system.

      Try to delete cookies, close sessions, etc. several times this is cause of error.

      Regards.

  2. aviatorhh says:

    Thank you for the hint.
    On CAS 4 you will find the property in WEB-INF/cas.properties

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
%d bloggers like this: