Vartlok Vartlok - 2 months ago 14
Java Question

JASIG CAS Custom UI and settings

I'm working on Java EE web application and now I need to implement a SSO for out few components. As solution, I have chosen JASIG CAS server. As far as I know it's the most popular solution for cases like mine but I can't find any information about how to customise the UI (login page and etc.) or settings (login url and etc.) without rebuilding cas-server source. I just want to have my own maven project which I can change easy.

My pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>testing-cas</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>

<dependencies>
<dependency>
<groupId>org.jasig.cas</groupId>
<artifactId>cas-server-webapp</artifactId>
<version>${cas.version}</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
</dependencies>

</project>


And that's all that I have at the moment. Can some one provide information about what I have to do to customise CAS UI and settings? Is it possible in general?

Answer

Okey, it's easier than i thought.

Carefully read new docs: http://jasig.github.io/cas/4.0.x/installation/Maven-Overlay-Installation.html

So main point that I have to put my files at exactly the same place as it in CAS. So for example jsp should be in WEB-INF/view/jsp/default/ui and CAS will use this JSP instead of use default JSP. Or I can overlay propertyFileConfigurer.xml and use another properties file with custom settings.

The same this for all other settings.