private function isOAuth2(RequestInterface $request, array $options)
    {
        // The 'auth' option must be set to 'oauth2'.
        if (!isset($options['auth']) || $options['auth'] !== 'oauth2') {
            return false;
        }

        // The request must be not for an access token endpoint.
        if ($this->provider->getBaseAccessTokenUrl([]) === $request->getUri()) {
            return false;
        }

        return true;
    }