| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package OAuth::Lite::Problems; |
|
2
|
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
423
|
use strict; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
106
|
|
|
4
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
85
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
11
|
use base 'Exporter'; |
|
|
3
|
|
|
|
|
3
|
|
|
|
3
|
|
|
|
|
383
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( all => [qw/ |
|
9
|
|
|
|
|
|
|
VERSION_REJECTED |
|
10
|
|
|
|
|
|
|
PARAMETER_ABSENT |
|
11
|
|
|
|
|
|
|
PARAMETER_REJECTED |
|
12
|
|
|
|
|
|
|
TIMESTAMP_REFUSED |
|
13
|
|
|
|
|
|
|
NONCE_USED |
|
14
|
|
|
|
|
|
|
SIGNATURE_METHOD_REJECTED |
|
15
|
|
|
|
|
|
|
SIGNATURE_INVALID |
|
16
|
|
|
|
|
|
|
CONSUMER_KEY_UNKNOWN |
|
17
|
|
|
|
|
|
|
CONSUMER_KEY_REJECTED |
|
18
|
|
|
|
|
|
|
CONSUMER_KEY_REFUSED |
|
19
|
|
|
|
|
|
|
TOKEN_USED |
|
20
|
|
|
|
|
|
|
TOKEN_EXPIRED |
|
21
|
|
|
|
|
|
|
TOKEN_REVOKED |
|
22
|
|
|
|
|
|
|
TOKEN_REJECTED |
|
23
|
|
|
|
|
|
|
ADDITIONAL_AUTHORIZATION_REQUIRED |
|
24
|
|
|
|
|
|
|
PERMISSION_UNKNOWN |
|
25
|
|
|
|
|
|
|
PERMISSION_DENIED |
|
26
|
|
|
|
|
|
|
USER_REFUSED |
|
27
|
|
|
|
|
|
|
/] ); |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; |
|
30
|
|
|
|
|
|
|
|
|
31
|
3
|
|
|
3
|
|
16
|
use constant VERSION_REJECTED => 'version_rejected'; |
|
|
3
|
|
|
|
|
3
|
|
|
|
3
|
|
|
|
|
237
|
|
|
32
|
3
|
|
|
3
|
|
49
|
use constant PARAMETER_ABSENT => 'parameter_absent'; |
|
|
3
|
|
|
|
|
8
|
|
|
|
3
|
|
|
|
|
160
|
|
|
33
|
3
|
|
|
3
|
|
17
|
use constant PARAMETER_REJECTED => 'parameter_rejected'; |
|
|
3
|
|
|
|
|
3
|
|
|
|
3
|
|
|
|
|
146
|
|
|
34
|
3
|
|
|
3
|
|
16
|
use constant TIMESTAMP_REFUSED => 'timestamp_refused'; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
190
|
|
|
35
|
3
|
|
|
3
|
|
14
|
use constant NONCE_USED => 'nonce_used'; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
134
|
|
|
36
|
3
|
|
|
3
|
|
22
|
use constant SIGNATURE_METHOD_REJECTED => 'signature_method_rejected'; |
|
|
3
|
|
|
|
|
2
|
|
|
|
3
|
|
|
|
|
139
|
|
|
37
|
3
|
|
|
3
|
|
13
|
use constant SIGNATURE_INVALID => 'signature_invalid'; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
136
|
|
|
38
|
3
|
|
|
3
|
|
16
|
use constant CONSUMER_KEY_UNKNOWN => 'consumer_key_unknown'; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
169
|
|
|
39
|
3
|
|
|
3
|
|
14
|
use constant CONSUMER_KEY_REJECTED => 'consumer_key_rejected'; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
146
|
|
|
40
|
3
|
|
|
3
|
|
12
|
use constant CONSUMER_KEY_REFUSED => 'consumer_key_refused'; |
|
|
3
|
|
|
|
|
3
|
|
|
|
3
|
|
|
|
|
120
|
|
|
41
|
3
|
|
|
3
|
|
13
|
use constant TOKEN_USED => 'token_used'; |
|
|
3
|
|
|
|
|
3
|
|
|
|
3
|
|
|
|
|
117
|
|
|
42
|
3
|
|
|
3
|
|
16
|
use constant TOKEN_EXPIRED => 'token_expired'; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
127
|
|
|
43
|
3
|
|
|
3
|
|
18
|
use constant TOKEN_REVOKED => 'token_revoked'; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
126
|
|
|
44
|
3
|
|
|
3
|
|
12
|
use constant TOKEN_REJECTED => 'token_rejected'; |
|
|
3
|
|
|
|
|
3
|
|
|
|
3
|
|
|
|
|
123
|
|
|
45
|
3
|
|
|
3
|
|
12
|
use constant ADDITIONAL_AUTHORIZATION_REQUIRED => 'additional_authorization_required'; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
118
|
|
|
46
|
3
|
|
|
3
|
|
16
|
use constant PERMISSION_UNKNOWN => 'permission_unknown'; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
120
|
|
|
47
|
3
|
|
|
3
|
|
13
|
use constant PERMISSION_DENIED => 'permission_denied'; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
118
|
|
|
48
|
3
|
|
|
3
|
|
12
|
use constant USER_REFUSED => 'user_refused'; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
340
|
|
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
my %PROBLEMS = map { __PACKAGE__->$_() => 1 } @EXPORT_OK; |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub match { |
|
53
|
20
|
|
|
20
|
1
|
7889
|
my $class = shift; |
|
54
|
20
|
|
|
|
|
28
|
my $error = shift; |
|
55
|
20
|
100
|
|
|
|
92
|
return $PROBLEMS{$error} ? 1 : 0; |
|
56
|
|
|
|
|
|
|
} |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 NAME |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
OAuth::Lite::Problems - constants for OAuth Problem Reporting Extension |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
use OAuth::Problems qw(:all); |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
$server->error( TOKEN_REJECTED ); |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This provides constants which used in OAuth Problem Reporting spec. |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 METHODS |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 match($error) |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
my $error = 'token_rejected'; |
|
80
|
|
|
|
|
|
|
if (OAuth::Lite::Problems->match($error)) { |
|
81
|
|
|
|
|
|
|
say "This error is OAuth Problem"; |
|
82
|
|
|
|
|
|
|
$server->error(sprintf "oauth_problem=%s", $error); |
|
83
|
|
|
|
|
|
|
} |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 CONSTANTS |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 VERSION_REJECTED |
|
88
|
|
|
|
|
|
|
=head2 PARAMETER_ABSENT |
|
89
|
|
|
|
|
|
|
=head2 PARAMETER_REJECTED |
|
90
|
|
|
|
|
|
|
=head2 TIMESTAMP_REFUSED |
|
91
|
|
|
|
|
|
|
=head2 NONCE_USED |
|
92
|
|
|
|
|
|
|
=head2 SIGNATURE_METHOD_REJECTED |
|
93
|
|
|
|
|
|
|
=head2 SIGNATURE_INVALID |
|
94
|
|
|
|
|
|
|
=head2 CONSUMER_KEY_UNKNOWN |
|
95
|
|
|
|
|
|
|
=head2 CONSUMER_KEY_REJECTED |
|
96
|
|
|
|
|
|
|
=head2 CONSUMER_KEY_REFUSED |
|
97
|
|
|
|
|
|
|
=head2 TOKEN_USED |
|
98
|
|
|
|
|
|
|
=head2 TOKEN_EXPIRED |
|
99
|
|
|
|
|
|
|
=head2 TOKEN_REVOKED |
|
100
|
|
|
|
|
|
|
=head2 TOKEN_REJECTED |
|
101
|
|
|
|
|
|
|
=head2 ADDITIONAL_AUTHORIZATION_REQUIRED |
|
102
|
|
|
|
|
|
|
=head2 PERMISSION_UNKNOWN |
|
103
|
|
|
|
|
|
|
=head2 PERMISSION_DENIED |
|
104
|
|
|
|
|
|
|
=head2 USER_REFUSED |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
http://oauth.pbworks.com/ProblemReporting |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 AUTHOR |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Lyo Kato, C |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
|
117
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.6 or, |
|
118
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |
|
121
|
|
|
|
|
|
|
|