A practical guide to API keys, OAuth, JWTs, and service-to-service authentication — with common failure modes.