For as long as Barack Obama has been on the scene, he has claimed to be a Christian, and the media have consistently defended him against any claim to the contrary - whether that he is a Muslim (which he is not) or simply a closet atheist (much more likely if you ask me). The claim that Obama is a Christian is based on a) self-identification; and b) his years listening to Jeremiah Wright rant about America's chickens coming home to roost.
In Matthew 7:23, Jesus says that many will cry out to him, "Lord, Lord," and that He will reply, "Away from me you evildoers. I never knew you."
In other words, you can claim to be a Christian all you want. That doesn't make it true. We can't know what's in a person's heart, and we certainly can't know whether that person has attained salvation through faith in Christ. That's a matter strictly between God and the person.