Photon program root login prompt?


I am writing a piece of software that must be run as root to perform a
specific function. If it is used by a non-root user I’d like a root login
prompt to pop up much like in the Package Manager.

Could someone enlighten me as to how that is accomplished?