您好我使用wso2is版本5.4.1作为身份服务器。
我想使用scim2 api创建用户。 创建用户后,会向用户发送一封电子邮件,他将能够点击收到的电子邮件链接,通过该链接,他将能够更改密码 - 这就是我在这里指定的askPassword用户的意思:{ {3}}
第一个选项(WORKS)如何使用WSO2管理控制台创建用户
https://docs.wso2.com/display/IS541/Creating+Users+Using+the+Ask+Password+Option
此方案有效并且已发送电子邮件。
第二个选项(不工作)如何使用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
Wso2是控制台输出:
答案 0 :(得分: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
请查看上述请求。
如果以上操作不起作用,请检查< Server_Home} /repository/conf/identity/identity.xml文件中是否有以下属性?事件侦听>标签
<Property name="Data.Store">org.wso2.carbon.identity.governance.store.JDBCIdentityDataStore</Property
答案 1 :(得分:0)
适用于版本5.6.0。有必要为电子邮件地址填写适当的属性... {“ value”:“ email@gmail.com”} 如果未设置,则会出现错误:发生错误在访问Java Security Manager特权块时
{"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"},
}