Whenever you're ready, walk me through how you'd approach this.
Explain the difference between authentication and authorization.
Clarify what each process establishes, when each occurs in a typical REST API request, and give a concrete example involving a user accessing a protected resource. Mention how failures are commonly represented with HTTP status codes.
Keep the answer focused on general web and API fundamentals. No specific framework or programming language is required.