用于从OpenID提供程序检索电子邮件地址的通用参数 [英] Common parameter to retrieve email address from OpenID provider
问题描述
在我的站点中,我正在使用基于OpenID的身份验证.我正在从OpenID提供者处请求电子邮件地址".问题在于,每个提供者在身份验证后都会在GET响应中使用自己的参数发送电子邮件地址. 我列出了我所见过的三项
In my site, I am using authentication based on OpenID. I am requesting 'email address' from the OpenID provider. The problem is each provider is sending the email address in their own parameter in GET response after authentication. I am listing down three of what I have seen
StackExchange
openid_alias3_value_alias1
openid_alias3_value_alias1
Yahoo!
openid_ax_value_email
openid_ax_value_email
openid_ext1_value_email
openid_ext1_value_email
很难(不是标准)为每个OpenID提供程序编写单独的代码行. 有这个标准吗?
It is difficult (and not standard) to write separate lines of code for each OpenID provider. Is there a standard for this?
(added a bug : https://meta.stackexchange.com/questions/106922/stackexchange-openid-parameter-for-email-should-be-openid-ax-value-email)
推荐答案
由于 OpenID支持扩展来携带诸如email
之类的额外数据,但完全由OpenID提供者决定,要显示哪些数据(如果有的话),要使用的标识符以及将其放置在扩展名称空间层次结构中的位置.
OpenID supports extensions to carry extra data like email
, but it's completely up to the OpenID provider which data to reveal (if any at all), what identifiers to use and where to place them in their extension namespace hierarchy.
这篇关于用于从OpenID提供程序检索电子邮件地址的通用参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!