What is the difference between identity-based and resource-based policies?

Technical