rebuild => 0,
section => "auth",
},
+ openid_realm => {
+ type => "string",
+ description => "url of openid realm (default is cgiurl)",
+ safe => 0,
+ rebuild => 0,
+ },
+ openid_cgiurl => {
+ type => "string",
+ description => "url to ikiwiki cgi to use for openid authentication (default is cgiurl)",
+ safe => 0,
+ rebuild => 0,
+ },
}
sub openid_selector {
);
}
+ my $cgiurl=$config{openid_cgiurl};
+ $cgiurl=$config{cgiurl} if ! defined $cgiurl;
+
+ my $trust_root=$config{openid_realm};
+ $trust_root=$cgiurl if ! defined $trust_root;
+
my $check_url = $claimed_identity->check_url(
- return_to => IkiWiki::cgiurl(do => "postsignin"),
- trust_root => $config{cgiurl},
+ return_to => "$cgiurl?do=postsignin",
+ trust_root => $trust_root,
delayed_return => 1,
);
# Redirect the user to the OpenID server, which will
$secret=rand;
$session->param(openid_secret => $secret);
}
+
+ my $cgiurl=$config{openid_cgiurl};
+ $cgiurl=$config{cgiurl} if ! defined $cgiurl;
return Net::OpenID::Consumer->new(
ua => $ua,
args => $q,
consumer_secret => sub { return shift()+$secret },
- required_root => $config{cgiurl},
+ required_root => $cgiurl,
);
}
+ikiwiki (3.20100611) UNRELEASED; urgency=low
+
+ * openid: Add openid_realm and openid_cgiurl configuration options,
+ useful in a few edge case setups.
+
+ -- Joey Hess <joeyh@debian.org> Fri, 11 Jun 2010 13:39:15 -0400
+
ikiwiki (3.20100610) unstable; urgency=low
* creation_day() etc use local time, not gmtime. To match calendars, which
This plugin is enabled by default, but can be turned off if you want to
only use some other form of authentication, such as [[passwordauth]].
+
+## options
+
+These options do not normally need to be set, but can be useful in
+certian setups.
+
+* `openid_realm` can be used to control the scope of the openid request.
+ It defaults to the `cgiurl` (or `openid_cgiurl` if set); only allowing
+ ikiwiki's [[CGI]] to authenticate. If you have multiple ikiwiki instances,
+ or other things using openid on the same site, you may choose to put them
+ all in the same realm to improve the user's openid experience.
+
+* `openid_cgiurl` can be used to cause a different than usual `cgiurl`
+ to be used when doing openid authentication. The `openid_cgiurl` must
+ point to an ikiwiki [[CGI]], and it will need to match the `openid_realm`
+ to work.