private AthenzAccessToken getAccessTokenImpl(List<AthenzResourceName> resources, List<AthenzIdentity> proxyPrincipals) {
        URI uri = ztsUrl.resolve("oauth2/token");
        RequestBuilder requestBuilder = RequestBuilder.post(uri)
                .addHeader("Content-Type", "application/x-www-form-urlencoded")
                .addParameter("grant_type", "client_credentials")
                .addParameter("scope", resources.stream().map(AthenzResourceName::toResourceNameString).collect(Collectors.joining(" ")));
        if (proxyPrincipals.size()>0) {
            String proxyPrincipalString = proxyPrincipals.stream()
                    .map(AthenzIdentity::spiffeUri)
                    .map(URI::toString)
                    .collect(Collectors.joining(","));
            requestBuilder.addParameter("proxy_principal_spiffe_uris", proxyPrincipalString);
        }
        HttpUriRequest request = requestBuilder.build();
        return execute(request, response -> {
            AccessTokenResponseEntity accessTokenResponseEntity = readEntity(response, AccessTokenResponseEntity.class);
            return accessTokenResponseEntity.accessToken();
        });
    }
Default implementation of {@link ZtsClient}

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