问题描述
Zend_Auth 使用 PHP Session 但是,codeigniter 有一个完全不同的方法.
Zend_Auth uses PHP Session but, codeigniter has a different approach altogether.
我正在从事的项目要求任何在 zend 中拥有 Identity() 的人,在登录到另一个使用 codeigniter 的系统时,都不应出现浏览问题.
The project that I am working on requires that anyone who hasIdentity() in zend, when logs into another system which uses codeigniter, should not have issues to browse around.
在 Zend 系统上验证用户身份时如何设置 Codeigniter 会话
How do I set Codeigniter session when I authenticate the user on zend system
下一步是 - 反之亦然.
and next step is - vice-versa.
提前致谢.
两个站点都使用不同的数据库,但用户被索引在一起.
Both the sites are using different database but, users are indexed together.
推荐答案
一个快速的解决方法是检查 Zend Auth 存储,如果它存在,根据 hasIdentity,我们生成 CI Cookie,一旦 Zend 应用程序中的会话过期, 我们检查并删除 CI Cookies.
A quick workaround is to check for Zend Auth storage and if it exists, depending on what was hasIdentity, we generate CI Cookies, once the session expires in Zend app, we do a check and delete CI Cookies.
这是我能找到的唯一解决方法,它奏效了!:)
That is the only workaround I could figure out, which worked! :)
这篇关于跨框架认证 Zend + Codeigniter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!