diff --git a/oauth2_http/java/com/google/auth/oauth2/AwsRequestSigner.java b/oauth2_http/java/com/google/auth/oauth2/AwsRequestSigner.java index baf855124..275c15105 100644 --- a/oauth2_http/java/com/google/auth/oauth2/AwsRequestSigner.java +++ b/oauth2_http/java/com/google/auth/oauth2/AwsRequestSigner.java @@ -237,7 +237,8 @@ private Map getCanonicalHeaders(String defaultDate) { headers.put("x-amz-date", defaultDate); } - if (awsSecurityCredentials.getSessionToken() != null && !awsSecurityCredentials.getSessionToken().isEmpty()) { + if (awsSecurityCredentials.getSessionToken() != null + && !awsSecurityCredentials.getSessionToken().isEmpty()) { headers.put("x-amz-security-token", awsSecurityCredentials.getSessionToken()); } diff --git a/oauth2_http/java/com/google/auth/oauth2/AwsSecurityCredentials.java b/oauth2_http/java/com/google/auth/oauth2/AwsSecurityCredentials.java index ddbaf338f..7101dda3e 100644 --- a/oauth2_http/java/com/google/auth/oauth2/AwsSecurityCredentials.java +++ b/oauth2_http/java/com/google/auth/oauth2/AwsSecurityCredentials.java @@ -51,7 +51,8 @@ public class AwsSecurityCredentials { * @param secretAccessKey the AWS secret access key. * @param sessionToken the AWS session token. Optional. */ - public AwsSecurityCredentials(String accessKeyId, String secretAccessKey, @Nullable String sessionToken) { + public AwsSecurityCredentials( + String accessKeyId, String secretAccessKey, @Nullable String sessionToken) { this.accessKeyId = accessKeyId; this.secretAccessKey = secretAccessKey; this.sessionToken = sessionToken; @@ -59,6 +60,7 @@ public AwsSecurityCredentials(String accessKeyId, String secretAccessKey, @Nulla /** * Gets the AWS access key id. + * * @return the AWS access key id. */ public String getAccessKeyId() { @@ -67,6 +69,7 @@ public String getAccessKeyId() { /** * Gets the AWS secret access key. + * * @return the AWS secret access key. */ public String getSecretAccessKey() { @@ -75,6 +78,7 @@ public String getSecretAccessKey() { /** * Gets the AWS session token. + * * @return the AWS session token. */ @Nullable