从 OpenID 提供商检索电子邮件地址的通用参数
在我的网站中,我使用基于 OpenID 的身份验证。我正在向 OpenID 提供商请求“电子邮件地址”。问题是每个提供商在身份验证后在 GET 响应中以自己的参数发送电子邮件地址。 我列出了我所看到的三个
StackExchange
openid_alias3_value_alias1
雅虎!
openid_ax_value_email
openid_ext1_value_email
为每个 OpenID 提供者编写单独的代码行很困难(而且不标准)。 这有标准吗?
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
Yahoo!
openid_ax_value_email
openid_ext1_value_email
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于 Positive 中没有定义像
openid.email
这样的标识符OpenID Auth 2.0 规范的断言部分,我会说:不,没有这样的标准。OpenID 支持扩展来携带额外的数据,例如
电子邮件
,但这完全取决于 OpenID 提供者要显示哪些数据(如果有的话)、使用哪些标识符以及将它们放置在扩展命名空间层次结构中的位置。As there's no identifier like
openid.email
defined in the Positive Assertions section of the OpenID Auth 2.0 specs, I'd say: no, there is no such standard.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.