Overtrue\Socialite\Providers\GoogleProvider::getAccessToken PHP Метод

getAccessToken() публичный Метод

Get the access token for the given code.
public getAccessToken ( string $code ) : string
$code string
Результат string
    public function getAccessToken($code)
    {
        $postKey = version_compare(ClientInterface::VERSION, '6') === 1 ? 'form_params' : 'body';
        $response = $this->getHttpClient()->post($this->getTokenUrl(), [$postKey => $this->getTokenFields($code)]);
        return $this->parseAccessToken($response->getBody());
    }