private <T, U extends TemporaryCredentialsResponse<T>> T getExternalTemporaryCredentials(String provider, AthenzDomain domain, Map<String, String> attributes, Class<U> responseClass) {
        URI uri = ztsUrl.resolve("external/%s/domain/%s/creds".formatted(provider, domain.getName()));
        RequestBuilder requestBuilder = RequestBuilder.post(uri)
                .setEntity(toJsonStringEntity(Map.of("clientId", "%s.%s".formatted(domain.getName(), provider), "attributes", attributes)));

        HttpUriRequest request = requestBuilder.build();
        return execute(request, response -> readEntity(response, responseClass)).credentials();
    }
Default implementation of {@link ZtsClient}

@author bjorncs
@author mortent
vespa-athenz/src/main/java/com/yahoo/vespa/athenz/client/zts/DefaultZtsClient.java