sso cas 坑
一个中文文档地址: 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
还没验证是否可行
================
最新文章
- inline函数的用法
- RabbitMQ术语
- Python渗透测试工具合集
- VB获取浏览器版本
- Visual Studio 2010下载 + 附破解方法
- HDU5653 Bomber Man wants to bomb an Array 简单DP
- C++中的 new / delete
- Entity Framework 5 自定义代码生成模板 转
- requests从api中获取数据并存放到mysql中
- VisualVM监控远程主机上的JAVA应用程序
- 【python】BIF及查看函数帮助
- org.hibernate.ObjectNotFoundException: No row with the given identifier exists解决办法
- A1013. Battle Over Cities
- (转载)Memcached和Redis简介
- javaweb(4)之Listener&;Filter
- python之socketserver ftp功能简单讲解
- SNF开发平台WinForm-表单验证控件-通用
- ldap集成grafana
- Compare Version Numbers(STRING-TYPE CONVERTION)
- linux命令--cp、tail、cd、mv、history、cd
热门文章
- (转载)如何在当前目录下快速打开cmd
- webpack vue-cli2 配置打包测试环境
- ubuntu下Java通过JNI调用C
- 【技术博客】MySQL和Django常用操作
- C#-关于TcpListener的AcceptTcpClient()方法造成线程阻塞,进而程序无法彻底关闭的问题
- Error-ASP.NET:未能加载文件或程序集“CMSCalendar”或它的某一个依赖项。系统找不到指定的文件。
- anaconda 安装指定源的包
- Redux counterpart rematch dva
- 记录一次TraceId的问题
- dubbo如何解决循环依赖的问题