Skip to content

Commit

Permalink
Add docs for /me/changePassword
Browse files Browse the repository at this point in the history
  • Loading branch information
rhafer committed May 12, 2022
1 parent d2c5e42 commit dd5ac55
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
7 changes: 7 additions & 0 deletions changelog/unreleased/graph-me-changepw.md
Original file line number Diff line number Diff line change
@@ -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 changes: 24 additions & 0 deletions docs/extensions/graph/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit dd5ac55

Please sign in to comment.