You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thoughts for an implementation with the v2 version of croquemort (webhook).
Workflow
uData dispatches a signal when a resource URL is created or modified
udata-croquemort extension hooks to this signal
udata-croquemort sends a check request to croquemort (POST request) with a frequency (scheduled check) and a callback url (webhook)
The callback url is a udata-croquemort view that feeds the extra of the udata resource with the check results — the view will be called (and the extras refreshed) regularly since the check is scheduled
The frontend tests for the extras value of the resources and displays a status accordingly (not checked yet, OK at date XXX, KO at date XXX)
Challenges
Authentication : how do we ensure croquemort is the one calling the udata-croquemort callback url? We obviously do no want anyone to be able to set the check results on uData resources.
Match a check result and a resource: we probably need Webhook: add support for reference id etalab/croquemort#34 to be able to locate for which resource a check has been made when the webhook returns. Or use a join model url hash in croquemort <-> resource id in uData in udata-croquemort?
resource URL modification case: when a resource URL has been modified, we probably need to delete the scheduled check on croquemort of the old URL.
The text was updated successfully, but these errors were encountered:
Thoughts for an implementation with the
v2
version of croquemort (webhook).Workflow
uData
dispatches a signal when a resource URL is created or modifiedudata-croquemort
extension hooks to this signaludata-croquemort
sends a check request tocroquemort
(POST
request) with a frequency (scheduled check) and a callback url (webhook)udata-croquemort
view that feeds the extra of theudata
resource with the check results — the view will be called (and the extras refreshed) regularly since the check is scheduledChallenges
croquemort
is the one calling theudata-croquemort
callback url? We obviously do no want anyone to be able to set the check results onuData
resources.udata-croquemort
?croquemort
of the old URL.The text was updated successfully, but these errors were encountered: