Hi folks,
Andrew Arnott has a post here about how to extract the attribute exchange extension data, from an OpenId proivder. Here's a snippet of the code :-
var fetch = openid.Response.GetExtension<FetchResponse>();
if (fetch != null)
{
IList<string> emailAddresses = fetch.GetAttribute
(WellKnownAttributes.Contact.Email).Values;
IList<string> fullNames = fetch.GetAttribute
(WellKnownAttributes.Name.FullName).Values;
string email = emailAddresses.Count > 0 ? emailAddresses[0] : null;
string fullName = fullNames.Count > 0 ? fullNames[0] : null;
}
When i try to do the following...
fetch.GetAttribute(...)
I get a compile error. Basically, that doesn't exist. Is the only (read: proper) way to do this as follows...
fetch.Attribue[WellKnownAttributes.Contact.Email].Values
cheers :)