cas5.3 使用http方式请求


如果我们的客户端要使用IP来访问服务端,怎么办?
答案就是配置成HTTP访问。

1. 项目拉取

https://github.com/apereo/cas-overlay-template
这里拉取5.x版本

2. 新建 src/main/resources 目录

新建 src/main/resources 目录,并把HTTPSandIMAPS-10000001.jsonapplication.properties拷贝进去。两个文件的位置如下:
在这里插入图片描述

注释掉

在这里插入图片描述

之后在 application.properties 文件添加

cas.serviceRegistry.json.location=classpath:/services
#开启识别json文件,默认false
cas.serviceRegistry.initFromJson=true

3. 在application.properties中添加:

cas.tgc.secure=false

4. 修改services目录下的HTTPSandIMAPS-10000001.json

"serviceId" : "^(https|imaps|http)://.*"

在这里插入图片描述
到这里就可以http协议访问cas服务端了,希望对大家有帮助。如有不对,还请评论去指正。
如需https,请移步:https://blog.csdn.net/weixin_42201180/article/details/107606813

猜你喜欢

转载自blog.csdn.net/weixin_42201180/article/details/107653737