Web サイトでシングル サインオンを行うための最適な手法を知りたいです。これは、複数の Web サイトに入力すると、「透過的な」方法で認証されることを意味します。私はphp + curlを使用してさまざまなサイトのCookieを設定していますが、それを行う標準的な方法が存在するかどうかを知りたいです.
3 に答える
For a standard secure way you need :
- an authentication server
- an authentication filter on each site that need SSO
The mechanism is a little bit complex, it involves http redirects and secure authentication tickets. You will find detailled explanation on the CAS website (a popular java SSO server).
I recommend to read this page "CAS Java Client Gateway Example", especially the sequence diagram at the bottom of the page.
You could also take a look at OpenId. This is the same mechanism used for logging into stackoverflow and features a "global" single sign-on.
I believe there are php libraries available to integrate with it.
You could also take a look at this question.
最良の方法は、外部サイトから画像ストリームをプルする画像タグを使用することです。
したがって、www.some-site.comにアクセスしていて、www.some-partner-site.comにもサインインしたい場合は、ログイン後にこれが表示されます。
画像を使用しているため、ブラウザはそのURLのコンテンツを「プルイン」します。
最近、ASP.NETでそれを行うソリューションを構築しましたが、phpベースのパートナーサイトもあります。
表示される画像は無関係です。実際には、画像をまったく表示しないでください(したがって、1x1サイズ)