| 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 | 57 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 7 | 57 | my $class = shift; | |
| 8 | 57 | bless {}, $class; | |
| 9 | } | ||
| 10 | |||
| 11 | 52 | ▶ | sub is_required_client_authentication { |
|
Subroutine
is_required_client_authentication: called CC=1 SCAR=0.0
Pod
documented
| |||
| 12 | 52 | return 1; | |
| 13 | } | ||
| 14 | |||
| 15 | 1 | ▶ | sub handle_request { |
|
Subroutine
handle_request: called CC=1 SCAR=0.0
Pod
documented
| |||
| 16 | 1 | my ($self, $data_handler) = @_; | |
| 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; | |