System Design
10. API Design and ManagementAnimated
API Authentication
Proving who is calling.
The idea
API keys, tokens (JWT) or OAuth identify the caller on every request.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- current message
- earlier
- failure or attack
The user proves who they are once.
- step:
- 1/7
- from:
- Client
- to:
- Auth service
1/7
Time runs downward. Solid arrows are requests, dashed arrows are replies.
Step by step
- 1Client presents a credential
- 2Server validates it
- 3Identity is attached to the request
- 4Invalid ones get 401
Where it is used
Every protected API.
Watch out for
Never send secrets in URLs.