updated readme to support IAM role and access token reuse

This commit is contained in:
Mallampalli 2020-09-23 16:14:56 -07:00
parent f737a56175
commit c04580189a
1 changed files with 16 additions and 0 deletions

View File

@ -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*.