<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Jan,</p>
<p>userPasswordNotifier deals with user modifications - so you
cannot refer to any shadows or resources there.</p>
<p>The event variable points to a <a moz-do-not-send="true"
href="https://github.com/Evolveum/midpoint/blob/master/model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/ModelEvent.java">ModelEvent</a>
object. So you can use methods of this class to retrieve data you
need.</p>
<p>Contrary to many regular methods, the password value should be
retrieved using <a moz-do-not-send="true"
href="https://github.com/Evolveum/midpoint/blob/master/model/model-api/src/main/java/com/evolveum/midpoint/model/api/expr/MidpointFunctions.java">midPoint
functions library</a>.</p>
<p>Looking at the source code I would recommend something like - but
have not tested that myself:<br>
</p>
<p><tt>midpoint.getPlaintextUserPasswordFromDeltas(event.focusExecutedDeltas)</tt><br>
</p>
<pre class="moz-signature" cols="72">Pavol Mederly
Software developer
evolveum.com
</pre>
<div class="moz-cite-prefix">On 04.12.2017 17:36, Jan Kaspar wrote:<br>
</div>
<blockquote type="cite"
cite="mid:mW.v9u.6d0z9Dmo0e9.1Q9Nc7@seznam.cz">Hi All,
<div><br>
</div>
<div>i have update it works for <span
style="background-color:transparent">accountPasswordNotifier
but not for </span><span style="background-color:transparent">userPasswordNotifier</span></div>
<div><br>
</div>
<div>I tried to use this: </div>
<div><br>
</div>
<div>
<div><span style="background-color:transparent">
<handler></span><br>
</div>
<div> <userPasswordNotifier></div>
<div> <bodyExpression></div>
<div> <script></div>
<div> <language><a
href="http://midpoint.evolveum.com/xml/ns/public/expression/language#velocity"
rel="noopener" moz-do-not-send="true">http://midpoint.evolveum.com/xml/ns/public/expression/language#velocity</a></language></div>
<div> <code>Password for account
$event.shadowName on $event.resourceName is:
$event.plaintextPassword</code></div>
<div> </script></div>
<div> </bodyExpression></div>
<div> <transport>mail</transport></div>
<div> </userPasswordNotifier></div>
<div> </handler></div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I found that i can use $event.requesteeName and
$requestee.getGivenName() but what are all method? Where i can
find them?</div>
<div>need to get plain text password.</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>Jan</div>
<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>