开发者

how does stackoverflow get the user-info when people login site use openid

开发者 https://www.devze.com 2022-12-20 23:36 出处:网络
i want toget the userid and somethins other about user. but i don\'t get this i used pinax what shouldi do ??

i want to get the userid and somethins other about user.

but i don't get this

i used pinax

what should i do ??

thanks

ex:facebook

Javascript (from therunaround demo):
   FB.Facebook.get_sessionState().waitUntilRe开发者_StackOverflow中文版ady(function() {
        var user = FB.Facebook.apiClient.get_session() ?
          FB.Facebook.apiClient.get_session().uid :
          null;
   }


You can read about the open-id implementation details on their site, where: http://openid.net/add-openid/add-getting-started/.

In a nutshell, you redirect the client to the openid provider who fills out the appropriate information, then the provider sends the client back to your site. You then make a (HTTP) request directly to the OpenID provider to retrieve the information that the client authorized them to give you. What information that is is up to the client and his openid provider, but usually includes a name and email address, and sometimes a physical address.


I don't think SO got my (google) userid when I logged on with OpenID based on Google -- if it did, somehow miraculously bypassing the OpenID safeguards (?), it certainly kept this fact very well hidden. What makes you think otherwise?

0

精彩评论

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