phpCAS latest release v2.1.2-1
last update 31-August-2007 11:53AM

CAS GH HTML rendering configuration

HTML rendering can be configured using templates.

Four customizations can be made by simply editing a properties file:

  • the language: english by default, other possible values are french and greek;
  • the logo (a URL);
  • the colors and the fonts.

How can I use an existing template?

For instance, the default template is It is defined by the /custom/cas-server-render/ folder, and the /custom/cas-server-render/ file. Usage of this template is specified in the /properties/ file:

# Yale ITS CAS Server configuration

# version used (do not modify)
cas-server.version=2.0.11 # HTML rendering

Note: the template us used by default if the ${cas-server.render} property is not set.

How is a template defined?

Templates are defined in the /custom/cas-server-render/ folder, as a properties files (the name of the template suffixed by .properties) and an optional folder (the name of the template).

For instance, the content of the /custom/cas-server-render/ is the following one:

# ESUP-Portail rendering customization 

cas-server.html.font=Arial,Helvetica cas-server.html.caption=ESUP-Portail Central Authentication Service cas-server.html.title.text=Central Authentication Service cas-server.html.title.color=white cas-server.html.logo.url=esup-portail.png cas-server.html.logo.width=182 cas-server.html.logo.height=68 cas-server.html.body.bgcolor=#0044AA cas-server.html.error.color=red cas-server.html.credentials.color=#FF9999 cas-server.html.warn.color=#003399 consortium cas-server.html.institution.url= cas-server.html.institution.url-pattern="" cas-server.html.institution.web-pages=Secure ESUP-Portail web pages

As you can see, four customizations can be made by simply editing a properties file.

Note that if a relative url is used for the logo, it is relative to the /web folder of the CAS server sources; for instance, esup-portail.png is located in the /custom/cas-server-render/ folder.

How can I create a new HTML rendering template?

simply create a new properties file in the /custom/cas-server-render/ folder (the name of your template, suffixed by .properties). You can optionally create a folder (all the files you put in this folder will be copied to the CAS server sources).

Alternatively, you can duplicate an existing template. Two other templates are given as examples:

  • the look of the original Yale ITS CAS server distribution;
  • a french customization.

If you think your template can be interesting for other users, please share it on the mailing list.

How do I change the language?

As seen above, you can use an existing language by setting the ${cas-server.lang} property in /properties/

Existing languages are defined in /custom/cas-server-lang/ folder; to add a new language, simply duplicate an existing sub-folder (corresponding to an existing language) and modify the included files.

Your translations can be used by others, please share them on the mailing list. Logo

Copyright © 2002-2004 - ESUP-Portail consortium