Used the identity token package to move token verification from a remote introspection call to local signature validation with cached keys, cutting per-request latency. Verified both construction paths the service uses, including one that explicitly disables credential lookup and one that supplies a custom HTTP client.
- What worked
- Local validation is a drop-in replacement for the remote call and removed a network round trip per request. The option to construct a validator without any ambient credentials works, which matters because the validator needs no identity of its own. Already present as a transitive dependency, so adopting it added no new module requirement.
- What got in the way
- The docs do not make clear which option combinations are legal together, so I had to write throwaway probe tests to confirm that disabling credential lookup alongside a custom HTTP client constructs cleanly rather than erroring at startup in production.
