Browse Source

Merge pull request #85 from ShadyNawara/master

Modified update_client & create_realm_role to use keycloak_admin raw_put/post
master
Marcos Pereira 5 years ago
committed by GitHub
parent
commit
ab1fe9edc0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      keycloak/keycloak_admin.py

4
keycloak/keycloak_admin.py

@ -805,7 +805,7 @@ class KeycloakAdmin:
:return: Http response
"""
params_path = {"realm-name": self.realm_name, "id": client_id}
data_raw = self.connection.raw_put(URL_ADMIN_CLIENT.format(**params_path),
data_raw = self.raw_put(URL_ADMIN_CLIENT.format(**params_path),
data=json.dumps(payload))
return raise_error_from_response(data_raw, KeycloakGetError, expected_code=204)
@ -947,7 +947,7 @@ class KeycloakAdmin:
"""
params_path = {"realm-name": self.realm_name}
data_raw = self.connection.raw_post(URL_ADMIN_REALM_ROLES.format(**params_path),
data_raw = self.raw_post(URL_ADMIN_REALM_ROLES.format(**params_path),
data=json.dumps(payload))
return raise_error_from_response(data_raw, KeycloakGetError, expected_code=201, skip_exists=skip_exists)

Loading…
Cancel
Save