How the Blogger OpenID endpoint is resolved?
In sites providing OpenID, I usually logging in using my domain like this:
The underlying framework is able to resolve the domain I've inserted to a Url like this:
Is it something hard-coded or is there an Http request to discover the login Url before redi开发者_如何学JAVArecting the user to the Blogger login page?
Blogger adds links from your blog to the OpenID provider url in the head of the html it serves.
http://bloggerindraft.blogspot.com/2008/01/using-bloggers-openid-with-any-url.html
and
http://www.digitalpurview.com/delegation-use-custom-domain-for-openid/
<link rel="openid.server" href="http://draft.blogger.com/openid-server.g" />
<link rel="openid.delegate" href="http://yourbloggerblog.blogspot.com" />
This is just one way to support delegation though. It can also be done with dns entries which require lower level programming to resolve than an http call.
A debugging proxy application could help in demonstrating exactly how this works. I prefer Charles but others like Fiddler work fine too.
http://www.charlesproxy.com/
Are you hosting your domain on blogger? For hosted domain, instead of return entire HTML containing <link>
(as Samuel suggests), Blogger serve XRDS discovery information directly to OpenID discovery requests that come from Relay Parties (in this case, StackOveflow).
If you are thinking about switch OpenID Provider for your hosted domain, the only way to do it is to move the hosting. I don't think Blogger provide a way for you do assign the OpenID OP you want to authenticate to.
精彩评论