line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::Headers::ActionPack::Authorization; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
2
|
|
|
2
|
|
88908
|
$HTTP::Headers::ActionPack::Authorization::AUTHORITY = 'cpan:STEVAN'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$HTTP::Headers::ActionPack::Authorization::VERSION = '0.09'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
# ABSTRACT: The Authorization Header factory |
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
23
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
95
|
|
11
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
90
|
|
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
1955
|
use HTTP::Headers::ActionPack::Authorization::Basic; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
368
|
|
14
|
2
|
|
|
2
|
|
1657
|
use HTTP::Headers::ActionPack::Authorization::Digest; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
986
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
8
|
|
|
8
|
1
|
187
|
my $class = shift; |
18
|
8
|
|
|
|
|
18
|
my $type = shift; |
19
|
8
|
100
|
|
|
|
65
|
$type eq 'Basic' |
20
|
|
|
|
|
|
|
? HTTP::Headers::ActionPack::Authorization::Basic->new( $type, @_ ) |
21
|
|
|
|
|
|
|
: HTTP::Headers::ActionPack::Authorization::Digest->new( $type, @_ ); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub new_from_string { |
25
|
4
|
|
|
4
|
1
|
71
|
my ($class, $header_string) = @_; |
26
|
4
|
100
|
|
|
|
79
|
$header_string =~ /^Basic/ |
27
|
|
|
|
|
|
|
? HTTP::Headers::ActionPack::Authorization::Basic->new_from_string( $header_string ) |
28
|
|
|
|
|
|
|
: HTTP::Headers::ActionPack::Authorization::Digest->new_from_string( $header_string ); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |