I am using the DotNetOpenID Ajax Textbox. I am trying to get the LoggingIn event to fire the following code.
protected void LoggingIn(object sender, OpenIdEventArgs e)
{
e.Request.AddExtension(new ClaimsRequest {
Email = DemandLevel.Request,
});
}
Here is the control I am using.
<RP:OpenIdAjaxTextBox ID="OpenIdAjaxTextBox" runat="server" OnLoggedIn="LogIn" OnLoggingIn="LoggingIn" OnUnconfirmedPositiveAssertion="UnconfirmedPositiveAssertion" OnClientAssertionReceived="onauthenticated(sender)" />
When should this event be firing? Could someone clear up my confusion so I can get the ClaimsRequest working properly?
I seemed to have gotten everything else working fine except the ClaimsRequest because sreg is always null. I have been following the instructions on the following page.
http://www.dotnetopenauth.net/developers/code-snippets/openid-relying-party-using-asp-net-controls/
It seems on the above page there may be an error. It says to add the following line to your own logon button.
OpenIdTextBox1.LogOn();
However there is no LogOn function that I can find in the control. Is this supposed to be LoggingIn() or LogIn()?
It looks like you have it wired up correctly. What evidence do you have that your
LoggingInevent is not being called? Have you set breakpoints to verify that? If it is merely that yourClaimsResponseis always null, that could be evidence that the OpenID Provider you’re testing against is ignoring your ClaimsRequest. If you’re testing against Google, for example, you must mark the email address as Required instead of Requested, and apply the AXFetchAsSregTransform.The instructions on the page you reference that says to add the line
OpenIdTextBox1.LogOn();
to your code-behind is referring only to the
OpenIdTextBoxcontrol — not theOpenIdAjaxTextBoxcontrol that you are using.