Catalyst-Plugin-Authentication-Store-HTTP

 view release on metacpan or  search on metacpan

lib/Catalyst/Plugin/Authentication/Store/HTTP/User.pm  view on Meta::CPAN

=head2 check_password

=cut

sub check_password {
    my ($self, $password) = @_;

    my $ua =
      Catalyst::Plugin::Authentication::Store::HTTP::UserAgent->new(
        keep_alive => ($self->{keep_alive} ? 1 : 0));
    my $req = HTTP::Request->new(HEAD => $self->{auth_url});

    # set the credentials for the request.
    # if there is a domain set then prepend this onto the user id
    $ua->credentials(
        ($self->{domain} ? join("\\", $self->{domain}, $self->id) : $self->id),
        $password
    );

    my $res = $ua->request($req);



( run in 0.546 second using v1.01-cache-2.11-cpan-de7293f3b23 )