Custom endpoint problem

14 views
Skip to first unread message

Joris de Goffau

unread,
Jan 10, 2012, 6:13:52 AM1/10/12
to DotNetOpenAuth
Hi there,

I've created an Endpoint.ashx file for my Open ID Provider

In the ProcessRequest method I've placed the following lines of code:

IRequest request = ProviderEndpoint.Provider.GetRequest();

if (request != null)
{
ProviderEndpoint.PendingRequest = request as IHostProcessedRequest;
IAuthenticationRequest aRequest =
ProviderEndpoint.PendingAuthenticationRequest;
aRequest.IsAuthenticated = true;
ProviderEndpoint.SendResponse();
}

But when I kick this endpoint with this code:

OpenIdRelyingParty rp = new OpenIdRelyingParty();
IAuthenticationRequest areq = rp.CreateRequest(openidurl);
areq.RedirectToProvider();

I got authentication failed.

What am I doing wrong?

Thanks in advance.

Joris de Goffau
Zuid-West Automatisering

Andrew Arnott

unread,
Jan 10, 2012, 9:11:31 AM1/10/12
to dotnet...@googlegroups.com
Well besides not handling the OP Identifier or anonymous request cases, I think the crippling problem is that you're only sending a response when the request is an IHostProcessedRequest.  If you inspect the OpenIdProviderWebForms sample's Provider.ashx.cs carefully, you'll notice that a response is sent even in cases when the request does not implement IHostProcessedRequest.

--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death your right to say it." - S. G. Tallentyre


--
You received this message because you are subscribed to the Google Groups "DotNetOpenAuth" group.
To post to this group, send email to dotnet...@googlegroups.com.
To unsubscribe from this group, send email to dotnetopenid...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dotnetopenid?hl=en.


Reply all
Reply to author
Forward
0 new messages