https配置
- 生成服务器端的keysore文件
keytool -genkey -alias cas -keyalg RSA -keysize 2048 -keypass 123456 -storepass 123456 -keystore /Users/mengfanxiao/Documents/project/person/springboot/shiro-cas/cas/keystore/liuyx.keystore -dname "CN=cas.example.org,OU=liuyx.com,O=liuyx,L=JiNan,ST=JiNan,C=CN"
- 配置域名
sudo vim /etc/hosts 127.0.0.1 cas.example.org
- 配置tomcat
conf/server.xml 注视掉8080端口访问 <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true"> <SSLHostConfig> <Certificate certificateKeystoreFile="/Users/mengfanxiao/Documents/project/person/springboot/shiro-cas/cas/keystore/liuyx.keystore" type="RSA" certificateKeystoreType="JKS" certificateKeystorePassword="123456"/> </SSLHostConfig> </Connector>
登陆用户从数据库中读取
数据库文件及账号数据
再次访问
https://cas.example.org:8443/cas_overlay_war/login
搭建CAS客户端
下载官方demo client
https://gitee.com/pingfanrenbiji/cas-sample-java-webapp.git 目录结构