From ae700b5eef10c62d1b9634a2a048f49637eb423b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 20 Dec 2017 11:19:15 +0100 Subject: [PATCH] Added payload description of Blender ID webhook --- cloud/webhooks.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cloud/webhooks.py b/cloud/webhooks.py index 0089e22..f3e6069 100644 --- a/cloud/webhooks.py +++ b/cloud/webhooks.py @@ -55,7 +55,15 @@ def webhook_payload(hmac_secret: str) -> dict: @blueprint.route('/user-modified', methods=['POST']) def user_modified(): - """Updates the local user based on the info from Blender ID.""" + """Updates the local user based on the info from Blender ID. + + The payload we expect is a dictionary like: + {'id': 12345, # the user's ID in Blender ID + 'old_email': 'old@example.com', + 'full_name': 'Harry', + 'email': 'new@example'com, + 'roles': ['role1', 'role2', …]} + """ my_log = log.getChild('user_modified') my_log.debug('Received request from %s', request.remote_addr)