[Java][Client Default] Support of AWS Signature V4 (#14287)

* Add support of AWSV4 Signature in Java

* Add Petstore sample for AWSV4 Signature

* Update other sample examples

* Sync Documentation and sample

* Specify only available for okhttp-gson in doc
This commit is contained in:
Maxime Dufour
2023-01-10 12:29:20 +01:00
committed by GitHub
parent 0b8c08c7a0
commit c6ea564600
90 changed files with 13682 additions and 4 deletions

View File

@@ -305,6 +305,7 @@
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable-version}</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>

View File

@@ -533,6 +533,18 @@ public class ApiClient {
throw new RuntimeException("No OAuth2 authentication configured!");
}
/**
* Helper method to set credentials for AWSV4 Signature
*
* @param accessKey Access Key
* @param secretKey Secret Key
* @param region Region
* @param service Service to access to
*/
public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) {
throw new RuntimeException("No AWS4 authentication configured!");
}
/**
* Set the User-Agent header's value (by adding to the default header map).
*