1

嗨,我使用 wso2is 5.4.1 版作为身份服务器。

我想使用 scim2 api 创建用户。创建用户后,会向用户发送一封电子邮件,他将能够单击电子邮件中收到的链接,并通过该链接更改密码 - 这就是我在此处指定的 askPassword 用户的意思:https ://docs.wso2.com/display/IS541/Creating+Users+Using+the+Ask+Password+Option

第一个选项(WORKS)如何使用 WSO2 管理控制台创建用户

在此处输入图像描述

此方案有效并已发送电子邮件。

第二个选项(不工作)如何使用 SCIM2 创建用户

curl -v -k --user admin:admin --data {"schemas":[],"name":{"familyName":"Smith","givenName":"Paul"},"userName":"Test","password":"password","emails":[{"primary":true,"value":"Test@abc.com","type":"home"},{"value":"paulSmith@abc.com","type":"work"}],"EnterpriseUser":{askPassword:"true"}} --header "Content-Type:application/json" https://mylink:port/scim2/Users

Wso2is 控制台输出:

在此处输入图像描述

4

2 回答 2

0

您需要在双引号内发送 askPassword 属性。

例如

curl -v -k --user admin:admin --data {"schemas":[],"name":{"familyName":"Smith","givenName":"Paul"},"userName":"Test","password":"password","emails":[{"primary":true,"value":"Test@abc.com","type":"home"},{"value":"paulSmith@abc.com","type":"work"}],"EnterpriseUser":{"askPassword":"true"}} --header "Content-Type:application/json" https://mylink:port/scim2/Users

请检查上述请求。

如果上述方法不起作用,请检查 <EventListeners> 标记下 {Server_Home}/repository/conf/identity/identity.xml 文件中的以下属性是否可用

<Property name="Data.Store">org.wso2.carbon.identity.governance.store.JDBCIdentityDataStore</Property
于 2018-05-02T11:49:59.940 回答
0

适用于 5.6.0 版。必须为电子邮件地址填写正确的属性... {"value":"email@gmail.com"}如果未设置,则会收到错误消息: 访问 Java 安全管理器特权块时出错

{"schemas":[],
 "name":{"familyName":"Smith","givenName":"Paul"},
 "userName":"test110",
 "password":"password",
 "emails":[{"primary":true,"value":"email@gmail.com","type":"home"}, 
           {"value":"email@gmail.com","type":"work"},
           {"value":"email@gmail.com"}],
 "EnterpriseUser":{"askPassword":"true"},
}
于 2018-08-14T08:20:29.677 回答