问题描述
登录SO后,我的昵称显示在顶部.
After logging into SO, my nickname shows up at the top.
当我在自己的网站上设置openid时,我没有任何个人资料信息.
我尝试使用 openid-selector 和 Zend框架
我得到的响应参数:
openid.assoc_handle B2Jgsdf7jkDsdfUwWBGMHUshLmavymH...
openid.claimed_id https://me.yahoo.com/MyYahooId#50a9f
openid.identity https://me.yahoo.com/MyYahooId
openid.mode id_res
openid.ns http://specs.openid.net/auth/2.0
openid.ns.pape http://specs.openid.net/extensions/pape/1.0
openid.op_endpoint https://open.login.yahooapis.com/openid/op/auth
openid.pape.auth_level.nist 0
openid.pape.auth_level.ns.nist http://csrc.nist.gov/publications/nistpubs/800-63/SP800-63V1_0_2.pdf
openid.pape.auth_policies http://schemas.openid.net/pape/policies/2007/06/none
openid.realm http://mywebsite.com/
openid.response_nonce 2009-10-28T18:23:05Zyj0aF9sdfsdfCmoegeAiQ--
openid.return_to http://mywebsite.com/
openid.sig U9O4UpuPsdfdsfsdfBHbVLdjiSyo=
openid.signed assoc_handle,claimed_id,identity,mode,ns,op_endpoint,response_nonce,return_to,signed,ns.pape,pape.auth_level.ns.nist,pape.auth_level.nist,pape.auth_policies
我没有收到昵称之类的个人资料信息是什么原因?当SO使用openid-selector时,如何获得昵称?
What is the reason I do not receive profile information such as nickname?When SO uses openid-selector, how does it get the nickname?
推荐答案
必须通过对OpenID的简单注册(SREG)或属性交换(AX)扩展,检索除Claim_id和终结点URL之外的任何信息.
Any information aside from claimed_id and endpoint URL must be retrieved via Simple Registration (SREG) or Attribute Exchange (AX) extensions to OpenID.
在进行身份验证时,您必须明确要求它们.
You must explicitly request for them when asking for authentication.
Zend的消费者SREG文档可以在这里找到: http://framework.zend.com/manual/en/zend.openid.consumer.html#zend.openid.consumer.sreg
Zend's consumer SREG documentation can be found here: http://framework.zend.com/manual/en/zend.openid.consumer.html#zend.openid.consumer.sreg
请注意,这些信息并不能得到保证,提供者可以自由决定(有或没有用户输入)保留任何和所有请求的信息,或不完全支持它们.
Note that these information are not guaranteed, and providers are given the freedom to decide (with or without user input) to withhold any and all requested information, or not support them outright.
这篇关于如何获取OpenID用户个人资料信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!