Closed Karm closed 2 months ago
@jerboaa It's green. Not thanks toexit 0;
:-D , but due to the fix working.
Old Quarkus needs:
Client c = null;
Response r = null;
try {
c = ClientBuilder.newClient();
r = c.target("http://localhost:" + port + "/data/protected")
.request().header("authorization", "Bearer " + generateJWT(key))
.buildGet().invoke();
return String.format("Claim value within JWT of 'custom-value' : %s", r.readEntity(String.class));
} finally {
if (c != null) {
c.close();
}
if (r != null) {
r.close();
}
}
New Quarkus is fine with:
try (final Response response = ClientBuilder.newClient()
.target("http://localhost:" + port + "/protected")
.request().header("authorization", "Bearer " + generateJWT(key))
.buildGet().invoke()) {
return String.format("Claim value within JWT of 'custom-value' : %s", response.readEntity(String.class));
}