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