X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/5b459737a50d83ff94490d86d1b9a4438d4b50a1..90b3140fffc9c42d255ee8788eb53c8c8a626e8c:/IkiWiki/Plugin/openid.pm diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index 67b8cd387..eb21955e9 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -11,6 +11,7 @@ sub import { hook(type => "auth", id => "openid", call => \&auth); hook(type => "formbuilder_setup", id => "openid", call => \&formbuilder_setup, last => 1); + IkiWiki::loadplugin("emailauth"); IkiWiki::loadplugin("loginselector"); IkiWiki::Plugin::loginselector::register_login_plugin( "openid", @@ -63,7 +64,7 @@ sub openid_check_input ($) { defined $q->param("action") && $q->param("action") eq "verify" && defined $openid_url && length $openid_url; } -sub openid_auth ($$$) { +sub openid_auth ($$$$) { my $q=shift; my $session=shift; my $errordisplayer=shift; @@ -218,14 +219,10 @@ sub getobj ($$) { eval q{use Net::OpenID::Consumer}; error($@) if $@; - my $ua; - eval q{use LWPx::ParanoidAgent}; - if (! $@) { - $ua=LWPx::ParanoidAgent->new(agent => $config{useragent}); - } - else { - $ua=useragent(); - } + # We pass the for_url parameter, even though it's undef, because + # that will make sure we crash if used with an older IkiWiki.pm + # that didn't automatically try to use LWPx::ParanoidAgent. + my $ua=useragent(for_url => undef); # Store the secret in the session. my $secret=$session->param("openid_secret");