]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/openid.pm
(no commit message)
[git.ikiwiki.info.git] / IkiWiki / Plugin / openid.pm
index cc4b4ba3d4949c737d0d2139729a25c971743ff1..eb21955e9f0889f1c07f47c04e562931a8608a80 100644 (file)
@@ -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",
@@ -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");