'Intercept all requests and add the OAuth 2 token if present.'

def request(self, method, url, data=None, headers=None, withhold_token=False, **kwargs):

    if (not is_secure_transport(url)):
        raise InsecureTransportError()
    if (self.token and (not withhold_token)):
        log.debug(u'Invoking    %d    protected    resource    request    hooks.', len(self.compliance_hook[u'protected_request']))
        for hook in self.compliance_hook[u'protected_request']:
            log.debug(u'Invoking    hook    %s.', hook)
            (url, headers, data) = hook(url, headers, data)
        log.debug(u'Adding    token    %s    to    request.', self.token)
        try:
            (url, headers, data) = self._client.add_token(url, http_method=method, body=data, headers=headers)
        except TokenExpiredError:
            if self.auto_refresh_url:
                log.debug(u'Auto    refresh    is    set,    attempting    to    refresh    at    %s.', self.auto_refresh_url)
                token = self.refresh_token(self.auto_refresh_url, **kwargs)
                if self.token_updater:
                    log.debug(u'Updating    token    to    %s    using    %s.', token, self.token_updater)
                    self.token_updater(token)
                    (url, headers, data) = self._client.add_token(url, http_method=method, body=data, headers=headers)
                else:
                    raise TokenUpdated(token)
            else:
                raise
    log.debug(u'Requesting    url    %s    using    method    %s.', url, method)
    log.debug(u'Supplying    headers    %s    and    data    %s', headers, data)
    log.debug(u'Passing    through    key    word    arguments    %s.', kwargs)
    return super(OAuth2Session, self).request(method, url, headers=headers, data=data, **kwargs)
