[midPoint] REST Request Change User Password

Robert Bradley robert.bradley at it.ox.ac.uk
Mon Mar 9 18:26:00 CET 2020


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 09/03/2020 11:49, Gómez Martínez, Elsa wrote:
> Hi!
>
> Is there any news with this issue?
>
> Thanks. Elsa

I don't think it's documented, but there are examples within the
midPoint source repository under the
testing/rest/src/test/resources/repo/json/ directory.  My own previous
experiments with JSON worked fine:

{
    "@ns": "http://prism.evolveum.com/xml/ns/public/query-3",
    "query": {
        "filter": {
            "equal": {
                "path": "name",
                "value": "TestUser"
            }
        }
    }
}

$ curl --user username:password -H "Content-Type: application/json" -X
POST https://midpoint-server/midpoint/ws/rest/users/search

So, based on that, I'd expect the following to work for you:

change_pass.json:

{
"@ns": "http://midpoint.evolveum.com/xml/ns/public/common/api-types-3",
"objectModification": {
  @ns: "http://prism.evolveum.com/xml/ns/public/types-3",
  "itemDelta": {
    "modificationType": "replace",
    "path": "credentials/password/value",
    "value": "BrandN3wP at ssw0rd",
  }
}

$ curl --user username:OldPassword -H "Content-Type: application/json"
- -X PATCH
https://YOUR.midpoint.server/midpoint/ws/rest/users/00000000-0000-0000-0
000-000000000000
- -d @change_pass.json

- -- 
Dr Robert Bradley
Identity and Access Management Team, IT Services, University of Oxford
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEgF3NFfO9FqlA+ME+lGGnynav474FAl5mfCgACgkQlGGnynav
4745Yg//ZgLxaPIpEiTruz7bYoUugSdJFMmULRk3kPtYhctJnmdXE76rCvMxVIhC
fRr52ZnymJAefo5AAwRH+yeXBoLI3+OD+gHlbiy4iQO6ZZqBKlifEWR6IZ14rTkE
SpU8tiPAS59nfobumMqDXFRcMwzy9WCzkNsK8JKxIVhGnSRIpZhyPVkODqDmeonS
sbkPeriMBeAymOkoYpxllUutBRC4z589eqsBLDUogUNXie2dic0yhBYmCy4kJ43R
BxgqCmLCl+XAYrcow6rk4gGieXfmX/Duf4no2OGeT+zvDOXXSxDFZYmbDMx01Lo6
V3LTguOR0zLm6mallyfEr5dXHllVd/PmiD9LeN7Xj6aAKxLjrnohEmCSC92ikbX8
S5dEZguXSitDyLiQd5DP2ua5OYnNxsMuf5rrA9gi9DLRNmwMwsoyj6O5UzfVYrXZ
dDVkhMKsICEz20mM+Wo9AUU4sgmU1ZwEK6mNHg08UC9Qg8yw+kKvonrXLtDoc35a
CJjX07yjp1uPH8GNNwonIK51588cIXXfL2YPggadYPn5Hvu9z1tKtt0usyIwCgDD
UgpSiTqGw47jOJIzFetX25fIKCvD8kNeiUlTyTgBgPYa9ZdKDcWBrDBSKtKyMhmU
i/KBx1XTEUZIpqRchnoJyYxFowYZV73cn80/guUqUagTnSkOV2c=
=iixG
-----END PGP SIGNATURE-----



More information about the midPoint mailing list