API Security Patterns — Series 2
Preview — 3 of 10 questions
A public API supports both simple API keys (a single static string a developer includes in requests) and OAuth 2.0 access tokens (short-lived, issued after a user consents to specific scopes). What's the key architectural difference, and when is each more appropriate?
An OAuth-based system issues a short-lived access token alongside a longer-lived refresh token, which the client uses to obtain new access tokens without re-authenticating. What's refresh token rotation, and what problem does it address?
A browser blocks a JavaScript request from https://app.example.com to https://api.example.com by default, unless the API explicitly allows it via CORS headers. Why does this same-origin restriction exist, and what does a CORS header like Access-Control-Allow-Origin actually do?
Sign up free to play
Answer all 10 questions (7 more), see explanations for every answer, and track your score.