The FOID is pretty much the worst of the "ID Cards" that came out in GFW states during the late 60's, because they expire periodically.
IIRC, the only other state that has cards that expire is MA.
NJ's FID is similiar, but it's valid for life.
The _original_ purpose behind these things in pre-nics days was certification that a background check had been performed, and that the bearer was not a prohibited person. In these days of NICS, they are entirely redundant.
Their ulterior motive is simple and effective: they create a barrier to participation. People who'd otherwise pass NICS and tuck a shottie into a closet "just in case" wind up not wanting to deal with the paperwork and fingerprinting, and so, they go without.
Over the years, it's been devestatingly effective, at least in NJ. According to Lott's state figures, the states with FID schemes have the lowest gun ownership rates. IL, incidentally, is the exception to this rule. Flipside, CT has no such requirement, and gun ownership rates in that state are low too.
I'm going to have to do a more thorough look at this issue, and pull together some figures cross referencing ownership rates against FID/FOIDish schemes.
Fortunately, the existence of NICS means that it is highly unlikely that new states would institute a FID scheme. They appear to be primarily remnants of the moral panic of the late 60's.
As for court challenges, I've not read up on them in detail in IL, but IIRC, the IL state constitution has weasel words in it, "subject to the power of police" or some such. IIRC, their court found the FOID to be consistent with the weasel words. As for Federal challenge, as we all know, the courts have never taken notice of 14th amendment "incorporation to the states" of the 2nd, and so the previous courts have stayed as far away from a 2A case as they can get.
I think, now, with "Machine gun Sammy" on the bench, we _just_might_ have a shot at getting a good 2A case.
Incidentally, the rumors I've heard is that one of the reasons SCOTUS hasn't taken a 2A case is because they knew that they didn't have the votes, and didn't want to setup a bad precedent that would live for a century or so.