Browse Source

return user id on user creation

pull/63/head
Guillaume Troupel 6 years ago
committed by Paolo Romolini
parent
commit
3a8a7316d3
  1. 8
      keycloak/keycloak_admin.py

8
keycloak/keycloak_admin.py

@ -306,9 +306,11 @@ class KeycloakAdmin:
if exists is not None:
return str(exists)
data_raw = self.raw_post(URL_ADMIN_USERS.format(**params_path),
data=json.dumps(payload))
return raise_error_from_response(data_raw, KeycloakGetError, expected_code=201)
data_raw = self.connection.raw_post(URL_ADMIN_USERS.format(**params_path),
data=json.dumps(payload))
raise_error_from_response(data_raw, KeycloakGetError, expected_code=201)
_last_slash_idx = data_raw.headers['Location'].rindex('/')
return data_raw.headers['Location'][_last_slash_idx + 1:]
def users_count(self):
"""

Loading…
Cancel
Save