CGI-Application-Plugin-Authentication
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/Authentication/Driver/DBI.pm view on Meta::CPAN
the newest record from the result set, so it will be important to order the
result set and limit it to return only one row.
LIMIT => 1
Note: This option is only useful if you also specify the COLUMNS option.
=head1 ENCODED PASSWORDS
It is quite common to store passwords in a database in some form that makes them hard
(or virtually impossible) to guess. Most of the time one way encryption techniques
like Unix crypt or MD5 hashes are used to store the password securely (I would recommend
using MD5 or SHA1 over Unix crypt). If you look at the examples listed above, you can
see that you can mark your columns with an encoding type. Here is another example:
CONSTRAINTS => {
username => '__CREDENTIAL_1__',
'MD5:password' => '__CREDENTIAL_2__',
}
Here the password field is expected to be stored in the database in MD5 format. In order for the
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
}
# record for later use in resume;
$self->{properties}{_added_to_INC} = [ $self->_added_to_INC ];
$self->set_bundle_inc;
$self->dist_name;
$self->dist_version;
$self->release_status;
$self->_guess_module_name unless $self->module_name;
$self->_find_nested_builds;
return $self;
}
sub resume {
my $package = shift;
my $self = $package->_construct(@_);
$self->read_config;
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
EOF
close $fh;
unshift @INC, File::Spec->catdir(File::Spec->rel2abs($build_dir), 'lib');
eval "use $opts{class}";
die $@ if $@;
return $opts{class};
}
sub _guess_module_name {
my $self = shift;
my $p = $self->{properties};
return if $p->{module_name};
if ( $p->{dist_version_from} && -e $p->{dist_version_from} ) {
my $mi = Module::Metadata->new_from_file($self->dist_version_from);
$p->{module_name} = $mi->name;
}
else {
my $mod_path = my $mod_name = $p->{dist_name};
$mod_name =~ s{-}{::}g;
local/lib/perl5/Module/Build/Base.pm view on Meta::CPAN
return \%licenses;
}
sub _license_url {
return $license_urls{$_[1]};
}
}
sub _software_license_class {
my ($self, $license) = @_;
if ($self->valid_licenses->{$license} && eval { require Software::LicenseUtils; Software::LicenseUtils->VERSION(0.103009) }) {
my @classes = Software::LicenseUtils->guess_license_from_meta_key($license, 1);
if (@classes == 1) {
eval "require $classes[0]";
return $classes[0];
}
}
LICENSE: for my $l ( $self->valid_licenses->{ $license }, $license ) {
next unless defined $l;
my $trial = "Software::License::" . $l;
if ( eval "require Software::License; Software::License->VERSION(0.014); require $trial; 1" ) {
return $trial;
t/61_store_cookie_other.t view on Meta::CPAN
my %hash = (c=>'I am not a checksum',f=>'Bubble');
my $rawdata = join("\0", map {join ('=', $_, $hash{$_}) } keys %hash);
my $nonsense;
warning_like {
$nonsense = $cgiapp->authen->store->_decode(MIME::Base64::encode($rawdata));
} $SECRET_WARN, 'decode warning';
is($nonsense, undef, 'decode nonsense');
{
use CGI::Application::Plugin::Authentication::Store::Cookie;
$CGI::Application::Plugin::Authentication::Store::Cookie::SECRET = 'you would never guess';
}
$nonsense = $cgiapp->authen->store->_decode(MIME::Base64::encode($rawdata));
is($nonsense, undef, 'decode nonsense with secret');
}
}
TestAppStoreCookie->run_store_tests;
( run in 0.374 second using v1.01-cache-2.11-cpan-ba35b6b0368 )