Skip to content

Instantly share code, notes, and snippets.

@IntuitDeveloperRelations
Created May 29, 2015 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntuitDeveloperRelations/e7ed32e1c584a0f87b59 to your computer and use it in GitHub Desktop.
Save IntuitDeveloperRelations/e7ed32e1c584a0f87b59 to your computer and use it in GitHub Desktop.
var openid_identifier = ConfigurationManager.AppSettings["openid_identifier"];
var returnUrl = "OpenIdHandler.aspx";
var response = openid.GetResponse();
if (response == null)
{
// Stage 2: user submitting Identifier
Identifier id;
if (Identifier.TryParse(openid_identifier, out id))
{
try
{
IAuthenticationRequest request = openid.CreateRequest(openid_identifier);
FetchRequest fetch = new FetchRequest();
fetch.Attributes.Add(new AttributeRequest(WellKnownAttributes.Contact.Email));
fetch.Attributes.Add(new AttributeRequest(WellKnownAttributes.Name.FullName));
request.AddExtension(fetch);
request.RedirectToProvider();
}
catch (ProtocolException ex)
{
//ViewData["Message"] = ex.Message;
throw ex;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment