The thread title is just that little too vague. When discussing law, particularly this area of law, more precision is needed.
According to US v Mendenhall, the totality of the circumstances are what counts in the court's mind. In a nutshell, if, given the totality of circumstances, a reasonable person would not feel free to ignore the officer's inquiries and walk away, then he is detained. The case gives a list of circumstances one can use.
So, if a cop requests verbal identity or an identity document in a friendly, consensual manner that seems open to refusal, then, no, you wouldn't be detained.
However, if the cop demands verbal identity or an ID document, you're seized.
Whether a cop can just up an demand a CCW permit to ensure the OCer is legal will be a matter of the fine points of state law. For example, in (Georgia?) a few years ago, a cop demanded the permit for mere carry (can't recall if a CCd gun was spotted or if it was OCd.) The guy either didn't have the permit or refused. The court ruled that CC was illegal, and that the permit was an exception to the illegality, and was thus an affirmative defense--meaning you had to prove you had an exception. So, the answer to whether the cop needs more than just mere OC to temporarily detain someone to check the permit will depend on your state's law.