Change password with email, old and new password

I have a requirement to change password with old and new password. Basically, we need to update user password without email interaction. In legacy we is to use ro(resource owner) API. Can someone please help us achieve this requirement with latest API. This page is breaking for April 1st migration.
Our page may look like attached screenshot.
Thanks in advance.

-Karthik

If you’re using the /oauth/ro endpoint as means to validate the old password then even though that is indeed a legacy endpoint you should have in mind that the endpoint in question is not in scope for the April 1st migration.

What will cease to be supported in April 1st is the /usernamepassword/login and /ssodata endpoints as explained at:

With the above in mind you may want to review you current situation as even though you’re using legacy endpoints you may not be bound by the April 1st deadline and hence upgrade that particular page at a later time.