This is sample java web application that exercises the CAS protocol features via the Java CAS Client.
- Adjust the url endpoints of the CAS server and
the application server in the
web.xml
file.
- Create a Java keystore at
/etc/cas/jetty/thekeystore
with the passwordchangeit
. - Import your server certificate inside this keystore.
mvn clean package jetty:run-forked
The application will be available on:
http://localhost:9080/sample
and
https://localhost:9446/sample
Assuming you have deployed CAS on two nodes, you can use the sample application to make sure all nodes are properly
sharing the ticket state. To do this, in the web.xml
file ensure that:
- The
casServerLoginUrl
of theCAS Authentication Filter
points to CAS node 1 (i.ehttps://cas1.sso.edu:8443/cas/login
). - The
casServerUrlPrefix
of theCAS Validation Filter
points to CAS node 2 (i.ehttps://cas2.sso.edu:8443/cas
) - For both of the above filters, the
serverName
should always point to the location where this sample application is deployed.
Deploy the application and test. You may also want to reverse the order of CAS nodes 1 and 2 in the above configuration, redeploy and test again.
Alternatively, one could test distributed CAS nodes without any client application set up using this small command line utility