line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OAuth::Request; |
2
|
10
|
|
|
10
|
|
132688
|
use warnings; |
|
10
|
|
|
|
|
60
|
|
|
10
|
|
|
|
|
301
|
|
3
|
10
|
|
|
10
|
|
85
|
use strict; |
|
10
|
|
|
|
|
29
|
|
|
10
|
|
|
|
|
429
|
|
4
|
10
|
|
|
10
|
|
86
|
use base qw/Net::OAuth::Message/; |
|
10
|
|
|
|
|
26
|
|
|
10
|
|
|
|
|
48423
|
|
5
|
10
|
|
|
10
|
|
91
|
use URI; |
|
10
|
|
|
|
|
22
|
|
|
10
|
|
|
|
|
227
|
|
6
|
10
|
|
|
10
|
|
86
|
use URI::QueryParam; |
|
10
|
|
|
|
|
23
|
|
|
10
|
|
|
|
|
542
|
|
7
|
|
|
|
|
|
|
|
8
|
10
|
|
|
10
|
|
60
|
use Net::OAuth; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
3696
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.28'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata(required_message_params => [qw/ |
12
|
|
|
|
|
|
|
consumer_key |
13
|
|
|
|
|
|
|
signature_method |
14
|
|
|
|
|
|
|
timestamp |
15
|
|
|
|
|
|
|
nonce |
16
|
|
|
|
|
|
|
/]); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata(optional_message_params => [qw/ |
19
|
|
|
|
|
|
|
version |
20
|
|
|
|
|
|
|
signature |
21
|
|
|
|
|
|
|
/]); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata(required_api_params => [qw/ |
24
|
|
|
|
|
|
|
request_method |
25
|
|
|
|
|
|
|
request_url |
26
|
|
|
|
|
|
|
consumer_secret |
27
|
|
|
|
|
|
|
/]); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata(optional_api_params => [qw/ |
30
|
|
|
|
|
|
|
signature_key |
31
|
|
|
|
|
|
|
token_secret |
32
|
|
|
|
|
|
|
extra_params |
33
|
|
|
|
|
|
|
protocol_version |
34
|
|
|
|
|
|
|
/]); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata(signature_elements => [qw/ |
37
|
|
|
|
|
|
|
request_method |
38
|
|
|
|
|
|
|
normalized_request_url |
39
|
|
|
|
|
|
|
normalized_message_parameters |
40
|
|
|
|
|
|
|
/]); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata(all_message_params => [ |
43
|
|
|
|
|
|
|
@{__PACKAGE__->required_message_params}, |
44
|
|
|
|
|
|
|
@{__PACKAGE__->optional_message_params}, |
45
|
|
|
|
|
|
|
]); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata(all_api_params => [ |
48
|
|
|
|
|
|
|
@{__PACKAGE__->required_api_params}, |
49
|
|
|
|
|
|
|
@{__PACKAGE__->optional_api_params}, |
50
|
|
|
|
|
|
|
]); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata(all_params => [ |
53
|
|
|
|
|
|
|
@{__PACKAGE__->all_api_params}, |
54
|
|
|
|
|
|
|
@{__PACKAGE__->all_message_params}, |
55
|
|
|
|
|
|
|
]); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors( |
58
|
|
|
|
|
|
|
@{__PACKAGE__->all_params}, |
59
|
|
|
|
|
|
|
); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub signature_key { |
62
|
36
|
|
|
36
|
0
|
266
|
my $self = shift; |
63
|
|
|
|
|
|
|
# For some sig methods (I.e. RSA), users will pass in their own key |
64
|
36
|
|
|
|
|
123
|
my $key = $self->get('signature_key'); |
65
|
36
|
50
|
|
|
|
275
|
unless (defined $key) { |
66
|
36
|
|
|
|
|
173
|
$key = Net::OAuth::Message::encode($self->consumer_secret) . '&'; |
67
|
36
|
50
|
|
|
|
2646
|
$key .= Net::OAuth::Message::encode($self->token_secret) if $self->can('token_secret'); |
68
|
|
|
|
|
|
|
} |
69
|
36
|
|
|
|
|
1447
|
return $key; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub normalized_request_url { |
73
|
32
|
|
|
32
|
0
|
1503
|
my $self = shift; |
74
|
32
|
|
|
|
|
205
|
my $url = $self->request_url; |
75
|
32
|
|
|
|
|
409
|
Net::OAuth::Message::_ensure_uri_object($url); |
76
|
32
|
|
|
|
|
44359
|
$url = $url->clone; |
77
|
32
|
|
|
|
|
1820
|
$url->query(undef); |
78
|
32
|
|
|
|
|
1063
|
return $url; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 NAME |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Net::OAuth::Request - base class for OAuth requests |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 SEE ALSO |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
L, L |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 AUTHOR |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Keith Grennan, C<< >> |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Copyright 2007 Keith Grennan, all rights reserved. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
99
|
|
|
|
|
|
|
under the same terms as Perl itself. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=cut |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
1; |