WSO2 Identity Server 6.1.0 中的强制密码更新

问题描述 投票:0回答:1

我正在尝试在没有恢复方法的情况下更新用户的密码(以管理员身份强制更新密码)。但我找不到没有恢复方法的密码更新 API。

我在https://is.docs.wso2.com/en/6.1.0/apis/use-the-account-recovery-rest-apis/#/Password%20Recovery/post_set_password中找到了一个API。但它需要恢复密钥。我可以在没有恢复密钥的情况下更新密码吗?这个 API 有其他替代方案吗?

rest wso2-identity-server change-password
1个回答
0
投票

您可以使用 scim2 REST API 用户端点 [1] 和 PUT 请求 [2] 或 PATCH 请求 [3] 通过管理员更新用户密码。

以下是使用补丁请求更新用户密码的示例curl命令。

curl -k -X PATCH 'https://localhost:9443/scim2/Users/c3715781-a217-4b4c-b949-d433fee2bf32' \
  -H 'Authorization: Basic YWRtaW46YWRtaW4K' \
  -H 'Content-Type: application/json' \
  --data-raw '{"Operations":[{"op":"replace","value":{"password":"test123"}}],"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"]}'

[1]https://is.docs.wso2.com/en/latest/apis/scim2-rest-apis/#/Users%20Endpoint [2]https://is.docs.wso2.com/en/latest/apis/scim2-rest-apis/#/Users%20Endpoint/updateUser [3]https://is.docs.wso2.com/en/latest/apis/scim2-rest-apis/#/Users%20Endpoint/patchUser

© www.soinside.com 2019 - 2024. All rights reserved.