Catalyst::Authentication::Credential::RemoteHTTP::UserAgent - Wrapper for LWP::UserAgent


Catalyst-Authentication-Credential-RemoteHTTP documentation Contained in the Catalyst-Authentication-Credential-RemoteHTTP distribution.

Index


Code Index:

NAME

Top

Catalyst::Authentication::Credential::RemoteHTTP::UserAgent - Wrapper for LWP::UserAgent

VERSION

Top

version 0.04

DESCRIPTION

Top

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

METHODS

Top

set_credentials

now takes just a username and password

get_basic_credentials

Returns the set credentials, takes no options.

ACKNOWLEDGEMENTS

Top

Marcus Ramberg <mramberg@cpan.org - original code in Catalyst::Plugin::Authentication::Credential::HTTP::User

AVAILABILITY

Top

The project homepage is http://search.cpan.org/dist/Catalyst-Authentication-Credential-RemoteHTTP.

The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit http://www.perl.com/CPAN/ to find a CPAN site near you, or see http://search.cpan.org/dist/Catalyst-Authentication-Credential-RemoteHTTP/.

The development version lives at http://github.com/nigelm/Catalyst-Authentication-Credential-RemoteHTTP and may be cloned from git://github.com/nigelm/Catalyst-Authentication-Credential-RemoteHTTP. Instead of sending patches, please fork this project using the standard git and github infrastructure.

BUGS AND LIMITATIONS

Top

No bugs have been reported.

Please report any bugs or feature requests through the web interface at http://rt.cpan.org.

BUGS

Top

Please report any bugs or feature requests to bug-catalyst-authentication-credential-remotehttp@rt.cpan.org or through the web interface at: http://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Authentication-Credential-RemoteHTTP

AUTHOR

Top

Nigel Metheringham <nigelm@cpan.org>

COPYRIGHT AND LICENSE

Top


Catalyst-Authentication-Credential-RemoteHTTP documentation Contained in the Catalyst-Authentication-Credential-RemoteHTTP distribution.

package Catalyst::Authentication::Credential::RemoteHTTP::UserAgent;
BEGIN {
  $Catalyst::Authentication::Credential::RemoteHTTP::UserAgent::AUTHORITY = 'cpan:NIGELM';
}
BEGIN {
  $Catalyst::Authentication::Credential::RemoteHTTP::UserAgent::VERSION = '0.04';
}

# ABSTRACT: Wrapper for LWP::UserAgent

use strict;
use warnings;
use base qw/LWP::UserAgent/;

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

sub get_basic_credentials {
    my $self = shift;
    return @{ $self->{credentials} };
}


1;

__END__