请问PHP的SSO(单点登录)解决方法?

WBOY
Release: 2016-06-13 11:18:44
Original
952 people have browsed it

请教PHP的SSO(单点登录)解决办法???
单点登录,比如www.aaa.com,www.bbb.com两个网站,要实现aaa登录后,bbb网站也实现登录
这两天网上查看了挺多资料
基本都说使用用户验证中心,设置ticket,我实施了下,通过P3P跨站传COOKIE,但是怎么验证这个cookie的合法性呢?

php sso 单点登录
------解决方案--------------------
在 www.aaa.com 登陆时通过验证中心设置一 token 到 cookie 同时验证中心保存此 token
进入 www.bbb.com 时携带 token 访问验证中心,与保存的 token 对比
------解决方案--------------------
iframe 跨域通信可以试试,似乎现在都是这么解决的!

http://www.alloyteam.com/2012/08/lightweight-solution-for-an-iframe-cross-domain-communication/
------解决方案--------------------


哈哈,为了分数..
------解决方案--------------------
引用:
token加密设置到cookie里,那token怎么个加密啊?这个加密是不可逆的?只是和验证中心的进行比对?


你自定义一个私钥 通过私钥来创建token
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!