Created
May 29, 2015 12:56
-
-
Save IntuitDeveloperRelations/e7ed32e1c584a0f87b59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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