环境要求

  • JDK 8+
  • CAS 5.2
  • tomcat 8+
  • maven 3.4.x

cas server 客户端模板下载 https://github.com/apereo/cas-overlay-template

导入idea:如下图:

搭建Cas单点中央认证服务(一):CAS Server

通过maven编译通过后,自动下载包: 

搭建Cas单点中央认证服务(一):CAS Server

(1)修改hosts文件,模拟跨域

打开C:\Windows\System32\drivers\etc\hosts,加入配置如下图

127.0.0.1 cas.server.com
127.0.0.1 cas.client.com

(2)新建一个src\main\resources目录将如下这两个文件拷贝进去

搭建Cas单点中央认证服务(一):CAS Server

(3)修改配置文件

搭建Cas单点中央认证服务(一):CAS Server

注释掉红圈1的配置

添加红圈2的配置 

(4)修改services\HTTPSandIMAPS-10000001.json

搭建Cas单点中央认证服务(一):CAS Server

在上图的红圈位置添加" |http ",后重新打包maven项目

 

运行自动构建+运行的脚本,如果是windows系统就运行build.cmd,linux是build.sh,如图

搭建Cas单点中央认证服务(一):CAS Server

win+r掉出黑窗口执行:build.cmd run,成功启动后如下图:

搭建Cas单点中央认证服务(一):CAS Server

访问 :  http://cas.server.com:8443/cas/login  如下图

搭建Cas单点中央认证服务(一):CAS Server

 

输入默认用户名及密码:casuser /  Mellon

搭建Cas单点中央认证服务(一):CAS Server

 

提示

输入静态的账号casuser,密码Mellon(也可以自己改)登录,在application.properties改,如下图:

 搭建Cas单点中央认证服务(一):CAS Server

敬请关注下一篇: CAS(二)CAS服务器动态验证,CAS使用MySQL数据库验证

springboot整合cas 基于Springboot搭建CAS-client,Springboot搭建CAS客户端

Springboot集成CAS 5.2.x

CAS自定义登录默认页面和返回更多的参数以及自定义密码校验

相关文章:

  • 2021-09-01
  • 2021-09-25
  • 2021-08-13
  • 2022-12-23
  • 2021-09-01
  • 2021-08-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-17
  • 2021-09-28
  • 2021-09-25
  • 2021-11-08
  • 2021-04-28
相关资源
相似解决方案