Apache-PHLogin

 view release on metacpan or  search on metacpan

PHLogin.pm  view on Meta::CPAN


    my $user = $r->connection->user;

    unless ( $attr->{host} ) {
        $r->log_reason("$prefix is missing the CCSO host", $r->uri);
        return SERVER_ERROR;
    }

    my $ph = Net::PH->new($attr->{host},
			Port=>$attr->{port},
			Timeout=>$attr->{timeout});
    unless( $ph ) {
        $r->log_reason("PH failed to connect to CCSO host: " . $attr->{host} . $attr->{port} . $attr->{timeout}, $r->uri);
        return SERVER_ERROR;
    }
        
    my $ph_login = $ph->login($user, $sent_pwd);
    unless( $ph_login ) {
        $r->log_reason("user $user: " . $ph->message, $r->uri);
        $r->note_basic_auth_failure;
        return AUTH_REQUIRED;



( run in 0.228 second using v1.01-cache-2.11-cpan-a5abf4f5562 )