Added payload description of Blender ID webhook
This commit is contained in:
@@ -55,7 +55,15 @@ def webhook_payload(hmac_secret: str) -> dict:
|
|||||||
|
|
||||||
@blueprint.route('/user-modified', methods=['POST'])
|
@blueprint.route('/user-modified', methods=['POST'])
|
||||||
def user_modified():
|
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 = log.getChild('user_modified')
|
||||||
my_log.debug('Received request from %s', request.remote_addr)
|
my_log.debug('Received request from %s', request.remote_addr)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user