MooseX::Types::Authen::Passphrase - Authen::Passphrase type constraint and coercions
version 0.04
package User; use Moose; use MooseX::Types::Authen::Passphrase qw(Passphrase); has pass => ( isa => Passphrase, coerce => 1, handles => { check_password => "match" }, ); User->new( pass => undef ); # Authen::Passphrase::RejectAll my $u = User->new( pass => "{SSHA}ixZcpJbwT507Ch1IRB0KjajkjGZUMzX8gA==" ); $u->check_password("foo"); # great success User->new( pass => Authen::Passphrase::Clear->new("foo") ); # clear text is not coerced by default
This MooseX::Types library provides string coercions for the Authen::Passphrase family of classes.
Authen::Passphrase
Passphrase
These are defined a class types.
The following coercions are defined:
Undef
Returns Authen::Passphrase::RejectAll
Str
Parses using from_rfc2307 if the string begins with a {, or using from_crypt otherwise.
from_rfc2307
{
from_crypt
יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
This software is copyright (c) 2008 by Yuval Kogman.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Brian Fraser <fraserbn@gmail.com>
Karen Etheridge <ether@cpan.org>
Yuval Kogman <nothingmuch@woobling.org>
To install MooseX::Types::Authen::Passphrase, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Types::Authen::Passphrase
CPAN shell
perl -MCPAN -e shell install MooseX::Types::Authen::Passphrase
For more information on module installation, please visit the detailed CPAN module installation guide.