line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojo::UserAgent::DigestAuth; |
2
|
1
|
|
|
1
|
|
554571
|
use Mojo::Base qw(Exporter); |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
7
|
|
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
276
|
use Mojo::UserAgent; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
5
|
1
|
|
|
1
|
|
34
|
use Mojo::Util qw(deprecated md5_sum); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
254
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
8
|
|
|
|
|
|
|
our @EXPORT = qw( $_request_with_digest_auth ); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $_request_with_digest_auth = sub { |
11
|
|
|
|
|
|
|
deprecated q[$_request_with_digest_auth() is DEPRECATED in favor of $ua->with_roles('+DigestAuth')->$method(...)]; |
12
|
|
|
|
|
|
|
my @cb = ref $_[-1] eq 'CODE' ? (pop) : (); |
13
|
|
|
|
|
|
|
my ($ua, $method) = (shift, uc shift); |
14
|
|
|
|
|
|
|
$ua = $ua->with_roles('+DigestAuth') unless $ua->DOES('Mojo::UserAgent::Role::DigestAuth'); |
15
|
|
|
|
|
|
|
return $ua->start($ua->build_tx($method, @_), @cb); |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=encoding utf8 |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 NAME |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Mojo::UserAgent::DigestAuth - Allow Mojo::UserAgent to execute digest auth requests |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 VERSION |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
0.05 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 DESCRIPTION |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
L is DEPRECATED in favor of L. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 SYNOPSIS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
See L. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SEE ALSO |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
L. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=cut |