For #19989, add support in the python api for authentication 'sudo_as_login' option.
This allows the authenticating user to act as a different user. The authenticating script or user
must have permission to sudo. All actions after authentication will apply the permissions of the
sudo_as_login user, and will be logged as having been done by that user. An additional
'sudo_actual_user' property in the event log indicates the authenticated user that actually
executed the actions.