CAS Central Authentication Service

Deploy Sample Application (using java client)

Setting up server

1. Downlaod CAS Server zip from "".

2. Extract the zip file.

3. Download Apache Tomcat 5.23.

4. Copy "cas-server-webapp-3.3.war" from "\cas-server-3.3\modules" folder and paste it in "<<apache-tomcat-home>>\webapps" folder.

5. Open "<<apache-tomcat-home>>\conf\server.xml" and uncomment below line.

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" />

6. Start server.

7. Open browser and type "https://localhost:8443/cas/login". A login form will be displayed.


Configuring Client

1. Downlaod "Yale CAS Client" zip from "".

2. Extract the zip file.

3. Create your webapplications

4. Add extracted cas-client.jar to you web application path.

5. In the web.xml of your web application add below filter
<filter-name>CAS Filter</filter-name>
<param-value>your server name and port (e.g.,</param-value>
<filter-name>CAS Filter</filter-name>

6. Now create two Jsp pages to test - page1.jsp and page2.jsp

7. In both of the pages add the following lines at the top
<%@ taglib uri="" prefix="cas"%>
<cas:auth var="netID" scope="session">
<cas:service>http://service-url</cas:service> </cas:auth>
<p>Welcome, <%= session.getAttribute("netID"); %>!</p>


Run example

1. Now type "https://localhost:8443/cas/login?service=<<jsp page1 path>> in the address bar of the browser.

2. A login form will be displayed where you need to enter credentials. For testing, enter same username and password i.e., username: jusfortechies and password: jusfortechies.

3. You will be successfully logged in and navigated to <<jsp page1 path>> with a welcome message.

4. Now type <<jsp page2 path>> in the address bar of the browser. You will be automatically logged in and a welcome message will be displayed.



<<Previous page Next page>>

blog comments powered by Disqus