# cas-client **Repository Path**: lee_www/cas-client ## Basic Information - **Project Name**: cas-client - **Description**: cas springboot client - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2020-10-23 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CAS SSO 单点登录 cas server & cas cli ### CAS SERVER ##### 1. 前提条件,需要至少JDK1.8,maven3.X,Tomcat8.5以上版本。记住这几条 tomcat下载地址: JDK就不再普及了 ##### 2.下载CAS server服务端,地址:https://github.com/apereo/cas-overlay-template/tree/5.2 ##### 3.打cas.war包。这个很简单,不成功就是第一步你环境的问题 1. 打包参考 server 源码的 README.md 文件。 ##### 4.部署cas到tomcat,在cas5.2文件夹中找到target找到cas.war复制到Tomcat的webapps文件下,启动tomcat即可 1. 在启动之前,可以在 【F:\apphome\cas_tomcat_server_8.5.42\webapps\cas\WEB-INF\classes\application.properties】中看到登录的账号和密码。 2. 原始的账号密码是这个参数配置的 ```properties cas.authn.accept.users=casuser::Mellon ``` 3. 账号密码的获取修改成数据库中的配置 ```properties cas.authn.jdbc.query[0].sql=select * from sys_user where username = ? cas.authn.jdbc.query[0].principalAttributeList=username,password cas.authn.jdbc.query[0].fieldPassword=password cas.authn.jdbc.query[0].fieldExpired=expired cas.authn.jdbc.query[0].fieldDisabled=disabled cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQLDialect cas.authn.jdbc.query[0].driverClass=com.mysql.jdbc.Driver cas.authn.jdbc.query[0].url=jdbc:mysql://localhost:3306/cas?useUnicode=true&characterEncoding=UTF-8 cas.authn.jdbc.query[0].user=root cas.authn.jdbc.query[0].password=123456 cas.authn.jdbc.query[0].passwordEncoder.type=NONE cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8 cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=MD5 ``` ![1585935423234](img/1585935423234.png) **** ##### 5. 登录界面 ![1585935651787](img/1585935651787.png) ![1585935666755](img/1585935666755.png) ### CAS Client