[midPoint] Custom Notification body
Pavol Mederly
mederly at evolveum.com
Mon Dec 4 19:32:33 CET 2017
Hello Jan,
userPasswordNotifier deals with user modifications - so you cannot refer
to any shadows or resources there.
The event variable points to a ModelEvent
<https://github.com/Evolveum/midpoint/blob/master/model/notifications-api/src/main/java/com/evolveum/midpoint/notifications/api/events/ModelEvent.java>
object. So you can use methods of this class to retrieve data you need.
Contrary to many regular methods, the password value should be retrieved
using midPoint functions library
<https://github.com/Evolveum/midpoint/blob/master/model/model-api/src/main/java/com/evolveum/midpoint/model/api/expr/MidpointFunctions.java>.
Looking at the source code I would recommend something like - but have
not tested that myself:
midpoint.getPlaintextUserPasswordFromDeltas(event.focusExecutedDeltas)
Pavol Mederly
Software developer
evolveum.com
On 04.12.2017 17:36, Jan Kaspar wrote:
> Hi All,
>
> i have update it works for accountPasswordNotifier but not for
> userPasswordNotifier
>
> I tried to use this:
>
> <handler>
> <userPasswordNotifier>
> <bodyExpression>
> <script>
>
> <language>http://midpoint.evolveum.com/xml/ns/public/expression/language#velocity</language>
> <code>Password for account $event.shadowName
> on $event.resourceName is: $event.plaintextPassword</code>
> </script>
> </bodyExpression>
> <transport>mail</transport>
> </userPasswordNotifier>
> </handler>
>
>
> I found that i can use $event.requesteeName and
> $requestee.getGivenName() but what are all method? Where i can find them?
> need to get plain text password.
>
> Thanks
>
> Jan
>
>
> _______________________________________________
> 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/20171204/ef5d4f32/attachment.htm>
More information about the midPoint
mailing list