<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Jason,<br>
<br>
it is possible to change user's password using following command:<br>
<br>
<span style="color: rgb(51, 51, 51); font-family: Arial,
sans-serif; font-size: 14px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: 20px; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
display: inline !important; float: none; background-color:
rgb(255, 255, 255);">curl.exe --user<span
class="Apple-converted-space"> </span></span><a
href="http://administrator:5ecr3t/" class="external-link"
rel="nofollow" style="color: rgb(50, 108, 166); text-decoration:
none; font-family: Arial, sans-serif; font-size: 14px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 20px; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255);">administrator:5ecr3t</a><span style="color: rgb(51, 51,
51); font-family: Arial, sans-serif; font-size: 14px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: 20px; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline !important;
float: none; background-color: rgb(255, 255, 255);"><span
class="Apple-converted-space"> </span>-H "Content-Type:
application/xml" -X PATCH<span class="Apple-converted-space"> </span></span><a
href="http://localhost:8080/midpoint/model/rest/users/00000000-0000-0000-0000-000000000002"
class="external-link" rel="nofollow" style="color: rgb(50, 108,
166); text-decoration: none; font-family: Arial, sans-serif;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: 20px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">http://localhost:8080/midpoint/model/rest/users/00000000-0000-0000-0000-000000000002</a><span
style="color: rgb(51, 51, 51); font-family: Arial, sans-serif;
font-size: 14px; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: 20px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display:
inline !important; float: none; background-color: rgb(255, 255,
255);"><span class="Apple-converted-space"> </span>-d
@passwordChange.xml<br>
<br>
where:<br>
</span>
<blockquote><a
href="http://localhost:8080/midpoint/model/rest/users/00000000-0000-0000-0000-000000000002"
class="external-link" rel="nofollow" style="color: rgb(50,
108, 166); text-decoration: none; font-family: Arial,
sans-serif; font-size: 14px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: 20px; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width:
0px; background-color: rgb(255, 255, 255);">http://localhost:8080/midpoint/model/rest/users/00000000-0000-0000-0000-000000000002</a><br>
</blockquote>
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<br>
<br>
<blockquote><objectModification<br>
xmlns='<a class="moz-txt-link-freetext" href="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3">http://midpoint.evolveum.com/xml/ns/public/common/api-types-3</a>'<br>
xmlns:c='<a class="moz-txt-link-freetext" href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>'<br>
xmlns:t=<a class="moz-txt-link-rfc2396E" href="http://prism.evolveum.com/xml/ns/public/types-3">"http://prism.evolveum.com/xml/ns/public/types-3"</a>><br>
<itemDelta><br>
<t:modificationType>replace</t:modificationType><br>
<t:path>c:credentials/c:password/c:value</t:path><br>
<t:value><br>
<c:clearValue>newPasswordValue</c:clearValue><br>
</t:value><br>
</itemDelta><br>
</objectModification><br>
<br>
</blockquote>
More examples how to use midPoint's REST API can be found on the
wiki page: <a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/REST+API">https://wiki.evolveum.com/display/midPoint/REST+API</a><br>
<br>
Hope this helps,<br>
regards,<br>
Katarina Valalikova<br>
<br>
Dňa 10. 11. 2014 17:13 Jason Everling wrote / napísal(a):<br>
</div>
<blockquote
cite="mid:CAFkZXY7zG3T8xCsPuhNV6n+KBix1t+xZZh0R_S07WzSooMcJXg@mail.gmail.com"
type="cite">
<div dir="ltr">Would you be able to give an example for a change
password request for a user,
<div><br>
</div>
<div>I have looked in the REST API and I have no idea where I
would start,</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Our current system supports sending a POST request using
the REST API during a user password change,</div>
<div><br>
</div>
<div>"<span
style="color:rgb(51,51,51);font-family:Arial,Helvetica,sans-serif;font-size:12px">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.</span><span
style="color:rgb(51,51,51);font-family:Arial,Helvetica,sans-serif;font-size:12px"> "</span></div>
<div><span
style="color:rgb(51,51,51);font-family:Arial,Helvetica,sans-serif;font-size:12px"><br>
</span></div>
<div><span
style="color:rgb(51,51,51);font-family:Arial,Helvetica,sans-serif;font-size:12px">Thanks!</span></div>
<div><span
style="color:rgb(51,51,51);font-family:Arial,Helvetica,sans-serif;font-size:12px"><br>
</span></div>
<div><span
style="color:rgb(51,51,51);font-family:Arial,Helvetica,sans-serif;font-size:12px">JASON</span></div>
</div>
<br>
<font size="2"><br>
<br>
CONFIDENTIALITY NOTICE:<br>
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. </font><br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
</body>
</html>