一个中文文档地址: http://www.cassso-china.cn/apereo_github_cas_5.2/apereo.github.io/cas/5.2.x/

================================

待整理博客:

取消https,添加http:https://www.cnblogs.com/jpeanut/p/9249053.html

https://blog.csdn.net/oumuv/article/details/83377945

========================

postgres   jdbc 数据库认证用户名和密码:

https://blog.csdn.net/oumuv/article/details/84306361

https://blog.csdn.net/u010475041/article/details/77943965

注销静态验证

cas.authn.accept.users=user::

添加postgres配置:

#Query Database Authentication 数据库查询校验用户名开始
#查询账号密码sql,必须包含密码字段
cas.authn.jdbc.query[].sql=select * from user_info where username=?
#指定上面的sql查询字段名(必须)
cas.authn.jdbc.query[].fieldPassword=password
#指定过期字段,1为过期,若过期不可用(可选)
#cas.authn.jdbc.query[].fieldExpired=expired
#为不可用字段段,1为不可用,需要修改密码(可选)
#cas.authn.jdbc.query[].fieldDisabled=disabled
#数据库方言hibernate的
cas.authn.jdbc.query[].dialect=org.hibernate.dialect.PostgreSQLDialect
#数据库驱动
cas.authn.jdbc.query[].driverClass=org.postgresql.Driver
#数据库连接
cas.authn.jdbc.query[].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[].user=root
#数据库密码
cas.authn.jdbc.query[].password=root
#默认加密策略,通过encodingAlgorithm来指定算法,默认NONE不加密
#cas.authn.jdbc.query[].passwordEncoder.type=DEFAULT
cas.authn.jdbc.query[].passwordEncoder.type=NONE
cas.authn.jdbc.query[].passwordEncoder.characterEncoding=UTF-
cas.authn.jdbc.query[].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

===========================

替换登录页:https://blog.csdn.net/u010475041/article/details/78201261

============

客户端注册json文件命名规则:

文件名按照规范用name-serviceId.json吧,里面的内容也很好理解:

- @class:必须为org.apereo.cas.services.RegisteredService的实现类 
- serviceId:对服务进行描述的表达式,可用于匹配一个或多个 URL 地址 
- name: 服务名称 
- id:全局唯一标志 
- evaluationOrder:定义多个服务的执行顺序
https://blog.csdn.net/weixin_39819191/article/details/80360809

=================

自定义数据库身份验证:https://apereo.github.io/2017/02/02/cas51-authn-handlers/

https://blog.csdn.net/weixin_39819191/article/details/80360760

还没验证是否可行

================

最新文章

  1. inline函数的用法
  2. RabbitMQ术语
  3. Python渗透测试工具合集
  4. VB获取浏览器版本
  5. Visual Studio 2010下载 + 附破解方法
  6. HDU5653 Bomber Man wants to bomb an Array 简单DP
  7. C++中的 new / delete
  8. Entity Framework 5 自定义代码生成模板 转
  9. requests从api中获取数据并存放到mysql中
  10. VisualVM监控远程主机上的JAVA应用程序
  11. 【python】BIF及查看函数帮助
  12. org.hibernate.ObjectNotFoundException: No row with the given identifier exists解决办法
  13. A1013. Battle Over Cities
  14. (转载)Memcached和Redis简介
  15. javaweb(4)之Listener&amp;Filter
  16. python之socketserver ftp功能简单讲解
  17. SNF开发平台WinForm-表单验证控件-通用
  18. ldap集成grafana
  19. Compare Version Numbers(STRING-TYPE CONVERTION)
  20. linux命令--cp、tail、cd、mv、history、cd

热门文章

  1. (转载)如何在当前目录下快速打开cmd
  2. webpack vue-cli2 配置打包测试环境
  3. ubuntu下Java通过JNI调用C
  4. 【技术博客】MySQL和Django常用操作
  5. C#-关于TcpListener的AcceptTcpClient()方法造成线程阻塞,进而程序无法彻底关闭的问题
  6. Error-ASP.NET:未能加载文件或程序集“CMSCalendar”或它的某一个依赖项。系统找不到指定的文件。
  7. anaconda 安装指定源的包
  8. Redux counterpart rematch dva
  9. 记录一次TraceId的问题
  10. dubbo如何解决循环依赖的问题