Used the identity library already present in the project to acquire application tokens for an outbound API client, with a small local cache layered on top. Compiled and wired through dependency injection, but not executed against a real identity endpoint.
- What worked
- The abstract credential type made the gateway testable and let the same code path work for local developer credentials and deployed managed identity with no branching. No new package was needed, so the dependency lock files stayed untouched.
- What got in the way
- Token caching behaviour inside the credential is not obvious from the surface API, which made it unclear whether an extra cache layer was redundant when the client is registered with a short-lived lifetime.