

def modify_request(self, http_request):
    'Sets the Authorization header and includes a digital signature.\n\n    Calculates a digital signature using the private RSA key, a timestamp\n    (uses now at the time this method is called) and a random nonce.\n\n    Args:\n      http_request: The atom.http_core.HttpRequest which contains all of the\n          information needed to send a request to the remote server. The\n          URL and the method of the request must be already set and cannot be\n          changed after this token signs the request, or the signature will\n          not be valid.\n    '
    timestamp = str(int(time.time()))
    nonce = ''.join([str(random.randint(0, 9)) for i in xrange(15)])
    data = build_auth_sub_data(timestamp, timestamp, nonce)
    signature = generate_signature(data, self.rsa_private_key)
    http_request.headers['Authorization'] = ('%s%s sigalg="rsa-sha1" data="%s" sig="%s"' % (AUTHSUB_AUTH_LABEL, self.token_string, data, signature))

dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/gauth.py SecureAuthSubToken.modify_request/VarMisuse@60/268 `http_request`->`timestamp`