@aws-sdk/core
Advanced tools
Comparing version
@@ -166,2 +166,5 @@ "use strict"; | ||
// src/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.ts | ||
var getBearerTokenEnvKey = /* @__PURE__ */ __name((signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`, "getBearerTokenEnvKey"); | ||
// src/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.ts | ||
@@ -176,3 +179,7 @@ var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE"; | ||
*/ | ||
environmentVariableSelector: /* @__PURE__ */ __name((env) => { | ||
environmentVariableSelector: /* @__PURE__ */ __name((env, options) => { | ||
if (options?.signingName) { | ||
const bearerTokenKey = getBearerTokenEnvKey(options.signingName); | ||
if (bearerTokenKey in env) return ["httpBearerAuth"]; | ||
} | ||
if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env)) return void 0; | ||
@@ -179,0 +186,0 @@ return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]); |
import { getArrayForCommaSeparatedString } from "../utils/getArrayForCommaSeparatedString"; | ||
import { getBearerTokenEnvKey } from "../utils/getBearerTokenEnvKey"; | ||
const NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE"; | ||
const NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference"; | ||
export const NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = { | ||
environmentVariableSelector: (env) => { | ||
environmentVariableSelector: (env, options) => { | ||
if (options?.signingName) { | ||
const bearerTokenKey = getBearerTokenEnvKey(options.signingName); | ||
if (bearerTokenKey in env) | ||
return ["httpBearerAuth"]; | ||
} | ||
if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env)) | ||
@@ -7,0 +13,0 @@ return undefined; |
{ | ||
"name": "@aws-sdk/core", | ||
"version": "3.806.0", | ||
"version": "3.808.0", | ||
"description": "Core functions & classes shared by multiple AWS SDK clients.", | ||
@@ -86,7 +86,7 @@ "scripts": { | ||
"@smithy/core": "^3.3.1", | ||
"@smithy/node-config-provider": "^4.1.0", | ||
"@smithy/node-config-provider": "^4.1.1", | ||
"@smithy/property-provider": "^4.0.2", | ||
"@smithy/protocol-http": "^5.1.0", | ||
"@smithy/signature-v4": "^5.1.0", | ||
"@smithy/smithy-client": "^4.2.3", | ||
"@smithy/smithy-client": "^4.2.4", | ||
"@smithy/types": "^4.2.0", | ||
@@ -93,0 +93,0 @@ "@smithy/util-middleware": "^4.0.2", |
87868
1.36%104
2.97%2080
0.97%