is well, returns the Perl structure corresponding to the JSON response.
On the other hand, if the response is not correctly parsed into JSON format,
an L<OIDC::Client::Error::InvalidResponse> error
cut
sub parse {
my ($self, $res) = @_;
if ($res->is_success) {
return try {
$res->json;
}
catch {
OIDC::Client::Error::InvalidResponse->throw(
sprintf(q{Invalid r
}
else {
OIDC::Client::Error::Provider->throw({
response_parameters => try { $res->json } || {},
alternative_error => $res->is_error ? $res->message || $res->code
::signatures';
use Readonly;
use Carp qw(croak);
use Data::UUID;
use Mojo::File;
use Mojo::JSON qw(decode_json);
use Mojo::UserAgent;
use OIDC::Client::ResponseParser;
use OIDC::Client::TokenResponseP
ey ($self) {
if (my $private_jwk_file = $self->private_jwk_file) {
my $private_jwk = decode_json(Mojo::File->new($private_jwk_file)->slurp);
return $private_jwk;
}
elsif (my $private_jwk
}
$ua->on(start => sub {
my ($ua, $tx) = @_;
$tx->req->headers->accept('application/json');
});
return $ua;
}
sub _build_claim_mapping ($self) {
return $self->config->{claim_mapp