protected function parseAccessToken($body)
    {
        if (!is_array($body)) {
            $body = json_decode($body, true);
        }

        if (empty($body['access_token'])) {
            throw new AuthorizeFailedException('Authorize Failed: '.json_encode($body, JSON_UNESCAPED_UNICODE), $body);
        }

        return new AccessToken($body);
    }
protected function parseAccessToken($body)
    {
        if (!is_array($body)) {
            $body = json_decode($body, true);
        }

        if (empty($body['access_token'])) {
            throw new AuthorizeFailedException('Authorize Failed: '.json_encode($body, JSON_UNESCAPED_UNICODE), $body);
        }

        return new AccessToken($body);
    }
protected function parseAccessToken ( $ body ) { if ( ! is_array ( $ body ) ) { $ body = json_decode ( $ body , true ) ; } if ( empty ( $ body [ 'access_token' ] ) ) { throw new AuthorizeFailedException ( 'Authorize Failed: ' . json_encode ( $ body , JSON_UNESCAPED_UNICODE ) , $ body ) ; } return new AccessToken ( $ body ) ; }
Get the access token from the token response body.

@param \Psr\Http\Message\StreamInterface|array $body

@return \Overtrue\Socialite\AccessTokenInterface
Get the access token from the token response body .