File Coverage

blib/lib/OIDC/Client/TokenResponseParser.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             package OIDC::Client::TokenResponseParser;
2 5     5   579561 use utf8;
  5         380  
  5         57  
3 5     5   884 use Moose;
  5         605692  
  5         48  
4             extends 'OIDC::Client::ResponseParser';
5 5     5   46175 use namespace::autoclean;
  5         11140  
  5         54  
6              
7 5     5   5290 use OIDC::Client::TokenResponse;
  5         75  
  5         1006  
8              
9             =encoding utf8
10              
11             =head1 NAME
12              
13             OIDC::Client::TokenResponseParser - Token endpoint response parser
14              
15             =head1 DESCRIPTION
16              
17             Token endpoint response parser.
18              
19             L<OIDC::Client::ResponseParser> subclass.
20              
21             =head1 METHODS
22              
23             =head2 parse( $response )
24              
25             Overrides the parent method to return an L<OIDC::Client::TokenResponse> object.
26              
27             =cut
28              
29             around 'parse' => sub {
30             my $orig = shift;
31             my $self = shift;
32              
33             my $result = $self->$orig(@_);
34              
35             return OIDC::Client::TokenResponse->new($result);
36             };
37              
38             __PACKAGE__->meta->make_immutable;
39              
40             1;