line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OAuth::Lite2::Server::GrantHandler; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
29492
|
use strict; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
322
|
|
4
|
9
|
|
|
9
|
|
42
|
use warnings; |
|
9
|
|
|
|
|
29
|
|
|
9
|
|
|
|
|
989
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
15
|
|
|
15
|
1
|
5652
|
my $class = shift; |
8
|
15
|
|
|
|
|
98
|
bless {}, $class; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub is_required_client_authentication { |
12
|
1
|
|
|
1
|
1
|
969
|
return 1; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub handle_request { |
16
|
1
|
|
|
1
|
1
|
6
|
my ($self, $data_handler) = @_; |
17
|
1
|
|
|
|
|
14
|
die "abstract method"; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
OAuth::Lite2::Server::GrantHandler - base class of each grant_type handler |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 SYNOPSIS |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $handler = OAuth::Lite2::Server::GrantHandler->new; |
27
|
|
|
|
|
|
|
my $res = $handler->handle_request( $ctx ); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 METHODS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head2 new |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Constructor |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 is_required_client_authentication |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Return whether each grant type requires the client authentication |
38
|
|
|
|
|
|
|
The grant type which are defined in spec require client authentication, |
39
|
|
|
|
|
|
|
but additional grant type may not. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 handle_request( $data_handler ) |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
processes passed L, and return |
44
|
|
|
|
|
|
|
hash represents that includes response-parameters. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
my $res = $handler->handle_request( $data_handler ); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 SEE ALSO |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
L |
51
|
|
|
|
|
|
|
L |
52
|
|
|
|
|
|
|
L |
53
|
|
|
|
|
|
|
L |
54
|
|
|
|
|
|
|
L |
55
|
|
|
|
|
|
|
L |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Ryo Ito, Eritou.06@gmail.comE |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Lyo Kato, Elyo.kato@gmail.comE |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Copyright (C) 2010 by Lyo Kato |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
68
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.8 or, |
69
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
1; |