public static function getUserinfo($params, $apiContext = null)
{
static $allowedParams = array('schema' => 1);
if (is_null($apiContext)) {
$apiContext = new PPApiContext();
}
if (!array_key_exists('schema', $params)) {
$params['schema'] = 'openid';
}
$requestUrl = "/v1/identity/openidconnect/userinfo?" . http_build_query(array_intersect_key($params, $allowedParams));
$call = new PPRestCall($apiContext);
$ret = new PPOpenIdUserinfo();
$ret->fromJson($call->execute(array(new PPOpenIdHandler($apiContext)), $requestUrl, "GET", "", array('Authorization' => "Bearer " . $params['access_token'], 'Content-Type' => 'x-www-form-urlencoded')));
return $ret;
}