Git Product home page Git Product logo

cas-sample-java-webapp's Introduction

Example CASified Java Web Application

This is sample java web application that exercises the CAS protocol features via the Java CAS Client.

Configure

  • Adjust the url endpoints of the CAS server and the application server in the web.xml file.

Build

  • Create a Java keystore at /etc/cas/jetty/thekeystore with the password changeit.
  • 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

Testing High Availability

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 the CAS Authentication Filter points to CAS node 1 (i.e https://cas1.sso.edu:8443/cas/login).
  • The casServerUrlPrefix of the CAS Validation Filter points to CAS node 2 (i.e https://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

cas-sample-java-webapp's People

Contributors

dima767 avatar henrygau avatar mmoayyed avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.