summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/passwordauth.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-25 18:05:55 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-25 18:05:55 -0400
commit1f8b0460c309c54cfbfe4152bbc195a1756cbda5 (patch)
treea8a032052a49e318afcbcea7795c4342f83a72a5 /IkiWiki/Plugin/passwordauth.pm
parentcf6c2f142fdcba4316f616bad5aaa88c6df6031e (diff)
added getsetup hooks for all plugins up to recentchanges
Diffstat (limited to 'IkiWiki/Plugin/passwordauth.pm')
-rw-r--r--IkiWiki/Plugin/passwordauth.pm25
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;