File Coverage

blib/lib/Net/OAuth2Server/Request/Token/Password.pm
Criterion Covered Total %
statement 9 15 60.0
branch 0 2 0.0
condition n/a
subroutine 3 7 42.8
pod 0 4 0.0
total 12 28 42.8


line stmt bran cond sub pod time code
1 1     1   444 use strict; use warnings;
  1     1   3  
  1         27  
  1         5  
  1         2  
  1         2191  
2              
3             package Net::OAuth2Server::Request::Token::Password;
4 1     1   7 use parent 'Net::OAuth2Server::Request';
  1         2  
  1         4  
5              
6 0     0 0   sub grant_type { 'password' }
7 0     0 0   sub allowed_methods { 'POST' }
8 0     0 0   sub grant_parameters { qw( username password client_id client_secret ) }
9             *required_parameters = \&grant_parameters;
10              
11             sub get_grant {
12 0     0 0   my ( $self, $grant_maker ) = ( shift, shift );
13 0 0         return if $self->error;
14 0           $grant_maker->from_password( $self, $self->params( $self->grant_parameters ), @_ );
15             }
16              
17             our $VERSION = '0.005';