@aws-sdk/credential-provider-web-identity 3.916.0 → 3.918.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.
|
@@ -9,7 +9,7 @@ const fromWebToken_1 = require("./fromWebToken");
|
|
|
9
9
|
const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
|
|
10
10
|
const ENV_ROLE_ARN = "AWS_ROLE_ARN";
|
|
11
11
|
const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
|
|
12
|
-
const fromTokenFile = (init = {}) => async () => {
|
|
12
|
+
const fromTokenFile = (init = {}) => async (awsIdentityProperties) => {
|
|
13
13
|
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
|
|
14
14
|
const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];
|
|
15
15
|
const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];
|
|
@@ -25,7 +25,7 @@ const fromTokenFile = (init = {}) => async () => {
|
|
|
25
25
|
(0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
|
|
26
26
|
roleArn,
|
|
27
27
|
roleSessionName,
|
|
28
|
-
})();
|
|
28
|
+
})(awsIdentityProperties);
|
|
29
29
|
if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
|
|
30
30
|
(0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
|
|
31
31
|
}
|
package/dist-es/fromTokenFile.js
CHANGED
|
@@ -6,7 +6,7 @@ import { fromWebToken } from "./fromWebToken";
|
|
|
6
6
|
const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
|
|
7
7
|
const ENV_ROLE_ARN = "AWS_ROLE_ARN";
|
|
8
8
|
const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
|
|
9
|
-
export const fromTokenFile = (init = {}) => async () => {
|
|
9
|
+
export const fromTokenFile = (init = {}) => async (awsIdentityProperties) => {
|
|
10
10
|
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
|
|
11
11
|
const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];
|
|
12
12
|
const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];
|
|
@@ -22,7 +22,7 @@ export const fromTokenFile = (init = {}) => async () => {
|
|
|
22
22
|
readFileSync(webIdentityTokenFile, { encoding: "ascii" }),
|
|
23
23
|
roleArn,
|
|
24
24
|
roleSessionName,
|
|
25
|
-
})();
|
|
25
|
+
})(awsIdentityProperties);
|
|
26
26
|
if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
|
|
27
27
|
setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
|
|
28
28
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { CredentialProviderOptions } from "@aws-sdk/types";
|
|
2
|
-
import type { AwsCredentialIdentityProvider } from "@smithy/types";
|
|
1
|
+
import type { CredentialProviderOptions, RuntimeConfigAwsCredentialIdentityProvider } from "@aws-sdk/types";
|
|
3
2
|
import { FromWebTokenInit } from "./fromWebToken";
|
|
4
3
|
/**
|
|
5
4
|
* @public
|
|
@@ -15,4 +14,4 @@ export interface FromTokenFileInit extends Partial<Omit<FromWebTokenInit, "webId
|
|
|
15
14
|
*
|
|
16
15
|
* Represents OIDC credentials from a file on disk.
|
|
17
16
|
*/
|
|
18
|
-
export declare const fromTokenFile: (init?: FromTokenFileInit) =>
|
|
17
|
+
export declare const fromTokenFile: (init?: FromTokenFileInit) => RuntimeConfigAwsCredentialIdentityProvider;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
CredentialProviderOptions,
|
|
3
|
+
RuntimeConfigAwsCredentialIdentityProvider,
|
|
4
|
+
} from "@aws-sdk/types";
|
|
3
5
|
import { FromWebTokenInit } from "./fromWebToken";
|
|
4
6
|
export interface FromTokenFileInit
|
|
5
7
|
extends Partial<
|
|
@@ -13,4 +15,4 @@ export interface FromTokenFileInit
|
|
|
13
15
|
}
|
|
14
16
|
export declare const fromTokenFile: (
|
|
15
17
|
init?: FromTokenFileInit
|
|
16
|
-
) =>
|
|
18
|
+
) => RuntimeConfigAwsCredentialIdentityProvider;
|
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.918.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",
|