AZURE ACS - 的Windows Live ID - 我如何获得经过验证的用户的电子邮件地址和名字吗? [英] AZURE ACS - Windows Live ID - How do I get the email and name of the authenticated user?

查看:435
本文介绍了AZURE ACS - 的Windows Live ID - 我如何获得经过验证的用户的电子邮件地址和名字吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是该方案:

MVC 3应用程序的开发AZURE乳宁环境
在AZURE ACS认证实施这里找到同样的方式<一个href=\"http://msdn.microsoft.com/en-us/library/hh127794.aspx\">http://msdn.microsoft.com/en-us/library/hh127794.aspx

MVC 3 application runing in AZURE Dev enviroment Authentication in AZURE ACS implemented the same way found here http://msdn.microsoft.com/en-us/library/hh127794.aspx

我想获得用户名和电子邮件,但我不能找到一种方法来配置索赔规则,在某种程度上,我会获得清晰的文本值,而不是我得到的似乎是一个字符串进行加密。
所以,我可以配置的方式,我得到它以明文的规则?或者,我可以解密返回的值?
是任何这可能还是我看这里的错误的事情。

I am trying to get the users name, and email, but I can't find a way to configure the "Claim Rule", in a way that I would get a clear text value, instead I get a string that seems to be encrypted. So can I configure the rule in a way that I get it in clear text? Or can I unencrypt the value returned? Is any of this possible or am I looking at the wrong thing here.

感谢

推荐答案

IIRC,它是对的Windows Live隐私政策,以解除用户的姓名或电子邮件地址作为索赔(不像Gmail或雅虎)。因此,它是不可能的,从现场获取这些说法(除非你是微软)。

IIRC, it is against Windows Live privacy policy to release the user's name or email address as claims (unlike Gmail or Yahoo!). As such, it is not possible to get those claims from Live (unless you happen to be Microsoft).

您可以得到的唯一值称为名称标识符。这是每个RP领域唯一的(即,不是每个LiveID的一个值,而是由域名不同)。这也是故意让你不能有不同的网站合作,以跟踪用户。通常情况下,你会得到的名称标识符(称为PUID),​​然后粘在你的数据库中,以便地方你知道,你以前见过它。然后,用户使用上的姓名,电子邮件等你的身边注册和使用该PUID关联起来。

The only value you can get is called a name identifier. It is unique per RP domain (i.e. it is not a single value per LiveID, but differs by domain). This is also intentional so that you cannot have different websites collaborating to track a user. Typically, you would get the name identifier (called a PUID) and then stick that in your database somewhere so you know that you have seen it before. Then the user registers on your side with name, email, etc. and you correlate that with the PUID.

在另一方面,LiveID的同时还支持OAuth2用户,这样你就可以让你从用户需要的任何用户配置文件信息(与他/她的同意)。请参见这里

On the other hand, LiveId also supports OAuth2, so you can get whatever user profile information you need from the user (with his/her consent). See here.

这篇关于AZURE ACS - 的Windows Live ID - 我如何获得经过验证的用户的电子邮件地址和名字吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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