如何在 WSO2 IS 5.9.0 中更改用户密码?

How to change password of a user in WSO2 IS 5.9.0?

我正在将 WSO2 IS 与我们的节点 js 后端和反应 js 前端集成,并成功地执行了登录、注册和 api 调用的操作。

请帮助我如何使用任何 api 的 wso2 IS 更改现有用户的密码?

请帮忙

在 WSO2 身份服务器中有多种更改密码的方法。大家可以根据自己的需求选择。

选项 1:

管理员可以为用户帐户强制重置密码。 Please refer to this document 用于配置管理员强制密码重置。 UserProfileMgtService(一种肥皂服务)用于管理员强制密码重置。管理员调用 soap 服务后,将向用户的电子邮件地址发送一封电子邮件 link,用户可以通过单击验证 email/OTP 来更改密码。

选项2:

您也可以通过scim 补丁操作强制重置密码。 Refer to this document for further details about scim patch operation.

curl -v -k --user admin:admin --header
"Content-Type:application/json"
'https://localhost:9443/scim2/Users/[scim_user_id]' -X PATCH -d
'{"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp","urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"],"Operations": [{"op": "add","value":
{"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User":
{"forcePasswordReset": true} }}]}

选项 3:

您可以使用UserAdmin soap 服务更新用户密码。 Please refer to the soap service here. In WSO2 dashboard also, this admin service is used. You can use this soap services as rest call also。这将直接更改用户的密码,而无需发送任何电子邮件通知或验证。

选项 4 :

如果您需要找回密码,万一用户忘记了密码,用户可以通过邮件通知或者使用提问的方式找回密码。 Please refer to this document to configure the password recovery feature