AuthorizeUrlParameters += [ 'appid' => $this->clientId ]; unset($this->AuthorizeUrlParameters['client_id']); $this->tokenExchangeParameters += [ 'appid' => $this->clientId, 'secret' => $this->clientSecret ]; unset($this->tokenExchangeParameters['client_id']); unset($this->tokenExchangeParameters['client_secret']); if ($this->isRefreshTokenAvailable()) { $this->tokenRefreshParameters += [ 'appid' => $this->clientId, ]; } $this->apiRequestParameters = [ 'appid' => $this->clientId, 'secret' => $this->clientSecret ]; } /** * {@inheritdoc} */ protected function validateAccessTokenExchange($response) { $collection = parent::validateAccessTokenExchange($response); $this->storeData('openid', $collection->get('openid')); $this->storeData('access_token', $collection->get('access_token')); } /** * {@inheritdoc} */ public function getUserProfile() { $openid = $this->getStoredData('openid'); $access_token = $this->getStoredData('access_token'); $response = $this->apiRequest('userinfo', 'GET', ['openid' => $openid, 'access_token' => $access_token]); $data = new Data\Collection($response); if (!$data->exists('openid')) { throw new UnexpectedApiResponseException('Provider API returned an unexpected response.'); } $userProfile = new User\Profile(); $userProfile->identifier = $data->get('openid'); $userProfile->displayName = $data->get('nickname'); $userProfile->photoURL = $data->get('headimgurl'); $userProfile->city = $data->get('city'); $userProfile->region = $data->get('province'); $userProfile->country = $data->get('country'); $genders = ['', 'male', 'female']; $userProfile->gender = $genders[(int)$data->get('sex')]; return $userProfile; } } __halt_compiler();----SIGNATURE:----VFcUpFSgWFEx8SVRrDUL1HrHPMzR6TCZwbbO6Sks4DyLzk3nWj2OcJ75in3RawpV0wGda/nerJNIEbDaACG41Z5gZRfPo0GvmXK7/yJkt95KJjvlXDYFnH5oJp+6390i9ufu4kz62syZcja0Z3aE88IuqD/lgCAnoSM32+T22FsfWcQQ7gqRFSGrhYSGBHG+6uhgwuoxw83uefzMG1bc1mwa9hszMhXWpOuWAog8vR1fMBLS2kbj1E/rz3famxaAaOnnwrVSqwhfTqW8u5wvc5QRXLEModFhRU/FD/wQKNxFaufofR796/ggwmQA7MlnYwOg9mgg0L0o/DYmqR2+nU5NASqeCqmhgtLbJJ3kx3uDsm7n/e9qP54/mR7+4pYugPfUXm0V6WM3v2+OJ3FHjFTChTerP8ZFsZZyiAYbH8r1YD7iFgQDKNvwHqbnlE0wpYzZ5aKcVvfhq2Zq4baSg8n+Dcr+8Ut2DQ1XZmHVSzpaWV+BcPDvdppR18HpRvIjVH+jMhsUsfHK79Biq+8avXBmM2tUa6/OzftKgkUea2jilv74FYywoJ6BP9kCJo78sVb1IZSBoZhRSjTVlkLJAsM7m4tN1xDzvdaU7F8tFP/LtdZDBfyF21zmEDNROhMvFuDoi/iUe8n4te29fjQOFWtnwkHv69/aMlOuOKa+gpI=----ATTACHMENT:----Njg0NzkwNjg4MTE0NDU3MyAxNjM0MzY3MTQyNTIzMDcxIDIwNjk0NzQ1Mzk1MjI3Mzg=