diff options
Diffstat (limited to 'IkiWiki/Plugin/passwordauth.pm')
-rw-r--r-- | IkiWiki/Plugin/passwordauth.pm | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm index f3f1aa4bf..a3fd2d4ed 100644 --- a/IkiWiki/Plugin/passwordauth.pm +++ b/IkiWiki/Plugin/passwordauth.pm @@ -7,13 +7,30 @@ use strict; use IkiWiki 2.00; sub import { #{{{ - hook(type => "formbuilder_setup", id => "passwordauth", - call => \&formbuilder_setup); - hook(type => "formbuilder", id => "passwordauth", - call => \&formbuilder); + hook(type => "getsetup", id => "passwordauth", "call" => \&getsetup); + hook(type => "formbuilder_setup", id => "passwordauth", call => \&formbuilder_setup); + hook(type => "formbuilder", id => "passwordauth", call => \&formbuilder); hook(type => "sessioncgi", id => "passwordauth", call => \&sessioncgi); } # }}} +sub getsetup () { #{{{ + return + account_creation_password => { + type => "string", + default => "", + description => "a password that must be entered when signing up for an account", + safe => 1, + rebuild => 0, + }, + password_cost => { + type => "integer", + default => 8, + description => "cost of generating a password using Authen::Passphrase::BlowfishCrypt", + safe => 1, + rebuild => 0, + }, +} #}}} + # Checks if a string matches a user's password, and returns true or false. sub checkpassword ($$;$) { #{{{ my $user=shift; |