Friday, May 2, 2014

A Simple CAS Java Rest Client Example

Here are some notes from creating a simple Java Client to access a REST endpoint behind CAS authentication.

Resourcs for enabling CAS Rest Access:


And here is my simple implementation:

  • Main.java contains a runnable main method and makes the calls to our REST service
  • CasLogin.java holds our user's credentials and makes the call to get the TicketGrantingTicket and the ServiceGrantingTicket.  You might be able to store the TGT in order to avoid passing the credentials over the wire for each request.
  • RestClient.java holds some helper methods to make http calls




No comments:

Post a Comment