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
- get and install webcalendar(v. 1.0.2)
- get phpCas (v. 0.4.20-1)
- copy the CAS directory from phpCas inside the web calendar distribuition
- replace login.php with this one
- add the file user-cas.php in the includes directory
- 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 - edit
includes/trailer.php
: Add alogout=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" - 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!
there are a mystake on this page.
ReplyDeleteit's :
$login_url = "login.php?logout=true"
and not
$login_url = "$login.php?logout=true"
there a $ behind login.php
Roberto,
ReplyDeleteThanks 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
Hi Greg.
ReplyDeleteFor 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
Hi,
ReplyDeleteI'm looking for a 'casification' of the new version of webcalendar (1.2.0).
Do you know if something already exists ?
Thanks