|
@ -1496,6 +1496,22 @@ class KeycloakAdmin: |
|
|
data=json.dumps(payload)) |
|
|
data=json.dumps(payload)) |
|
|
return raise_error_from_response(data_raw, KeycloakGetError, expected_codes=[201], skip_exists=skip_exists) |
|
|
return raise_error_from_response(data_raw, KeycloakGetError, expected_codes=[201], skip_exists=skip_exists) |
|
|
|
|
|
|
|
|
|
|
|
def update_client_scope(self, client_scope_id, payload): |
|
|
|
|
|
""" |
|
|
|
|
|
Update a client scope |
|
|
|
|
|
|
|
|
|
|
|
ClientScopeRepresentation: https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_client_scopes_resource |
|
|
|
|
|
|
|
|
|
|
|
:param client_scope_id: The id of the client scope |
|
|
|
|
|
:param payload: ClientScopeRepresentation |
|
|
|
|
|
:return: Keycloak server response (ClientScopeRepresentation) |
|
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
params_path = {"realm-name": self.realm_name, "scope-id": client_scope_id} |
|
|
|
|
|
data_raw = self.raw_put(URL_ADMIN_CLIENT_SCOPE.format(**params_path), |
|
|
|
|
|
data=json.dumps(payload)) |
|
|
|
|
|
return raise_error_from_response(data_raw, KeycloakGetError, expected_codes=[204]) |
|
|
|
|
|
|
|
|
def add_mapper_to_client_scope(self, client_scope_id, payload): |
|
|
def add_mapper_to_client_scope(self, client_scope_id, payload): |
|
|
""" |
|
|
""" |
|
|
Add a mapper to a client scope |
|
|
Add a mapper to a client scope |
|
|