Added support for asynchronous prompting.

Policy checking now requires a callback to receive the prompt response.

Jira issue: WP-956