How to include AX extension in OpenID auth request using DotNetOpenAuth
How to make a开发者_如何学JAVAttribute exchange request in dotnetopenauth.
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();
精彩评论