@aws-sdk/credential-provider-web-identity 3.709.0 → 3.713.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.
package/dist-cjs/fromWebToken.js
CHANGED
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.fromWebToken = void 0;
|
|
27
|
-
const fromWebToken = (init) => async () => {
|
|
27
|
+
const fromWebToken = (init) => async (awsIdentityProperties) => {
|
|
28
28
|
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
|
|
29
29
|
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
|
|
30
30
|
let { roleAssumerWithWebIdentity } = init;
|
|
@@ -33,7 +33,14 @@ const fromWebToken = (init) => async () => {
|
|
|
33
33
|
roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
|
|
34
34
|
...init.clientConfig,
|
|
35
35
|
credentialProviderLogger: init.logger,
|
|
36
|
-
|
|
36
|
+
...(awsIdentityProperties?.callerClientConfig?.region || init.parentClientConfig
|
|
37
|
+
? {
|
|
38
|
+
parentClientConfig: {
|
|
39
|
+
region: awsIdentityProperties?.callerClientConfig?.region,
|
|
40
|
+
...init.parentClientConfig,
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
: {}),
|
|
37
44
|
}, init.clientPlugins);
|
|
38
45
|
}
|
|
39
46
|
return roleAssumerWithWebIdentity({
|
package/dist-es/fromWebToken.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const fromWebToken = (init) => async () => {
|
|
1
|
+
export const fromWebToken = (init) => async (awsIdentityProperties) => {
|
|
2
2
|
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
|
|
3
3
|
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
|
|
4
4
|
let { roleAssumerWithWebIdentity } = init;
|
|
@@ -7,7 +7,14 @@ export const fromWebToken = (init) => async () => {
|
|
|
7
7
|
roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
|
|
8
8
|
...init.clientConfig,
|
|
9
9
|
credentialProviderLogger: init.logger,
|
|
10
|
-
|
|
10
|
+
...(awsIdentityProperties?.callerClientConfig?.region || init.parentClientConfig
|
|
11
|
+
? {
|
|
12
|
+
parentClientConfig: {
|
|
13
|
+
region: awsIdentityProperties?.callerClientConfig?.region,
|
|
14
|
+
...init.parentClientConfig,
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
: {}),
|
|
11
18
|
}, init.clientPlugins);
|
|
12
19
|
}
|
|
13
20
|
return roleAssumerWithWebIdentity({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CredentialProviderOptions } from "@aws-sdk/types";
|
|
2
|
-
import type { AwsCredentialIdentity,
|
|
1
|
+
import type { CredentialProviderOptions, RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
|
|
2
|
+
import type { AwsCredentialIdentity, Pluggable } from "@smithy/types";
|
|
3
3
|
/**
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
@@ -141,5 +141,5 @@ export interface FromWebTokenInit extends Omit<LowerCaseKey<AssumeRoleWithWebIde
|
|
|
141
141
|
/**
|
|
142
142
|
* @internal
|
|
143
143
|
*/
|
|
144
|
-
export declare const fromWebToken: (init: FromWebTokenInit) =>
|
|
144
|
+
export declare const fromWebToken: (init: FromWebTokenInit) => RuntimeConfigAwsCredentialIdentityProvider;
|
|
145
145
|
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { CredentialProviderOptions } from "@aws-sdk/types";
|
|
2
1
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "@smithy/types";
|
|
2
|
+
CredentialProviderOptions,
|
|
3
|
+
RuntimeConfigAwsCredentialIdentityProvider,
|
|
4
|
+
} from "@aws-sdk/types";
|
|
5
|
+
import { AwsCredentialIdentity, Pluggable } from "@smithy/types";
|
|
7
6
|
export interface AssumeRoleWithWebIdentityParams {
|
|
8
7
|
RoleArn: string;
|
|
9
8
|
RoleSessionName: string;
|
|
@@ -36,5 +35,5 @@ export interface FromWebTokenInit
|
|
|
36
35
|
}
|
|
37
36
|
export declare const fromWebToken: (
|
|
38
37
|
init: FromWebTokenInit
|
|
39
|
-
) =>
|
|
38
|
+
) => RuntimeConfigAwsCredentialIdentityProvider;
|
|
40
39
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/credential-provider-web-identity",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.713.0",
|
|
4
4
|
"description": "AWS credential provider that calls STS assumeRole for temporary AWS credentials",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"license": "Apache-2.0",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@aws-sdk/core": "3.
|
|
37
|
-
"@aws-sdk/types": "3.
|
|
36
|
+
"@aws-sdk/core": "3.713.0",
|
|
37
|
+
"@aws-sdk/types": "3.713.0",
|
|
38
38
|
"@smithy/property-provider": "^3.1.11",
|
|
39
39
|
"@smithy/types": "^3.7.2",
|
|
40
40
|
"tslib": "^2.6.2"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"typescript": "~4.9.5"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@aws-sdk/client-sts": "^3.
|
|
51
|
+
"@aws-sdk/client-sts": "^3.713.0"
|
|
52
52
|
},
|
|
53
53
|
"types": "./dist-types/index.d.ts",
|
|
54
54
|
"engines": {
|