CAS & Webcalendar

In brief


Install webcalendar, change the login page so that it uses phpCas instead of the webcalendar login form, tell webcalendar to use user-cas.php to retrieve users from the database, fix the logout so that it calls the CAS server.

Step by step



  1. get and install webcalendar(v. 1.0.2)

  2. get phpCas (v. 0.4.20-1)

  3. copy the CAS directory from phpCas inside the web calendar distribuition

  4. replace login.php with this one

  5. add the file user-cas.php in the includes directory

  6. make sure the includes/settings.php contains those settings:
    user_inc: user-cas.php
    cas_host: robcos.com //change to your cas server
    cas_port: 443 // HTTPS default port
    cas_context: cas // The J2EE context you deployed your cas server into


  7. edit includes/trailer.php: Add a logout=true parameter to the logout url: change the string
    $login_url = "login.php"
    $login_url = "login.php?return_path=$login_return_path""

    to
    $login_url = "login.php?logout=true"
    $login_url = "login.php?logout=true&return_path=$login_return"


  8. Go for it!


Notes:

  • the files you can download from this page have to be renamed to .php.

  • I used the named versions of webcalendar and phpCas but you should try always to use the latest to minimize security risks!

Comments

  1. there are a mystake on this page.

    it's :
    $login_url = "login.php?logout=true"

    and not

    $login_url = "$login.php?logout=true"


    there a $ behind login.php

    ReplyDelete
  2. Roberto,

    Thanks for the info above. I am new to cas and interested in starting by integrating webcalendar with cas sso.
    I understand everything above.
    Can you tell me what I need to set the cas server value below to before I deploy the ear in tomcat for the calendar client and the server to speak to each other?
    class="org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler" />
    Are there any other server changes in deployerConfigContext.xml or any other place I need to make to get this to work?
    Thank You
    Greg

    ReplyDelete
  3. Hi Greg.
    For how to configure your CAS server you should look at the documentation on the CAS homepage. Don't forget that your CAS server is not aware of your application (CAS does not now that you are using webcalendar).
    /Roberto

    ReplyDelete
  4. Hi,

    I'm looking for a 'casification' of the new version of webcalendar (1.2.0).

    Do you know if something already exists ?

    Thanks

    ReplyDelete

Post a Comment

Popular posts from this blog

Home Assistant in Docker on MacOs BigSur

The little yellow book of vaccinations

ReadyNas NV+ and rsync