开发者

How do I program a hyperlink to include a username and password to the target site?

开发者 https://www.devze.com 2022-12-31 06:29 出处:网络
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

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 me开发者_如何转开发mbers 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.


I think you are looking for some "Single Sign On" solution.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消