DotNetOpenAuth和Google OpenID实施 [英] DotNetOpenAuth and Google OpenID implementation

查看:103
本文介绍了DotNetOpenAuth和Google OpenID实施的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个相对众所周知的事实,即Google的OpenID提供程序不提供(没有双关语)用户名和其他各种属性,并且它会生成非常丑陋的声明标识符.

It's a relatively well-known fact that Googles' OpenID Provider does not provide (no pun) username and various other properties, as well as that it generates really ugly claimed identifiers.

但是,在最近的 Hanselminutes情节中(距节目开始约21分钟) )安德鲁·阿诺特(Andrew Arnott)表示:在实际提供姓名和电子邮件地址之前,Google有特殊要求".

However, in a recent Hanselminutes episode (at arount 21 minutes into the show) Andrew Arnott says that "Google has special requirements before they'll actually give a name and an email address".

这些要求是什么?人们如何满足Google的要求,以使其真正返回用户名和电子邮件地址?

What are these requirements and how can one satisfy Google enough to make it actually return username and email address?

推荐答案

您永远不会获得Google用户名,但是如果您提出正确的请求,就可以获得电子邮件地址以及用户的姓氏和名字.

You never get the Google username, but you can get the email address and first and last name of the user if your formulate the request right.

这是解决方法我应用于dasBlog以便能够得到名字和姓氏以及电子邮件地址.

Here is the fix I applied to dasBlog so that it would get first and last name plus email address.

基本上,您需要发送一个AX提取请求,该请求需要"名字,姓氏和电子邮件地址.我应该写一篇关于您需要在DotNetOpenAuth中完成的工作的博客文章.如果您认为这会有所帮助,请对此答案发表评论.同时,您可以查看我上面链接到的变更集,看看是否可以顺利进行.

Basically you need to send an AX fetch request that "requires" first name, last name, and email address. I should write a blog post on exactly what you need to do in DotNetOpenAuth to accomplish this. Leave a comment on this answer if you think that would be helpful. In the meantime, you can check out the changeset I link to above and see if that gets you going.

这篇关于DotNetOpenAuth和Google OpenID实施的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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