Limper::Passphrase - generate and use passphrases with Limper
version 0.013
use Authen::Passphrase; use Authen::Passphrase::BlowfishCrypt; #use Limper::Passphrase; use Limper; # this must come after all extensions post '/password' => { # get $passphrase and $user somehow my $ppr = Authen::Passphrase::BlowfishCrypt->new(cost => 8, salt_random => 1, passphrase => $passphrase); # store $ppr->as_rfc2307 for user }; post '/login' => { # get $passphrase and $user somehow if (Authen::Passphrase->from_rfc2307($user->{passphrase})->match($passphrase)) { # set some cookies or something 'Logged in'; } else { status 401; 'Unauthorized'; } }; limp;
Limper::Passphrase shows you how to deal with passphrases with Limper, and nothing more. You might as well use M, but this has documentation.
This also serves to show that you don't need to make everything a plugin for Limper. If it's not messing with the request, response, or hooks, it should not be a plugin.
Nothing additional is exported.
Copyright (C) 2014 by Ashley Willis <ashley+perl@gitable.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.4 or, at your option, any later version of Perl 5 you may have available.
Limper
Limper::Extending
M
To install Limper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Limper
CPAN shell
perl -MCPAN -e shell install Limper
For more information on module installation, please visit the detailed CPAN module installation guide.