[midPoint] Sample REST POST request to change User Password

Katarina Valalikova k.valalikova at evolveum.com
Tue Nov 11 17:34:18 CET 2014


Hi Jason,

it is possible to change user's password using following command:

curl.exe --useradministrator:5ecr3t <http://administrator:5ecr3t/>-H 
"Content-Type: application/xml" -X 
PATCHhttp://localhost:8080/midpoint/model/rest/users/00000000-0000-0000-0000-000000000002-d 
@passwordChange.xml

where:

    http://localhost:8080/midpoint/model/rest/users/00000000-0000-0000-0000-000000000002

specifies, that the change will be applied on the user with the oid 
00000000-0000-0000-0000-000000000002 and the passwordChange.xml may look 
like the following example

    <objectModification
    xmlns='http://midpoint.evolveum.com/xml/ns/public/common/api-types-3'
    xmlns:c='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
    xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3">
         <itemDelta>
    <t:modificationType>replace</t:modificationType>
    <t:path>c:credentials/c:password/c:value</t:path>
             <t:value>
    <c:clearValue>newPasswordValue</c:clearValue>
             </t:value>
         </itemDelta>
    </objectModification>

More examples how to use midPoint's REST API can be found on the wiki 
page: https://wiki.evolveum.com/display/midPoint/REST+API

Hope this helps,
regards,
Katarina Valalikova

Dňa 10. 11. 2014 17:13 Jason Everling wrote / napísal(a):
> Would you be able to give an example for a change password request for 
> a user,
>
> I have looked in the REST API and I have no idea where I would start,
>
> We have a current password management system with questions/answers 
> for password change and we would have to keep using this until 
> midpoint supports the function, I see it is on the roadmap for 3.1 but 
> since it is not there at this moment I would like to check this function.
>
> Our current system supports sending a POST request using the REST API 
> during a user password change,
>
> "URLs to call after a successful password change. These classes may 
> take such actions as updating passwords in other systems. The URL will 
> be invoked with the HTTP GET action. Macros can be used to add user 
> data. %PASSWORD% and %OLD_PASSWORD% replacement strings are available. 
> The HTTP request will be issued by the servlet, not by the browser. "
>
> Thanks!
>
> JASON
>
>
>
> CONFIDENTIALITY NOTICE:
> This e-mail together with any attachments is proprietary and 
> confidential; intended for only the recipient(s) named above and may 
> contain information that is privileged. You should not retain, copy or 
> use this e-mail or any attachments for any purpose, or disclose all or 
> any part of the contents to any person. Any views or opinions 
> expressed in this e-mail are those of the author and do not represent 
> those of the Baptist School of Health Professions. If you have 
> received this e-mail in error, or are not the named recipient(s), you 
> are hereby notified that any review, dissemination, distribution or 
> copying of this communication is prohibited by the sender and to do so 
> might constitute a violation of the Electronic Communications Privacy 
> Act, 18 U.S.C. section 2510-2521. Please immediately notify the sender 
> and delete this e-mail and any attachments from your computer.
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20141111/2c5ce951/attachment.htm>


More information about the midPoint mailing list