Commit 0b3f9a78 authored by Clément OUDOT's avatar Clément OUDOT

Parse UserInfo response as JWT (#183)

parent 1c0df342
......@@ -625,7 +625,16 @@ sub getUserInfo {
return 0;
}
return $response->decoded_content;
my $content_type = $response->header('Content-Type');
if ( $content_type =~ /json/ ) {
return $response->decoded_content;
}
elsif ( $content_type =~ /jwt/ ) {
my $jwt = $response->decoded_content;
return unless $self->verifyJWTSignature( $op, $jwt );
my $jwt_parts = $self->extractJWT($jwt);
return $jwt_parts->[1];
}
}
## @method HashRef decodeJSON(String json)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment