Ask for uniforms..... or a supervisor! If he does not comply, from that I would determine that he is not legit and if possible call 911 to report a police impersonator.
If he has you at gun point I would keep my hands visible and ask for his supervisor before making any move tactical, defensive or otherwise unless he starts shooting, then it would be game on and let the attorneys figure it out!
If it does come down to shooting, and you disable or eliminate the threat, DO NOT SAY ANYTHING WITHOUT CONSULTING YOUR LAWYER FIRST!!!
Hope that helps, that is just what I would do, I am not an attorney just a guy. Use this advise at your own risk.