Design: API Authentication System
Design covers authentication mechanisms and token/key management. Authorization policies and API business logic are out of scope.
Functional Requirements
Non-Functional Requirements
Client
|
|--(1) Request token or API key --> Authentication Server
| (OAuth 2.0 / API key issuance)
|
|<--(2) Receive token or API key ---
|
|--(3) Call API with token/key --> API Gateway
| (Validate token/key)
|
|<--(4) API response -------------
Authentication Server --(5) Stores client credentials and keys securely
API Gateway --(6) Validates tokens (JWT signature or OAuth introspection)
--(7) Checks scopes/permissions
--(8) Forwards request to backend if valid
Revocation Service --(9) Maintains revoked tokens or keys list
Logging & Monitoring --(10) Tracks authentication events and failuresPass the test and this pattern moves unknown