| 1 | package OIDC::Client::TokenResponseParser; | ||
| 2 | 7 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 7 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 7 | extends 'OIDC::Client::ResponseParser'; | |
| 5 | 7 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 7 | ▶ | use OIDC::Client::TokenResponse; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | 4 | ▶ | around 'parse' => sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 30 | 4 | my $orig = shift; | |
| 31 | 4 | my $self = shift; | |
| 32 | |||
| 33 | 4 | my $result = $self->$orig(@_); | |
| 34 | |||
| 35 | 3 | return OIDC::Client::TokenResponse->new($result); | |
| 36 | 7 | }; | |
| 37 | |||
| 38 | 7 | __PACKAGE__->meta->make_immutable; | |
| 39 | |||
| 40 | 7 | 1; | |