@aws-sdk/middleware-token 3.758.0 → 3.774.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 +6 -7
- package/package.json +2 -2
package/dist-cjs/index.js
CHANGED
|
@@ -19,14 +19,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
20
|
|
|
21
21
|
// src/index.ts
|
|
22
|
-
var
|
|
23
|
-
__export(
|
|
22
|
+
var index_exports = {};
|
|
23
|
+
__export(index_exports, {
|
|
24
24
|
getTokenPlugin: () => getTokenPlugin,
|
|
25
25
|
resolveTokenConfig: () => resolveTokenConfig,
|
|
26
26
|
tokenMiddleware: () => tokenMiddleware,
|
|
27
27
|
tokenMiddlewareOptions: () => tokenMiddlewareOptions
|
|
28
28
|
});
|
|
29
|
-
module.exports = __toCommonJS(
|
|
29
|
+
module.exports = __toCommonJS(index_exports);
|
|
30
30
|
|
|
31
31
|
// src/tokenMiddleware.ts
|
|
32
32
|
var import_protocol_http = require("@smithy/protocol-http");
|
|
@@ -39,8 +39,7 @@ var tokenMiddlewareOptions = {
|
|
|
39
39
|
override: true
|
|
40
40
|
};
|
|
41
41
|
var tokenMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {
|
|
42
|
-
if (!import_protocol_http.HttpRequest.isInstance(args.request) || context.currentAuthConfig)
|
|
43
|
-
return next(args);
|
|
42
|
+
if (!import_protocol_http.HttpRequest.isInstance(args.request) || context.currentAuthConfig) return next(args);
|
|
44
43
|
const token = options.token && await options.token();
|
|
45
44
|
if (token?.token) {
|
|
46
45
|
const authConfig = {
|
|
@@ -58,9 +57,9 @@ var tokenMiddleware = /* @__PURE__ */ __name((options) => (next, context) => asy
|
|
|
58
57
|
|
|
59
58
|
// src/getTokenPlugin.ts
|
|
60
59
|
var getTokenPlugin = /* @__PURE__ */ __name((options) => ({
|
|
61
|
-
applyToStack: (clientStack) => {
|
|
60
|
+
applyToStack: /* @__PURE__ */ __name((clientStack) => {
|
|
62
61
|
clientStack.addRelativeTo(tokenMiddleware(options), tokenMiddlewareOptions);
|
|
63
|
-
}
|
|
62
|
+
}, "applyToStack")
|
|
64
63
|
}), "getTokenPlugin");
|
|
65
64
|
|
|
66
65
|
// src/normalizeTokenProvider.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-token",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.774.0",
|
|
4
4
|
"description": "Middleware and Plugin for setting token authentication",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"license": "Apache-2.0",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@aws-sdk/token-providers": "3.
|
|
33
|
+
"@aws-sdk/token-providers": "3.774.0",
|
|
34
34
|
"@aws-sdk/types": "3.734.0",
|
|
35
35
|
"@smithy/property-provider": "^4.0.1",
|
|
36
36
|
"@smithy/protocol-http": "^5.0.1",
|