| 1 | package Catalyst::Authentication::Credential::HTTP::Proxy::User; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 2 | ▶ | use base 'LWP::UserAgent'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 6 | ▶ | sub credentials { |
|
Subroutine
credentials: called CC=1 SCAR=0.0
Pod
documented
| |||
| 9 | 6 | my ($self,$user,$pass)=@_; | |
| 10 | 6 | @{$self->{credentials}}=($user,$pass); | |
| 11 | } | ||
| 12 | |||
| 13 | 3 | ▶ | sub get_basic_credentials { |
|
Subroutine
get_basic_credentials: called CC=1 SCAR=0.0
Pod
documented
| |||
| 14 | 3 | my $self = shift; | |
| 15 | 3 | return @{$self->{credentials}}; | |
| 16 | } | ||
| 17 | |||
| 18 | 2 | 1; | |
| 19 | |||
| 20 | =head1 NAME | ||
| 21 | |||
| 22 | Catalyst::Authentication::Credential::HTTP::Proxy::User - Wrapper for LWP::UserAgent | ||
| 23 | |||
| 24 | =head1 DESCRIPTION | ||
| 25 | |||
| 26 | A thin wrapper for L<LWP::UserAgent> to make basic auth simpler. | ||
| 27 | |||
| 28 | =head1 METHODS | ||
| 29 | |||
| 30 | =head2 credentials | ||
| 31 | |||
| 32 | now takes just a username and password | ||
| 33 | |||
| 34 | =head2 get_basic_credentials | ||
| 35 | |||
| 36 | Returns the set credentials, takes no options. | ||
| 37 | |||
| 38 | =head1 AUTHOR | ||
| 39 | |||
| 40 | Marcus Ramberg <mramberg@cpan.org> | ||
| 41 | |||
| 42 | =head1 LICENSE | ||
| 43 | |||
| 44 | This software is licensed under the same terms as perl itself. | ||
| 45 | |||
| 46 | =cut | ||
| 47 | |||