fix: use correct Logto endpoint for password updates
All checks were successful
CI / build (push) Successful in 1m12s
CI / docker (push) Successful in 43s

PATCH /api/users/{id}/password, not /api/users/{id}. The general user
update endpoint rejected the password field with 422.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-11 10:57:28 +02:00
parent e2e5c794a2
commit e5523c969e

View File

@@ -402,7 +402,7 @@ public class LogtoManagementClient {
public void updateUserPassword(String userId, String newPassword) { public void updateUserPassword(String userId, String newPassword) {
if (!isAvailable()) throw new IllegalStateException("Logto not configured"); if (!isAvailable()) throw new IllegalStateException("Logto not configured");
restClient.patch() restClient.patch()
.uri(config.getLogtoEndpoint() + "/api/users/" + userId) .uri(config.getLogtoEndpoint() + "/api/users/" + userId + "/password")
.header("Authorization", "Bearer " + getAccessToken()) .header("Authorization", "Bearer " + getAccessToken())
.contentType(MediaType.APPLICATION_JSON) .contentType(MediaType.APPLICATION_JSON)
.body(Map.of("password", newPassword)) .body(Map.of("password", newPassword))