Associate a request_name with each verify request, for logging

Also:
* rename VerifyKeyRequest->VerifyJsonRequest
* calculate key_ids on VerifyJsonRequest construction
* refactor things to pass around VerifyJsonRequests instead of 4-tuples
This commit is contained in:
Richard van der Hoff 2019-06-04 16:12:57 +01:00
parent 14f13babb0
commit cea9750d11
6 changed files with 86 additions and 56 deletions

View file

@ -101,7 +101,9 @@ class GroupAttestationSigning(object):
if valid_until_ms < now:
raise SynapseError(400, "Attestation expired")
yield self.keyring.verify_json_for_server(server_name, attestation, now)
yield self.keyring.verify_json_for_server(
server_name, attestation, now, "Group attestation"
)
def create_attestation(self, group_id, user_id):
"""Create an attestation for the group_id and user_id with default