To answer your question, no, they did not. Nor did they have the right to detain you while they ran it. You were illegally detained.*
Also, after being told you had no CPL and still telling you to conceal, that officer broke the law by telling you to break the law.
ETA: I am not a lawyer.
*ETA again: The above red text is to remove said opinion on the illegality of the actions. I came across some information and re-evaluated the situation such that it doesn't appear anything except for the directive to conceal without a CPL was done illegally.