跨提供商检索OpenId用户信息(声明) [英] Retrieve OpenId User Information (Claims) across providers

查看:86
本文介绍了跨提供商检索OpenId用户信息(声明)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用DotNetOpenAuth登录,这是我登录过程的一部分.它非常适合处理身份验证,但是从各种openId提供程序中检索用户信息的过程效果不佳.

I'm using DotNetOpenAuth to log in as part of my login process. It works great for handling authentication but the process of retrieving user information from various openId providers is not working very well.

使用MyOpenId,我确实获得了我使用带有DotNetOpenAuth的ClaimsRequest请求的全部信息.显然,它使用SREG协议来请求和检索此内容.这对MyOpenId很有用,但对Google或Yahoo以及不支持此协议的其他提供程序没有任何作用(还可以吗?).

Using MyOpenId I do get full information that I request using a ClaimsRequest with DotNetOpenAuth. It apparently uses the SREG protocol to request and retrieve this content. This works great with MyOpenId, but doesn't do anything for Google or Yahoo and other providers that do not support this protocol (yet?).

是否有一种方法可以使用DotNetOpenAuth(或RPX以外的其他某种机制(不在中间寻找另一个人:-})来检索交叉提供者的用户信息?

Is there a way to retrieve cross provider user information using DotNetOpenAuth (or some other mechanism other than RPX (not looking for another man in the middle :-}) )?

推荐答案

我建议您查看实际发生的交流. IE.当您的服务将用户重定向到提供程序时,找出要发送的参数,然后,当用户回来时,还要找出要传输的参数.

I recommend that you look at the actual exchanges that happen. I.e. when your service redirects the user to the provider, find out what parameters are sent, and then, when the user comes back, also find out what parameters are transmitted.

在OpenID 2中,有两种方法来请求用户信息:属性交换(AX)和简单注册(SREG).不确定SIG是什么.提供者是否实施这些协议,以及他们提供什么信息,是他们的选择(首先是希望,然后是用户的选择).

In OpenID 2, there are two ways to request user information: Attribute Exchange (AX), and Simple Registration (SREG). Not sure what SIG is. Whether or not providers implement these protocols, and what information they provide, is their choice (at first, and then hopefully also the user's choice).

我发现Google支持AX,并且始终提供电子邮件地址,有时还会提供用户的名字和姓氏.根据我的经验,Yahoo除了提供所声明的ID之外没有提供其他任何内容.因此,我不接受Yahoo作为提供者,请参见 http://pypi. python.org/pypi?:action=openid

I found that Google supports AX, and provides always the email address, and sometimes the user's first and last name. In my experience, Yahoo doesn't provide anything but the claimed ID. As a consequence, I don't accept Yahoo as a provider, see http://pypi.python.org/pypi?:action=openid

这篇关于跨提供商检索OpenId用户信息(声明)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆