@aws-sdk/credential-providers 3.879.0 → 3.880.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +0 -29
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -948,35 +948,6 @@ new S3({
948
948
  });
949
949
  ```
950
950
 
951
- ## Add Custom Headers to STS assume-role calls
952
-
953
- You can specify the plugins--groups of middleware, to inject to the STS client.
954
- For example, you can inject custom headers to each STS assume-role calls. It's
955
- available in [`fromTemporaryCredentials()`](#fromtemporarycredentials),
956
- [`fromWebToken()`](#fromwebtoken), [`fromTokenFile()`](#fromtokenfile), [`fromIni()`](#fromini).
957
-
958
- Code example:
959
-
960
- ```javascript
961
- const addConfusedDeputyMiddleware = (next) => (args) => {
962
- args.request.headers["x-amz-source-account"] = account;
963
- args.request.headers["x-amz-source-arn"] = sourceArn;
964
- return next(args);
965
- };
966
- const confusedDeputyPlugin = {
967
- applyToStack: (stack) => {
968
- stack.add(addConfusedDeputyMiddleware, { step: "finalizeRequest" });
969
- },
970
- };
971
- const provider = fromTemporaryCredentials({
972
- // Required. Options passed to STS AssumeRole operation.
973
- params: {
974
- RoleArn: "arn:aws:iam::1234567890:role/Role",
975
- },
976
- clientPlugins: [confusedDeputyPlugin],
977
- });
978
- ```
979
-
980
951
  [getcredentialsforidentity_api]: https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html
981
952
  [getid_api]: https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetId.html
982
953
  [assumerole_api]: https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-providers",
3
- "version": "3.879.0",
3
+ "version": "3.880.0",
4
4
  "description": "A collection of credential providers, without requiring service clients like STS, Cognito",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",