'Get the basic OAuth parameters to be used in generating a signature.'

def get_oauth_params(self, request):

    nonce = (generate_nonce() if (self.nonce is None) else self.nonce)
    timestamp = (generate_timestamp() if (self.timestamp is None) else self.timestamp)
    params = [(u'oauth_nonce', nonce), (u'oauth_timestamp', timestamp), (u'oauth_version', u'1.0'), (u'oauth_signature_method', self.signature_method), (u'oauth_consumer_key', self.client_key)]
    if self.resource_owner_key:
        params.append((u'oauth_token', self.resource_owner_key))
    if self.callback_uri:
        params.append((u'oauth_callback', self.callback_uri))
    if self.verifier:
        params.append((u'oauth_verifier', self.verifier))
    content_type = request.headers.get(u'Content-Type', None)
    content_type_eligible = (content_type and (content_type.find(u'application/x-www-form-urlencoded') < 0))
    if ((request.body is not None) and content_type_eligible):
        params.append((u'oauth_body_hash', base64.b64encode(hashlib.sha1(request.body.encode(u'utf-8')).digest()).decode(u'utf-8')))
    return params
