blib/lib/OAuth/Lite2/Server/GrantHandler.pm

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 3 / 3 totaltotal 100% 20 / 20 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
new
1.0
CRAP 1.0
« blib/lib/OAuth/Lite2/Server/Context.pm ↑ Summary blib/lib/OAuth/Lite2/Server/GrantHandlers.pm »
1 package OAuth::Lite2::Server::GrantHandler;
2  
3 15 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 15 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 sub new {
7 57 ▶ my $class = shift;
Subroutine new: called CC=1 SCAR=0.0
Pod documented
8 57 bless {}, $class;
9 }
10  
11 sub is_required_client_authentication {
12 52 ▶ return 1;
Subroutine is_required_client_authentication: called CC=1 SCAR=0.0
Pod documented
13 }
14  
15 sub handle_request {
16 1 ▶ my ($self, $data_handler) = @_;
Subroutine handle_request: called CC=1 SCAR=0.0
Pod documented
17 1 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<OAuth::Lite2::Server::DataHandler>, 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<OAuth::Lite2::Server::GrantHandlers>
51 L<OAuth::Lite2::Server::GrantHandler::AuthorizationCode>
52 L<OAuth::Lite2::Server::GrantHandler::Password>
53 L<OAuth::Lite2::Server::GrantHandler::RefreshToken>
54 L<OAuth::Lite2::Server::GrantHandler::GroupingRefreshToken>
55 L<OAuth::Lite2::Server::GrantHandler::ServerState>
56  
57 =head1 AUTHOR
58  
59 Ryo Ito, E<lt>ritou.06@gmail.comE<gt>
60  
61 Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>
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 15 1;
« blib/lib/OAuth/Lite2/Server/Context.pm ↑ Summary blib/lib/OAuth/Lite2/Server/GrantHandlers.pm »