0

我正在尝试发出 HTTP 请求以修改存储在 WSO2 中的用户的密码。我正在使用以下请求:

{
  method: 'PUT',
  url: domain + '/wso2/scim/Users/' + userId,
  rejectUnauthorized: false,
  headers: {
    Authorization: 'Bearer ' + scimToken,
    'Content-Type': 'application/json'
  },
  json: true,
  body: {
    userName : 'foo',
    password : 'newPassw0rd'
  }
}

但是response返回一个Java异常(这里就不附上了,因为太长了,我觉得没有意义。和Apache CXF有关)。

我对 SCIM 和 WSO2 很陌生,所以我认为我在请求中犯了一个错误。有谁知道出了什么问题?

谢谢!

4

1 回答 1

0

使用此请求创建用户: curl -v -k --user admin:admin --data '{"schemas":[],"name":{"familyName":"gunasinghe","givenName":"hasinitg"} ,"userName":"hasinitg","password":"hasinitg","emails":[{"primary":true,"value":"hasini_home.com","type":"home"},{" value":"hasini_work.com","type":"work"}]}' --header "Content-Type:application/json" https://localhost:9443/wso2/scim/Users

更新密码

curl -v -k --user admin:admin -X PUT -d '{"schemas":[],"name":{"familyName":"gunasinghe","givenName":"hasinitg"},"userName" :"hasinitg", "密码":"pwd123","emails":[{"value":"hasini@wso2.com","type":"work"},{"value":"hasi7786@gmail. com","type":"home"}]}' --header "Content-Type:application/json" https://localhost:9443/wso2/scim/Users/0032fd29-55a9-4fb9-be82-b1c97c073f02

于 2017-09-24T05:48:13.587 回答