Well I can kinda see why an undercover cop could get by with not showing you their ID, or wouldn't be allowed to show you anyway. Since they are undercover and all.
Yes, but why go through the hassle of telling me he's undercover, and then make a huge scene about it? If he'd just took a moment to show me his liscense I wouldn't have known he was undercover anyway, nor would have everyone within a ten foot radius known.