diff --git a/src/Model/Behavior/AuthKeycloakBehavior.php b/src/Model/Behavior/AuthKeycloakBehavior.php index 7aeed31..4d5f509 100644 --- a/src/Model/Behavior/AuthKeycloakBehavior.php +++ b/src/Model/Behavior/AuthKeycloakBehavior.php @@ -472,6 +472,7 @@ class AuthKeycloakBehavior extends Behavior $toAdd[$k] = $userRoles[$name]; } if (!empty($toAdd)) { + $toAdd = array_values($toAdd); $response = $this->restApiRequest('%s/admin/realms/%s/users/' . $keycloakUser['id'] . '/role-mappings/clients/' . $clientId, $toAdd, 'post'); if (!$response->isOk()) { $this->_table->auditLogs()->insert([