views:

54

answers:

1

How to make attribute exchange request in dotnetopenauth.

+1  A: 

If you are just trying to get standard attributes, I recommend you read about the AXFetchAsSregTransform which hides the complexity of AX and SREG attribute gathering from your site.

If you are doing something custom and know what AX attributes you need to request, here is sample code:

var rp = new OpenIdRelyingParty();
var request = rp.CreateRequest("=some*identifier");
var ax = new FetchRequest();
ax.Attributes.AddRequired(WellKnownAttributes.Contact.Email);
request.AddExtension(ax);
request.RedirectToProvider();
Andrew Arnott