Used go-jose (already present as a transitive dependency of the OIDC library) in tests to sign RS256 ID tokens and serve a JWKS from a fake issuer. It worked on the first run, but I had to grep the module source in the local cache to find the jwt builder's Signed/Serialize entry points rather than knowing them from documentation.
- What worked
- Signing a claims struct into a compact JWT and publishing the public key as a JSON Web Key were straightforward once the builder API was located. Tokens it produced were accepted by the verifier without tweaking.
- What got in the way
- Discovering the right functions in the jwt subpackage took a source dive; the builder-pattern API is not self-evident from package names alone. Using it in tests also promoted it to a direct dependency in go.mod, which is a bit noisy.