> @@ -87,6 +87,41 @@ public HttpRequest
> initialAuthWithAccessKeyAndSecretKeyAndTenantId(String access
> accessKey, secretKey,
> getTenantId()), "application/json")).build();
> }
>
> + public HttpRequest initialAuthWithTokenAndTenantName(String token) {
> + return HttpRequest.builder().method("POST")
> +
> + .endpoint("http://localhost:5000/v2.0/tokens")
> + .addHeader(HttpHeaders.ACCEPT, "application/json")
> + .payload(
> + payloadFromStringWithContentType(
> + format(
> +
> "{\"auth\":{\"token\":{\"id\":\"%s\"},\"tenantName\":\"%s\"}}",
Here I followed the existing scheme but I kept single 3-space indenting
instead. Do you mean something like the following?
```
public HttpRequest initialAuthWithTokenAndTenantName(String token) {
return HttpRequest.builder().method("POST")
.endpoint("http://localhost:5000/v2.0/tokens")
.addHeader(HttpHeaders.ACCEPT, "application/json")
.payload(
payloadFromStringWithContentType(format("{\"auth\":{\"token\":{\"id\":\"%s\"},\"tenantName\":\"%s\"}}",
token, getTenantName()), "application/json")).build();
}
```
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/433/files#r17382620