def update(self, msg, state, key_size=0):
    "\n        Use to 'update' the AccessToken Request.\n\n        :param msg:\n        :param state: Used to map access token response to this request\n        :param key_size:\n        :return:\n        "
    if (not key_size):
        key_size = self.key_size
    key = RSAKey(key=RSA.generate(key_size))
    self.state2key[state] = key
    msg['key'] = json.dumps(key.serialize())
    return msg
Use to 'update' the AccessToken Request.

:param msg:
:param state: Used to map access token response to this request
:param key_size:
:return:
def update(self, msg, state, key_size=0):
    "\n        Use to 'update' the AccessToken Request.\n\n        :param msg:\n        :param state: Used to map access token response to this request\n        :param key_size:\n        :return:\n        "
    if (not key_size):
        key_size = self.key_size
    key = RSAKey(key=RSA.generate(key_size))
    self.state2key[state] = key
    msg['key'] = json.dumps(key.serialize())
    return msg