Commit | Line | Data |
1e64d768 |
1 | package Catalyst::Plugin::Authentication::Credential::HTTP::User; |
2 | |
c46e37e2 |
3 | use strict; |
4 | use warnings; |
5 | |
1e64d768 |
6 | use base 'LWP::UserAgent'; |
7 | |
8 | sub credentials { |
9 | my ($self,$user,$pass)=@_; |
10 | @{$self->{credentials}}=($user,$pass); |
11 | } |
c46e37e2 |
12 | |
1e64d768 |
13 | sub get_basic_credentials { |
14 | my $self = shift; |
15 | return @{$self->{credentials}}; |
16 | } |
17 | |
18 | 1; |
19 | |
20 | =head1 NAME |
21 | |
22 | Catalyst::Plugin::Authentication::Credential::HTTP::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 | |
c46e37e2 |
44 | This software is licensed under the same terms as perl itself.i |
45 | |
46 | =cut |
47 | |