Apache Syncope REST API:在用户创建时设置密码

时间:2016-06-29 17:39:30

标签: rest apache-syncope

Apache Syncope 2.0.0-M2

我使用Syncope REST API创建用户。它已成功创建,密码除外,密码仍为null

有谁知道如何定义密码?

这是命令:

$ curl -X POST -u admin:password -H "Accept: application/json" -H "Content-Type: application/json" --data @/tmp/newuser.json http://192.168.99.100:8080/syncope/rest/users

请求正文(/tmp/newuser.json):

{"password":"1qaz2wsx","@class":"org.apache.syncope.common.lib.to.UserTO","realm":"/","type":"USER","username":"test1467220729151"}

成功的用户创建响应(使用"password":null):

{"any":{"@class":"org.apache.syncope.common.lib.to.UserTO","creator":"admin","creationDate":"2016-06-29T17:26:38.115+0000","lastModifier":"admin","lastChangeDate":"2016-06-29T17:26:38.115+0000","key":125,"type":"USER","realm":"/","status":"active","password":null,"token":null,"tokenExpireTime":null,"username":"test1467220729151",...}

我尝试了?storePassword=true URI参数,但结果相同。

提前致谢!

1 个答案:

答案 0 :(得分:0)

我似乎使用自定义Apache Syncope,它改变了null字段password的响应。
密码本身设置正确,可用于身份验证。