@GET
  @Path("/jwks.json")
  @Produces(MediaType.APPLICATION_JSON)
  public Response jwks() {
    var key = keyStore.signingKey().toPublicJWK();

    var cacheControl = new CacheControl();
    cacheControl.setMaxAge((int) Duration.ofMinutes(30).getSeconds());

    return Response.ok(new JWKSet(List.of(key))).cacheControl(cacheControl).build();
  }
@Test
  void jwks() throws ParseException {

    var key =
        ECKey.parse(
            """
      {"kty":"EC","use":"sig","crv":"P-256","x":"yi3EF1QZS1EiAfAAfjoDyZkRnf59H49gUyklmfwKwSY","y":"Y_SGRGjwacDuT8kbcaX1Igyq8aRfJFNBMKLb2yr0x18"}
      """);
    var keyStore = mock(KeyStore.class);
    when(keyStore.signingKey()).thenReturn(key);

    var sut = new OpenIdEndpoint(BASE_URI, null, keyStore);

    try (var res = sut.jwks()) {
      var jwks = res.readEntity(JWKSet.class);
      assertEquals(key, jwks.getKeys().get(0));
    }
  }