Points To Remember
CAS works on Maven WAR overlay technique.
You need to create a SSL certificate to use CAS.
You can use LDAP, Database and Active Directory techniques to authenticate the user.
Requirements
You need to have Java SDK v1.6 or greater.
Servlet Containers like Tomcat , Websphere, JBoss etc.
Apache Maven v3.0 or greater.
Authentication technique related dependencies.
For the sake of simplicity let us assume that out application path is
and our tomcat path is
Step 1 : Create pom.xml
You need to create a pom.xml to create the war file and package it. lets create the pom file in the project directory i.e. PROJECT/pom.xml
Add the following code to the pom.
Here we have added the dependencies of the project and the repositories where it will look for the dependencies and jars. We are setting up CAS version 4.0.0
Step 2 : Lets check our progress
Let us check our progress and see if we have not missed on something. Run the following command
This will create a war file in the directory PROJECT/target/. Deploy this war file on tomcat as instructed here. Now run the app you will see the screen like the following.
CAS login screen
You can now login to the CAS server using username="casuser" and password="Mellon". These are the default username password that can be used to login. After login you will see the screen like the following.
CAS Successful Login screen
We can logout the cas server using the path /logout. This will log out the user.
CAS successful logout screen.
So, we have now setup our CAS server and successfully logged into and logged out of the CAS server.
How to Use Database for CAS Authentication.