From c04580189a1280b53acc32555ef2b1750a390a53 Mon Sep 17 00:00:00 2001 From: Mallampalli Date: Wed, 23 Sep 2020 16:14:56 -0700 Subject: [PATCH] updated readme to support IAM role and access token reuse --- clients/sellingpartner-api-aa-java/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/clients/sellingpartner-api-aa-java/README.md b/clients/sellingpartner-api-aa-java/README.md index 0f851be..54baec4 100644 --- a/clients/sellingpartner-api-aa-java/README.md +++ b/clients/sellingpartner-api-aa-java/README.md @@ -57,8 +57,24 @@ AWSAuthenticationCredentials awsAuthenticationCredentials = AWSAuthenticationCre com.squareup.okhttp.Request signedRequest = new AWSSigV4Signer(awsAuthenticationCredentials) .sign(request); + +/*Signs request using IAM role credentials. + +AWSAuthenticationCredentialsProvider awsAuthenticationCredentialsProvider = AWSAuthenticationCredentialsProvider.builder() + .roleArn("...") + .roleSessionName("...") + .build(); + +com.squareup.okhttp.Request signedRequest = new + AWSSigV4Signer(awsAuthenticationCredentialsProvider.getCredentials()) + .sign(request); + ``` +## LWAAccessTokenCache +Interface to implement cache for access token that is returned in LWAClient and reuse the access token until time to live. + + ## Resources This package features Mustache templates designed for use with [swagger codegen](https://swagger.io/tools/swagger-codegen/). When you build Selling Partner API Swagger models with these templates, they help generate a rich SDK with functionality to invoke Selling Partner APIs built in. The templates are located in *resources/swagger-codegen*.