待整理博客:
取消https,添加http:https://www.cnblogs.com/jpeanut/p/9249053.html
========================
postgres jdbc 数据库认证用户名和密码:
https://blog.csdn.net/oumuv/article/details/84306361
https://blog.csdn.net/u010475041/article/details/77943965
注销静态验证
cas.authn.accept.users=user::123
添加postgres配置:
#Query Database Authentication 数据库查询校验用户名开始 #查询账号密码sql,必须包含密码字段 cas.authn.jdbc.query[0].sql=select * from user_info where username=? #指定上面的sql查询字段名(必须) cas.authn.jdbc.query[0].fieldPassword=password #指定过期字段,1为过期,若过期不可用(可选) #cas.authn.jdbc.query[0].fieldExpired=expired #为不可用字段段,1为不可用,需要修改密码(可选) #cas.authn.jdbc.query[0].fieldDisabled=disabled #数据库方言hibernate的 cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.PostgreSQLDialect #数据库驱动 cas.authn.jdbc.query[0].driverClass=org.postgresql.Driver #数据库连接 cas.authn.jdbc.query[0].url=jdbc:postgresql://${postgre_host:192.168.1.68}:${postgre_port:5432}/${postgres_database:test}?useSSL=false&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true&useServerPrepStmts=false&stringtype=unspecified #数据库用户名 cas.authn.jdbc.query[0].user=root #数据库密码 cas.authn.jdbc.query[0].password=root #默认加密策略,通过encodingAlgorithm来指定算法,默认NONE不加密 #cas.authn.jdbc.query[0].passwordEncoder.type=DEFAULT 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 #Query Database Authentication 数据库查询校验用户名结束
sso-server/pom.xml:
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-jdbc</artifactId>
<version>${cas.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.5</version>
</dependency>
<!--
若不想找驱动可以直接写下面的依赖即可,其中包括
HSQLDB、Oracle、MYSQL、PostgreSQL、MariaDB、Microsoft SQL Server
-->
<!--
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-jdbc-drivers</artifactId>
<version>${cas.version}</version>
</dependency>
-->
字段名 字段类型 备注
username varchar 登录账号
password varchar 密码
expired int 过期字段, 1为过期,需修改密码
disable int 不可用字段,1为不可用,禁用
email varchar 邮箱,可不需要
===============================
复制一个客户端,修改一下端口防止冲突,测试单点登录效果
搞定!
===================
两个客户端单点登出OK
https://blog.csdn.net/oumuv/article/details/84323292
===========================