You operate a main API that requires clients to present an access token issued by a third‑party authentication service. That third party is unreliable: it intermittently fails and sometimes returns malformed responses. You must design an end‑to‑end, production‑grade system so clients can reliably acquire tokens and call your API.
Assume the third party issues OAuth 2.0/JWT access tokens and publishes a JWKS for signature verification, but its token endpoint/introspection endpoint can be flaky.
Design a robust system covering:
Describe the architecture, algorithms/policies, and key data structures; call out assumptions and trade‑offs.
Login required