

def modify_request(self, http_request):
    "Sets the Authorization header in the HTTP request using the token.\n\n    Calculates an RSA signature using the information in the token to\n    indicate that the request came from this application and that this\n    application has permission to access a particular user's data.\n\n    Returns:\n      The same HTTP request object which was passed in.\n    "
    timestamp = str(int(time.time()))
    nonce = ''.join([str(random.randint(0, 9)) for i in xrange(15)])
    signature = generate_rsa_signature(http_request, self.consumer_key, self.rsa_private_key, timestamp, nonce, version='1.0', next=self.next, token=self.token, token_secret=self.token_secret, verifier=self.verifier)
    http_request.headers['Authorization'] = generate_auth_header(self.consumer_key, timestamp, nonce, RSA_SHA1, signature, version='1.0', next=self.next, token=self.token, verifier=self.verifier)
    return http_request

dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/gauth.py OAuthRsaToken.modify_request/original