cas java web_惮晰/cas-sample-java-webapp

这是一个展示CAS协议特性的Java Web应用示例。需要在web.xml文件中配置CAS服务器和应用服务器的URL。创建Java密钥库,并导入服务器证书。通过MVN构建并运行应用,应用将在http://localhost:9080/sample和https://localhost:9443/sample上可用。为了测试高可用性,确保两个CAS节点正确共享票证状态,需要正确配置casServerLoginUrl、casServerUrlPrefix和serverName,然后部署并测试。
摘要由CSDN通过智能技术生成

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:9443/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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值