首页 / 浏览问题 / 云GIS / 问题详情
单点登录配置好cas之后只能登录一个平台
8EXP 2024年07月22日
在cas登录之后在iportal或者iserve使用cas登录可以直接跳进登录态,但是如果第一次使用的iportal,再打开iserve的cas登录就没有登陆状态,如果第一次使用的iserve,那再打开iportal的cas登录也会没有登陆状态,只有第一次有,第二次没有,第二次需要等待10分钟左右刷新才会有登录状态

1个回答

您好,

1、配置的CAS服务器时间是否跟iServer、 iPortal 服务器时间保持一致?时间容差默认为3分钟

2、 检查CAS的配置,确保所有应用正确配置了session 同步设置或使用了CAS提供的票据验证机制来实时检查认证状态,参考:https://blog.csdn.net/supermapsupport/article/details/122194020

3、cas登录依赖于特定的Cookie来识别登录状态,如果Cookie设置不正确(如域、路径设置),或者浏览器缓存问题,可能导致状态更新不及时。试试清除浏览器缓存之后再访问应用或者用浏览器隐私模式访问看看是否成功

希望对您有所帮助!

980EXP 2024年07月23日
1. 时间是一致的 并且还设置了3000分钟的时间差

2. 配置也是借鉴了这些文档

但是问题还是存在

部署的 iServer和iPortal 分别是什么版本呢? CAS服务器是否跟iServer、 iPortal、MySQL数据库都部署在同一台机器上? 清除浏览器缓存测试过没,是否完全按照这篇文档部署的呢: https://blog.csdn.net/supermapsupport/article/details/122194020  如果不是的话请您详细说明一下自己本地的部署方式,方便排查问题呢

几乎是按照步骤一致的 只有配置数据库使用的是postgres的配置方法跟驱动包,服务器不是同一台,但是时间上是配置了3000分钟的差别

使用的是supermap-iportal-11.1.0-arm64,supermap-iserver-11.1.0-linux-arm64
postgresql的配置方法可以具体描述一下吗?我这边本地测试一下
cas.tgc.secure=false

cas.serviceRegistry.initFromJson=true

cas.serviceRegistry.json.location=classpath:/services

cas.authn.attributeRepository.jdbc[0].singleRow=true

cas.authn.attributeRepository.jdbc[0].attributes.username=login_name

cas.authn.attributeRepository.jdbc[0].attributes.password=password

cas.authn.attributeRepository.jdbc[0].attributes.role=role

cas.authn.attributeRepository.jdbc[0].order=0

cas.authn.attributeRepository.jdbc[0].requireAllAttributes=true

cas.authn.attributeRepository.jdbc[0].sql=SELECT * FROM users WHERE {0}

cas.authn.attributeRepository.jdbc[0].username=login_name

cas.authn.attributeRepository.jdbc[0].url=jdbc:postgresql://127.0.0.1:5432/postgres?useUnicode=true&characterEncoding=UTF-8

cas.authn.attributeRepository.jdbc[0].user=postgres

cas.authn.attributeRepository.jdbc[0].password=postgres

cas.authn.attributeRepository.jdbc[0].driverClass=org.postgresql.Driver

cas.authn.jdbc.query[0].sql=SELECT * FROM users WHERE login_name=?

cas.authn.jdbc.query[0].fieldPassword=password

cas.authn.jdbc.query[0].url=jdbc:postgresql://127.0.0.1:5432/postgres?useUnicode=true&characterEncoding=UTF-8

cas.authn.jdbc.query[0].user=postgres

cas.authn.jdbc.query[0].password=postgres

cas.authn.jdbc.query[0].driverClass=org.postgresql.Driver
表字段分别是 login_name |  password  |  address  |  role  |  id
请问一下有进度吗
您好,我这边有点急,请问有进度吗

该问题为重复问题,已解决:http://ask.supermap.com/147390

...