Friday, 4 April 2014

JASIG CAS REST API Java Client

Code for user Authentication using CAS REST API in java.

Download from here

JASIG CAS REST Activation

Using Jasig CAS REST API we can authenticate user without CAS login form.

CAS Version:- cas-server-3.5.2-release

Required libraries :-
cas.server.core 3.5.1
cas-server-integration-restlet-3.5.1
spring-beans ${spring.version}

cglib-nodep-3.1.jar
com.noelios.restlet.ext.servlet-1.1.1.jar
com.noelios.restlet.ext.spring-1.1.1.jar
com.noelios.restlet-1.1.1.jar
org.restlet.ext.spring-1.1.1.jar
org.restlet-1.1.1.jar


Open the web.xml file of CAS and add the below servlet configuration.

cas.server.core 3.5.1
cas-server-integration-restlet-3.5.1
spring-beans ${spring.version}

  <servlet>
<servlet-name>restlet</servlet-name>
<servlet-class>com.noelios.restlet.ext.spring.RestletFrameworkServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>restlet</servlet-name>
<url-pattern>/v1/*</url-pattern>
</servlet-mapping>


Now we can authenticate the user using CAS REST API.