Add docs for /me/changePassword

This commit is contained in:
Ralf Haferkamp
2022-05-17 14:23:38 +02:00
committed by Ralf Haferkamp
parent 112488607e
commit 944aded9c7
2 changed files with 31 additions and 0 deletions
@@ -0,0 +1,7 @@
Enhancement: Add /me/changePassword endpoint to GraphAPI
When using the builtin user management, allow users to update their own password via
the graph/v1.0/me/changePassword endpoint.
https://github.com/owncloud/ocis/issues/3063
https://github.com/owncloud/ocis/pull/3705
+24
View File
@@ -163,3 +163,27 @@ to be updated. E.g. to update the `displayName` Attribute:
```
Similar to creating a user via `POST`, the `PATCH` request will return the user object containing the new attribute values.
### Change password
#### `POST /me/changePassword`
Users can change their own password by sending a POST request to `/me/changePassword`
##### Request Body
```
{
"currentPassword": "current",
"newPassword": "new"
}
```
When successful the API returns no response body and the HTTP status code 204 (No Content)
```
curl -i -k --header "Content-Type: application/json" \
--request POST --data '{"currentPassword": "current", "newPassword": "new" }' \
'https://localhost:9200/graph/v1.0/me/changePassword' -u user:current
```