我想更新predix uaa中的用户密码,但显示错误?

时间:2016-07-31 01:53:08

标签: rest cloudfoundry-uaa predix

https://77b186f0-b9a1-4956-b72a-630108a331b7.predix-uaa.run.aws-usw02-pr.ice.predix.io/Users/daa7daaa-23b3-409d-b6ce-0857b76a62de/s102

接受:应用/ JSON 范围:password.write AUD:密码

curl命令 卷曲 - 请求POST \   --ur https://77b186f0-b9a1-4956-b72a-630108a331b7.predix-uaa.run.aws-usw02-pr.ice.predix.io/Users/daa7daaa-23b3-409d-b6ce-0857b76a62de/dff \   --header'接受:application / json' \   --header' aud:密码' \    - 标题授权:bearer {token}' \   --header' cache-control:no-cache' \   --header' content-type:application / x-www-form-urlencoded' \   --header' pragma:no-cache' \   --header'范围:password.write'

UserId,密码为

供参考 https://github.com/GESoftware-CF/uaa/blob/master/docs/UAA-APIs.rst

1 个答案:

答案 0 :(得分:0)

网址似乎对我不正确。它应以... /密码结尾。你引用的文档有一个卷曲的例子......

$ curl 'http://localhost:8080/Users/a9717027-b838-40bd-baca-b9f9d38a440d/password' -i -X PUT -H 'Authorization: Bearer tURh3jpUFIvZ96G9o' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"oldPassword":"secr3T","password":"n3wAw3som3Passwd"}'

请参阅https://github.com/GESoftware-CF/uaa/blob/master/docs/UAA-APIs.rst#change-password-put-users-id-password