Cross framework authentication zend + codeigniter

2020-02-16 04:30发布

问题:

Zend_Auth uses PHP Session but, codeigniter has a different approach altogether.

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.

How do I set Codeigniter session when I authenticate the user on zend system

and next step is - vice-versa.

Thanks in Advance.

EDIT: Both the sites are using different database but, users are indexed together.

回答1:

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! :)