使用Google,您可以像这样获取用户的电子邮件:
var fetch = new FetchRequest();
fetch.Attributes.AddRequired(WellKnownAttributes.Contact.Email);
request.AddExtension(fetch);
然后像这样回复:
var fetch = response.GetExtension<FetchResponse>();
string email = "";
if (fetch != null)
{
email = fetch.GetAttributeValue(WellKnownAttributes.Contact.Email);
}
撰写提供者时,如何返回要求的值?
答案 0 :(得分:0)
DotNetOpenAuth附带的OpenIdProviderWebForms示例包括返回用户属性。你看过了吗?