fn check_device_key(
expected_user_id: &UserId,
expected_device_id: &DeviceId,
keys: &DeviceKeys,
) -> Result<(), InputJsonError>Expand description
Given the user and device IDs of the authenticated request made, performs
various checks on a [DeviceKeys].
ยงErrors
This function returns a BadJson error for any of the following cases:
- The device key is missing or has a wrongly formatted field.
- The user ID or device ID does not match that of the authenticated user/device making the request.