Authentication of current users password within Xwiki for eSigning of a page

As a part of my Quality Management System (ISO13485 and others) - Quality documents need to be eSigned to meet regulatory and legal requirements - for those who edit the document or who review or approve it.
One of the accepted method is to get the current User to eSign the document / page by entering his login password - say in a Modal popup form with an input field – and authenticate it against the Xwiki’s stored login password.
I am unable to find any Scripting Api or method for doing this. I could find only the method for Logging in a user.
I only need to authenticate the current user’s login password again within the currently open Xwiki page.