You only have to show ID to police when you're being suspected of a crime, arrested or have committed a crime.
If you haven't committed a crime, been suspected of a crime or you're not being arrested then you can legally refuse to show ID to police officers.
The only exception is when you're driving a vehicle and the police pull you over you have to then produce your drives license to the police when they pull you over because you legally have to have a drivers license to operate a motor vehicle on the road.
But the passenger that's not driving does not have to show ID to the police only driver does.
The police do have to identify themselves to you and give you their badge number.