i am creating forget password functionality . so i used admin credentials to update user password .
so i am using
serviceRegistry.getAuthenticationService().setAuthentication(userName, char  password); to update the password.
but its not updating
This can be called by an admin user only.
I hope you have tried to call this as admin only.
If you are still getting the error then please share the error logs you are receiving.
Yes i am calling using admin user . admin user can change password of any user.
Is it correct ?
Yes, but if you can share what error you are getting then I can help you.
You can try this add on for forgot password functionality.
Retrieving data ...