hook(type => "checkconfig", id => "openid", call => \&checkconfig);
hook(type => "getsetup", id => "openid", call => \&getsetup);
hook(type => "auth", id => "openid", call => \&auth);
hook(type => "checkconfig", id => "openid", call => \&checkconfig);
hook(type => "getsetup", id => "openid", call => \&getsetup);
hook(type => "auth", id => "openid", call => \&auth);
(defined $openid_error ? (openid_error => $openid_error) : ()),
(defined $openid_url ? (openid_url => $openid_url) : ()),
($real_cgi_signin ? (nonopenidform => $real_cgi_signin->($q, $session, 1)) : ()),
);
IkiWiki::printheader($session);
(defined $openid_error ? (openid_error => $openid_error) : ()),
(defined $openid_url ? (openid_url => $openid_url) : ()),
($real_cgi_signin ? (nonopenidform => $real_cgi_signin->($q, $session, 1)) : ()),
);
IkiWiki::printheader($session);
IkiWiki::openiduser($session->param("name"))) {
$form->field(name => "openid_identifier", disabled => 1,
label => htmllink("", "", "ikiwiki/OpenID", noimageinline => 1),
IkiWiki::openiduser($session->param("name"))) {
$form->field(name => "openid_identifier", disabled => 1,
label => htmllink("", "", "ikiwiki/OpenID", noimageinline => 1),
- value => $session->param("name"),
- size => length($session->param("name")), force => 1,
- fieldset => "login");
+ value => "",
+ size => 1, force => 1,
+ fieldset => "login",
+ comment => $session->param("name"));
my $trust_root=$config{openid_realm};
$trust_root=$cgiurl if ! defined $trust_root;
my $check_url = $claimed_identity->check_url(
my $trust_root=$config{openid_realm};
$trust_root=$cgiurl if ! defined $trust_root;
my $check_url = $claimed_identity->check_url(
- return_to => "$cgiurl?do=postsignin",
- trust_root => $trust_root,
+ return_to => auto_upgrade_https($q, "$cgiurl?do=postsignin"),
+ trust_root => auto_upgrade_https($q, $trust_root),
IkiWiki::redirect($q, $setup_url);
}
elsif ($csr->user_cancel) {
IkiWiki::redirect($q, $setup_url);
}
elsif ($csr->user_cancel) {
foreach my $ext (@extensions) {
foreach my $field (qw{value.email email}) {
if (exists $ext->{$field} &&
defined $ext->{$field} &&
length $ext->{$field}) {
$session->param(email => $ext->{$field});
foreach my $ext (@extensions) {
foreach my $field (qw{value.email email}) {
if (exists $ext->{$field} &&
defined $ext->{$field} &&
length $ext->{$field}) {
$session->param(email => $ext->{$field});
- if (defined $username) {
- $username=~s/\s+/_/g;
- $session->param(username => $username);
+ if (defined $nickname) {
+ $session->param(nickname =>
+ Encode::decode_utf8($nickname));
return Net::OpenID::Consumer->new(
ua => $ua,
args => $q,
consumer_secret => sub { return shift()+$secret },
return Net::OpenID::Consumer->new(
ua => $ua,
args => $q,
consumer_secret => sub { return shift()+$secret },
sub load_openid_module {
# Give up if module is unavailable to avoid needing to depend on it.
eval q{use Net::OpenID::Consumer};
sub load_openid_module {
# Give up if module is unavailable to avoid needing to depend on it.
eval q{use Net::OpenID::Consumer};