I'm implementing OpenID support for a public website. Yahoo and Verisign openid authentication currently works fine. However, I cannot seem to connect to Google's endpoint. Below is the code:
Usual initialization and stuff...
my $csr = Net::OpenID::Consumer->new(
ua => LWP::UserAgent->new(),
consumer_secret => time,
args => CGI->new(),
debug => 1,
);
my $claimed_identity =
$csr->claimed_identity('https://www.google.com/accounts/o8/id');
my $check_url = $claimed_identity->check_url(
return_to => "http://bla.com/openid",
trust_root => "http://bla.com",
delayed_return => 1,
);
print $check_url, "\n";
... other stuff
The error is always the same:
url_fetch
_error: Error fetching URL: Not Found
A. There are two mysteries here. I can use LWP directly and grab the XRDS file from https://www.google.com/accounts/o8/id wih no issues.
B. Using same code, but changing the endpoint discovery url to "https://me.yahoo.com" works perfectly fine.
How do I make my code work with Google? I'm quite baffked why I doesn't work for Google when it works for Yahoo and Verisign. Any ideas?