简体   繁体   English

从站点A登录到站点B?

[英]Login from a site A to a site B?

There's one news-portal and its huge (site A). 有一个新闻门户及其庞大的站点A。 During production backwards, it has been even powered with some sort of a social networking stuff - not yet started, but about to start (soon site B). 在生产倒退期间,它甚至还提供了某种社交网络功能-尚未启动,但即将启动(不久后站点B)。

Packed together looks great, but in some future there might be a lot of problems with maintaining the database, servers and stuff so I've been asked to separate it as I did. 打包在一起看起来很棒,但是在将来的某些日子里,维护数据库,服务器和其他东西可能会遇到很多问题,因此我被要求像我一样将其分开。 Site A goes on its own domain, site B also - databases are separated. 站点A位于其自己的域,站点B也位于其域-数据库是分开的。

Now, I need to do the following: when user logs into site B (social site) and arrives to site A (portal) they should be instantly logged in there too (on a site A). 现在,我需要执行以下操作:当用户登录到站点B(社交网站)并到达站点A(门户)时,他们也应该立即登录那里(在站点A上)。

Any ideas how to do this - without duplicating entries to user tables? 任何想法如何做到这一点-无需将条目复制到用户表?

EDIT: 编辑:

Any other ideas instead of auth services? 除了认证服务,还有其他想法吗? OpenId will just give us one user with 10 accounts, fakes and so on. OpenId只会为我们提供一个拥有10个帐户,伪造品等的用户。 How about cookie stuff or multi-database queries? Cookie内容或多数据库查询如何?

EDIT 2: 编辑2:

Well this is something hot.. unless its not April 1st joke and worth a try: http://www.shawnhogan.com/2005/12/cross-database-join-with-mysql.html 好吧,这很热..除非不是4月1日的笑话,而且值得一试: http : //www.shawnhogan.com/2005/12/cross-database-join-with-mysql.html

You can use OpenID . 您可以使用OpenID

OpenID is an open standard that describes how users can be authenticated in a decentralized manner, eliminating the need for services to provide their own ad hoc systems and allowing users to consolidate their digital identities. OpenID是一个开放标准,它描述了如何以分散方式对用户进行身份验证,从而消除了提供自己的即席系统所需的服务,并允许用户整合其数字身份。

If you want to share some profile information (eg posts or photos) without giving access to your login and password you can use OAuth . 如果您想共享一些个人资料信息(例如,帖子或照片)而又不授予登录名和密码的访问权限,则可以使用OAuth

See if my answer here is of any use. 看看我的回答是否有用。

It's pretty simple, and only requires user information to be kept on one side. 这非常简单,只要求将用户信息保留在一侧。 Where you need some information on the non-database side, you can just pass that information there using values in a query string, alongside the encrypted string. 在非数据库端需要一些信息的地方,您可以使用查询字符串中的值以及加密的字符串将这些信息传递到那里。

Can you believe this? 你能相信吗?

$DB->query("SELECT * FROM table..."); // works of course...

$DB->query("SELECT * FROM another_database.table..."); // WORKS ALSO!

This guy is a miracle: 这个家伙是一个奇迹:

http://www.shawnhogan.com/2005/12/cross-database-join-with-mysql.html http://www.shawnhogan.com/2005/12/cross-database-join-with-mysql.html

I don't believe it, so simple at the end! 我不相信,最后这么简单!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM