Catalyst::Plugin::Authentication::Credential::HTTP::User - Wrapper for LWP::UserAgent


Catalyst-Plugin-Authentication-Credential-HTTP-Proxy documentation Contained in the Catalyst-Plugin-Authentication-Credential-HTTP-Proxy distribution.

Index


Code Index:

NAME

Top

Catalyst::Plugin::Authentication::Credential::HTTP::User - Wrapper for LWP::UserAgent

DESCRIPTION

Top

A thin wrapper for LWP::UserAgent to make basic auth simpler.

METHODS

Top

credentials

now takes just a username and password

get_basic_credentials

Returns the set credentials, takes no options.

AUTHOR

Top

Marcus Ramberg <mramberg@cpan.org

LICENSE

Top

This software is licensed under the same terms as perl itself.


Catalyst-Plugin-Authentication-Credential-HTTP-Proxy documentation Contained in the Catalyst-Plugin-Authentication-Credential-HTTP-Proxy distribution.

package Catalyst::Plugin::Authentication::Credential::HTTP::User;

use base 'LWP::UserAgent';

sub credentials {
   my ($self,$user,$pass)=@_;
   @{$self->{credentials}}=($user,$pass);
}
sub get_basic_credentials {
    my $self = shift;
    return @{$self->{credentials}};
}

1;