@aws-sdk/token-providers 3.835.0 → 3.840.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/index.js
CHANGED
|
@@ -39,18 +39,21 @@ __export(index_exports, {
|
|
|
39
39
|
module.exports = __toCommonJS(index_exports);
|
|
40
40
|
|
|
41
41
|
// src/fromEnvSigningName.ts
|
|
42
|
-
var
|
|
42
|
+
var import_client = require("@aws-sdk/core/client");
|
|
43
|
+
var import_httpAuthSchemes = require("@aws-sdk/core/httpAuthSchemes");
|
|
43
44
|
var import_property_provider = require("@smithy/property-provider");
|
|
44
45
|
var fromEnvSigningName = /* @__PURE__ */ __name(({ logger, signingName } = {}) => async () => {
|
|
45
46
|
logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
|
|
46
47
|
if (!signingName) {
|
|
47
48
|
throw new import_property_provider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger });
|
|
48
49
|
}
|
|
49
|
-
const bearerTokenKey = (0,
|
|
50
|
+
const bearerTokenKey = (0, import_httpAuthSchemes.getBearerTokenEnvKey)(signingName);
|
|
50
51
|
if (!(bearerTokenKey in process.env)) {
|
|
51
52
|
throw new import_property_provider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
+
const token = { token: process.env[bearerTokenKey] };
|
|
55
|
+
(0, import_client.setTokenFeature)(token, "BEARER_SERVICE_ENV_VARS", "3");
|
|
56
|
+
return token;
|
|
54
57
|
}, "fromEnvSigningName");
|
|
55
58
|
|
|
56
59
|
// src/fromSso.ts
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { setTokenFeature } from "@aws-sdk/core/client";
|
|
2
|
+
import { getBearerTokenEnvKey } from "@aws-sdk/core/httpAuthSchemes";
|
|
2
3
|
import { TokenProviderError } from "@smithy/property-provider";
|
|
3
4
|
export const fromEnvSigningName = ({ logger, signingName } = {}) => async () => {
|
|
4
5
|
logger?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
|
|
@@ -9,5 +10,7 @@ export const fromEnvSigningName = ({ logger, signingName } = {}) => async () =>
|
|
|
9
10
|
if (!(bearerTokenKey in process.env)) {
|
|
10
11
|
throw new TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
const token = { token: process.env[bearerTokenKey] };
|
|
14
|
+
setTokenFeature(token, "BEARER_SERVICE_ENV_VARS", "3");
|
|
15
|
+
return token;
|
|
13
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/token-providers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.840.0",
|
|
4
4
|
"description": "A collection of token providers",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@aws-sdk/core": "3.
|
|
31
|
-
"@aws-sdk/nested-clients": "3.
|
|
32
|
-
"@aws-sdk/types": "3.
|
|
30
|
+
"@aws-sdk/core": "3.840.0",
|
|
31
|
+
"@aws-sdk/nested-clients": "3.840.0",
|
|
32
|
+
"@aws-sdk/types": "3.840.0",
|
|
33
33
|
"@smithy/property-provider": "^4.0.4",
|
|
34
34
|
"@smithy/shared-ini-file-loader": "^4.0.4",
|
|
35
35
|
"@smithy/types": "^4.3.1",
|