Wow, that would be a cool feature. I dont think it can be done with Native jira.
The 2nd authentication is called "websudo" and while it has some option I dont think there is a way to hand it off to an external process.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events