protected function getUserByToken(AccessTokenInterface $token)
{
$url = $this->baseUrl . '/oauth2.0/me?access_token=' . $token->getToken();
$this->withUnionId && ($url .= '&unionid=1');
$response = $this->getHttpClient()->get($url);
$me = json_decode($this->removeCallback($response->getBody()->getContents()), true);
$this->openId = $me['openid'];
$this->unionId = isset($me['unionid']) ? $me['unionid'] : '';
$queries = ['access_token' => $token->getToken(), 'openid' => $this->openId, 'oauth_consumer_key' => $this->clientId];
$response = $this->getHttpClient()->get($this->baseUrl . '/user/get_user_info?' . http_build_query($queries));
return json_decode($this->removeCallback($response->getBody()->getContents()), true);
}