Vagif Abilov
Vagif Abilov

Reputation: 9991

DotNetOpenAuth and X-XRDS-Location header

I am playing with DotNetOpenAuth samples, trying to understand how to properly integrate with OpenID. One of the samples is called OpenIdRelyingPartyMvc. It has two code sections that I am not sure about how they influence functionality.

If I remove last line that maps "Route", nothing seems to be affected: mapping "Default" seems to be sufficient. Why is there a "Route" route?

If I remove "AppendHeader" call and test the sample, it still works! I understand that this header is sufficient, I just can't make the sample application depend on it: it works without it's being set up. If I set the breakpoint inside Xrds method, it is never triggered.

Upvotes: 4

Views: 1619

Answers (1)

Andrew Arnott
Andrew Arnott

Reputation: 81801

The route in global.asax.cs may be superfluous.

The X-XRDS-Location header that you're removing is not strictly necessary for the OpenID flow, but if you publish your relying party application without out, Yahoo! and other OpenID Providers may warn the user that your site is not legit.

You can test this locally (and thus observe the Home/Xrds action being executed) by running the OpenIdProviderWebForms sample and logging into your RP using an identifier from that sample OP. During login, the OP will query the RP's XRDS, and on the web page asking you to confirm the login, it will indicate whether "RP verification" succeeded or failed. If it succeeded, you should be good to go.

Upvotes: 3

Related Questions