如何编写超链接以包含目标站点的用户名和密码?
我们有一个网站,其中有一个部分仅限会员使用。他们登录并可以查看该网站。
一些信息存储在另一台服务器上。我们希望这些信息只能由那些登录主网站的人访问。
在不让会员再次登录的情况下链接两个站点的最佳方式是什么?似乎必须有某种方法来发送加密的用户名和密码以及超链接中的 URL。
有什么想法吗?先感谢您。
弗雷德·G.
We have a website with a section restricted to members only. They log in and can view the website.
Some of the information is stored on another server. We want that information to ONLY be accessible to those who have logged into the main website.
What would be the best way to link the two sites, without making members log in again? Seems like there must be some way to send an encrypted username and password along with the URL in the hyperlink.
Any ideas? Thank you in advance.
Fred G.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您正在寻找一些“单点登录”解决方案。
I think you are looking for some "Single Sign On" solution.
您可以将会话 ID 作为
GET
参数添加到 URL(例如,使用?SESSIONID=
后缀,然后让第二个站点验证会话(检查它是否已登录,检查登录的用户是否有权访问他们请求的资源)在共享数据库中。You can add the session ID as a
GET
parameter to the URL (eg suffix it with?SESSIONID=<long ID here>
, then have the second site validate the session (check that it's logged in, check that the logged in user has access to the resource they're requesting) in a shared database.