OpenIDの履歴

ID入れるだけで認証済むもやと勘違いしてた。そなことのような話あるはずないのに…。実際はIdentity Providerに認証を委譲する形。IDをURIで表すことや、仕様がオープンになってるので認証プロバイダが分散することが特徴。

仕組み

1. サービスを行うサイト(Consumer)はOpenIDからHTMLを取得する
 Site fetches the HTML of my OpenID
2. そこから opneid.serverを探す→認証プロバイダ(Identity Provider
 Finds "openid.server"
3. サイトは認証プロバイダと秘密のやりとりする
 Establishes a shared secret with the Provider
4. ユーザのブラウザを認証プロバイダにリダイレクトしてログインさせる
 Redirects my browser to the Provider where I authenticate and allow the OpenID login
5. サービスサイトに結果を返してリダイレクトする
 Provider redirects my browser back to the site with an OpenID response
6. サービスサイトは、ユーザをログイン
 Site verifies the signature and logs me in

で公開してるOpenIDサーバー

準備

OpenIDのURIには決められたlink要素を記述したHTMLを用意する。

例えばライブドア(http://profile.livedoor.com/akkun_choi/)のにはこの記述がある。

<link rel="openid.server" href="http://auth.livedoor.com/openid/server" />


もしこれを独自のURIにしようと思ったらそこに以下のを記述しとけばいい(はず)

<link rel="openid.server" href="http://auth.livedoor.com/openid/server" />
<link rel="openid.delegate" href="http://profile.livedoor.com/akkun_choi/" />


その他

  • 認証プロバイダが信頼できるかどうか。


参考資料