python-keycloak icon indicating copy to clipboard operation
python-keycloak copied to clipboard

Using dicts for request payloads is too restrictive

Open corvust opened this issue 4 years ago • 2 comments
trafficstars

Some API routes (for example, users/<id>/execute-actions-email) expect the request body to be a JSON array, not an object. Since raw_put expects payload to be a dict, the send_update_account method does not work.

I think a good solution would be to set the playload in the request using json instead of data to be more flexible.

corvust avatar Jan 15 '21 14:01 corvust

Either that or adopt as described in the API to be able to use the array of actions, i.e. data={'requiredActions':payload}

double-a avatar Apr 06 '21 19:04 double-a