when validating documents at the sync gateway using the sync function, is it possible to call an external service with some parameters, wait for the response and then act accordingly? The external service could be a network call (https, websocket etc.) or a call to a local file that runs the validations.
Background: we want to verify a digital signature contained in a document before accepting it. This requires fetching the certificate chain of trust and then calling some crypto implementation to verify the signature.
Any help is greatly appreciated.