@aws-sdk/client-groundstation 3.509.0 → 3.513.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/auth/httpAuthExtensionConfiguration.js +1 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/index.js +116 -58
- package/dist-cjs/runtimeConfig.shared.js +10 -0
- package/dist-es/GroundStationClient.js +17 -4
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/runtimeConfig.shared.js +10 -0
- package/dist-es/runtimeExtensions.js +3 -0
- package/dist-types/GroundStationClient.d.ts +13 -11
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/dist-types/extensionConfiguration.d.ts +2 -1
- package/dist-types/runtimeConfig.browser.d.ts +5 -3
- package/dist-types/runtimeConfig.d.ts +4 -2
- package/dist-types/runtimeConfig.native.d.ts +6 -4
- package/dist-types/runtimeConfig.shared.d.ts +2 -0
- package/dist-types/ts3.4/GroundStationClient.d.ts +11 -9
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -4
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +8 -8
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -0
- package/package.json +16 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveHttpAuthSchemeConfig = exports.defaultGroundStationHttpAuthSchemeProvider = exports.defaultGroundStationHttpAuthSchemeParametersProvider = void 0;
|
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const util_middleware_1 = require("@smithy/util-middleware");
|
|
6
|
+
const defaultGroundStationHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
7
|
+
return {
|
|
8
|
+
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
|
9
|
+
region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
|
|
10
|
+
(() => {
|
|
11
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
12
|
+
})(),
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.defaultGroundStationHttpAuthSchemeParametersProvider = defaultGroundStationHttpAuthSchemeParametersProvider;
|
|
16
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
17
|
+
return {
|
|
18
|
+
schemeId: "aws.auth#sigv4",
|
|
19
|
+
signingProperties: {
|
|
20
|
+
name: "groundstation",
|
|
21
|
+
region: authParameters.region,
|
|
22
|
+
},
|
|
23
|
+
propertiesExtractor: (config, context) => ({
|
|
24
|
+
signingProperties: {
|
|
25
|
+
config,
|
|
26
|
+
context,
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const defaultGroundStationHttpAuthSchemeProvider = (authParameters) => {
|
|
32
|
+
const options = [];
|
|
33
|
+
switch (authParameters.operation) {
|
|
34
|
+
default: {
|
|
35
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return options;
|
|
39
|
+
};
|
|
40
|
+
exports.defaultGroundStationHttpAuthSchemeProvider = defaultGroundStationHttpAuthSchemeProvider;
|
|
41
|
+
const resolveHttpAuthSchemeConfig = (config) => {
|
|
42
|
+
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
|
|
43
|
+
return {
|
|
44
|
+
...config_0,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
package/dist-cjs/index.js
CHANGED
|
@@ -99,13 +99,14 @@ module.exports = __toCommonJS(src_exports);
|
|
|
99
99
|
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
100
100
|
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
101
101
|
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
102
|
-
var import_middleware_signing = require("@aws-sdk/middleware-signing");
|
|
103
102
|
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
104
103
|
var import_config_resolver = require("@smithy/config-resolver");
|
|
104
|
+
var import_core = require("@smithy/core");
|
|
105
105
|
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
106
106
|
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
107
107
|
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
108
108
|
|
|
109
|
+
var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
|
|
109
110
|
|
|
110
111
|
// src/endpoint/EndpointParameters.ts
|
|
111
112
|
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
@@ -130,19 +131,62 @@ var import_runtimeConfig = require("././runtimeConfig");
|
|
|
130
131
|
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
|
|
131
132
|
var import_protocol_http = require("@smithy/protocol-http");
|
|
132
133
|
var import_smithy_client = require("@smithy/smithy-client");
|
|
134
|
+
|
|
135
|
+
// src/auth/httpAuthExtensionConfiguration.ts
|
|
136
|
+
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
|
|
137
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
138
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
139
|
+
let _credentials = runtimeConfig.credentials;
|
|
140
|
+
return {
|
|
141
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
142
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
143
|
+
if (index === -1) {
|
|
144
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
145
|
+
} else {
|
|
146
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
httpAuthSchemes() {
|
|
150
|
+
return _httpAuthSchemes;
|
|
151
|
+
},
|
|
152
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
153
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
154
|
+
},
|
|
155
|
+
httpAuthSchemeProvider() {
|
|
156
|
+
return _httpAuthSchemeProvider;
|
|
157
|
+
},
|
|
158
|
+
setCredentials(credentials) {
|
|
159
|
+
_credentials = credentials;
|
|
160
|
+
},
|
|
161
|
+
credentials() {
|
|
162
|
+
return _credentials;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
}, "getHttpAuthExtensionConfiguration");
|
|
166
|
+
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
|
|
167
|
+
return {
|
|
168
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
169
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
170
|
+
credentials: config.credentials()
|
|
171
|
+
};
|
|
172
|
+
}, "resolveHttpAuthRuntimeConfig");
|
|
173
|
+
|
|
174
|
+
// src/runtimeExtensions.ts
|
|
133
175
|
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
134
176
|
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
135
177
|
const extensionConfiguration = {
|
|
136
178
|
...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
137
179
|
...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
138
|
-
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
|
|
180
|
+
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
181
|
+
...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig))
|
|
139
182
|
};
|
|
140
183
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
141
184
|
return {
|
|
142
185
|
...runtimeConfig,
|
|
143
186
|
...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
144
187
|
...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
145
|
-
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
|
|
188
|
+
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
189
|
+
...resolveHttpAuthRuntimeConfig(extensionConfiguration)
|
|
146
190
|
};
|
|
147
191
|
}, "resolveRuntimeExtensions");
|
|
148
192
|
|
|
@@ -155,8 +199,8 @@ var _GroundStationClient = class _GroundStationClient extends import_smithy_clie
|
|
|
155
199
|
const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
|
|
156
200
|
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
|
|
157
201
|
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
158
|
-
const _config_6 = (0,
|
|
159
|
-
const _config_7 = (0,
|
|
202
|
+
const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);
|
|
203
|
+
const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
|
|
160
204
|
const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
|
|
161
205
|
super(_config_8);
|
|
162
206
|
this.config = _config_8;
|
|
@@ -165,8 +209,14 @@ var _GroundStationClient = class _GroundStationClient extends import_smithy_clie
|
|
|
165
209
|
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
166
210
|
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
167
211
|
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
168
|
-
this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
|
|
169
212
|
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
213
|
+
this.middlewareStack.use(
|
|
214
|
+
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
215
|
+
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
|
|
216
|
+
identityProviderConfigProvider: this.getIdentityProviderConfigProvider()
|
|
217
|
+
})
|
|
218
|
+
);
|
|
219
|
+
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
|
|
170
220
|
}
|
|
171
221
|
/**
|
|
172
222
|
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
@@ -176,6 +226,14 @@ var _GroundStationClient = class _GroundStationClient extends import_smithy_clie
|
|
|
176
226
|
destroy() {
|
|
177
227
|
super.destroy();
|
|
178
228
|
}
|
|
229
|
+
getDefaultHttpAuthSchemeParametersProvider() {
|
|
230
|
+
return import_httpAuthSchemeProvider.defaultGroundStationHttpAuthSchemeParametersProvider;
|
|
231
|
+
}
|
|
232
|
+
getIdentityProviderConfigProvider() {
|
|
233
|
+
return async (config) => new import_core.DefaultIdentityProviderConfig({
|
|
234
|
+
"aws.auth#sigv4": config.credentials
|
|
235
|
+
});
|
|
236
|
+
}
|
|
179
237
|
};
|
|
180
238
|
__name(_GroundStationClient, "GroundStationClient");
|
|
181
239
|
var GroundStationClient = _GroundStationClient;
|
|
@@ -190,8 +248,8 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
190
248
|
var import_types = require("@smithy/types");
|
|
191
249
|
|
|
192
250
|
// src/protocols/Aws_restJson1.ts
|
|
193
|
-
var
|
|
194
|
-
|
|
251
|
+
var import_core2 = require("@aws-sdk/core");
|
|
252
|
+
|
|
195
253
|
|
|
196
254
|
|
|
197
255
|
// src/models/GroundStationServiceException.ts
|
|
@@ -462,7 +520,7 @@ var EphemerisSource = {
|
|
|
462
520
|
|
|
463
521
|
// src/protocols/Aws_restJson1.ts
|
|
464
522
|
var se_CancelContactCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
465
|
-
const b = (0,
|
|
523
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
466
524
|
const headers = {};
|
|
467
525
|
b.bp("/contact/{contactId}");
|
|
468
526
|
b.p("contactId", () => input.contactId, "{contactId}", false);
|
|
@@ -471,7 +529,7 @@ var se_CancelContactCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
471
529
|
return b.build();
|
|
472
530
|
}, "se_CancelContactCommand");
|
|
473
531
|
var se_CreateConfigCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
474
|
-
const b = (0,
|
|
532
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
475
533
|
const headers = {
|
|
476
534
|
"content-type": "application/json"
|
|
477
535
|
};
|
|
@@ -488,7 +546,7 @@ var se_CreateConfigCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
488
546
|
return b.build();
|
|
489
547
|
}, "se_CreateConfigCommand");
|
|
490
548
|
var se_CreateDataflowEndpointGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
491
|
-
const b = (0,
|
|
549
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
492
550
|
const headers = {
|
|
493
551
|
"content-type": "application/json"
|
|
494
552
|
};
|
|
@@ -506,7 +564,7 @@ var se_CreateDataflowEndpointGroupCommand = /* @__PURE__ */ __name(async (input,
|
|
|
506
564
|
return b.build();
|
|
507
565
|
}, "se_CreateDataflowEndpointGroupCommand");
|
|
508
566
|
var se_CreateEphemerisCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
509
|
-
const b = (0,
|
|
567
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
510
568
|
const headers = {
|
|
511
569
|
"content-type": "application/json"
|
|
512
570
|
};
|
|
@@ -528,7 +586,7 @@ var se_CreateEphemerisCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
528
586
|
return b.build();
|
|
529
587
|
}, "se_CreateEphemerisCommand");
|
|
530
588
|
var se_CreateMissionProfileCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
531
|
-
const b = (0,
|
|
589
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
532
590
|
const headers = {
|
|
533
591
|
"content-type": "application/json"
|
|
534
592
|
};
|
|
@@ -551,7 +609,7 @@ var se_CreateMissionProfileCommand = /* @__PURE__ */ __name(async (input, contex
|
|
|
551
609
|
return b.build();
|
|
552
610
|
}, "se_CreateMissionProfileCommand");
|
|
553
611
|
var se_DeleteConfigCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
554
|
-
const b = (0,
|
|
612
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
555
613
|
const headers = {};
|
|
556
614
|
b.bp("/config/{configType}/{configId}");
|
|
557
615
|
b.p("configId", () => input.configId, "{configId}", false);
|
|
@@ -561,7 +619,7 @@ var se_DeleteConfigCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
561
619
|
return b.build();
|
|
562
620
|
}, "se_DeleteConfigCommand");
|
|
563
621
|
var se_DeleteDataflowEndpointGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
564
|
-
const b = (0,
|
|
622
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
565
623
|
const headers = {};
|
|
566
624
|
b.bp("/dataflowEndpointGroup/{dataflowEndpointGroupId}");
|
|
567
625
|
b.p("dataflowEndpointGroupId", () => input.dataflowEndpointGroupId, "{dataflowEndpointGroupId}", false);
|
|
@@ -570,7 +628,7 @@ var se_DeleteDataflowEndpointGroupCommand = /* @__PURE__ */ __name(async (input,
|
|
|
570
628
|
return b.build();
|
|
571
629
|
}, "se_DeleteDataflowEndpointGroupCommand");
|
|
572
630
|
var se_DeleteEphemerisCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
573
|
-
const b = (0,
|
|
631
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
574
632
|
const headers = {};
|
|
575
633
|
b.bp("/ephemeris/{ephemerisId}");
|
|
576
634
|
b.p("ephemerisId", () => input.ephemerisId, "{ephemerisId}", false);
|
|
@@ -579,7 +637,7 @@ var se_DeleteEphemerisCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
579
637
|
return b.build();
|
|
580
638
|
}, "se_DeleteEphemerisCommand");
|
|
581
639
|
var se_DeleteMissionProfileCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
582
|
-
const b = (0,
|
|
640
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
583
641
|
const headers = {};
|
|
584
642
|
b.bp("/missionprofile/{missionProfileId}");
|
|
585
643
|
b.p("missionProfileId", () => input.missionProfileId, "{missionProfileId}", false);
|
|
@@ -588,7 +646,7 @@ var se_DeleteMissionProfileCommand = /* @__PURE__ */ __name(async (input, contex
|
|
|
588
646
|
return b.build();
|
|
589
647
|
}, "se_DeleteMissionProfileCommand");
|
|
590
648
|
var se_DescribeContactCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
591
|
-
const b = (0,
|
|
649
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
592
650
|
const headers = {};
|
|
593
651
|
b.bp("/contact/{contactId}");
|
|
594
652
|
b.p("contactId", () => input.contactId, "{contactId}", false);
|
|
@@ -597,7 +655,7 @@ var se_DescribeContactCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
597
655
|
return b.build();
|
|
598
656
|
}, "se_DescribeContactCommand");
|
|
599
657
|
var se_DescribeEphemerisCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
600
|
-
const b = (0,
|
|
658
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
601
659
|
const headers = {};
|
|
602
660
|
b.bp("/ephemeris/{ephemerisId}");
|
|
603
661
|
b.p("ephemerisId", () => input.ephemerisId, "{ephemerisId}", false);
|
|
@@ -606,7 +664,7 @@ var se_DescribeEphemerisCommand = /* @__PURE__ */ __name(async (input, context)
|
|
|
606
664
|
return b.build();
|
|
607
665
|
}, "se_DescribeEphemerisCommand");
|
|
608
666
|
var se_GetAgentConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
609
|
-
const b = (0,
|
|
667
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
610
668
|
const headers = {};
|
|
611
669
|
b.bp("/agent/{agentId}/configuration");
|
|
612
670
|
b.p("agentId", () => input.agentId, "{agentId}", false);
|
|
@@ -615,7 +673,7 @@ var se_GetAgentConfigurationCommand = /* @__PURE__ */ __name(async (input, conte
|
|
|
615
673
|
return b.build();
|
|
616
674
|
}, "se_GetAgentConfigurationCommand");
|
|
617
675
|
var se_GetConfigCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
618
|
-
const b = (0,
|
|
676
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
619
677
|
const headers = {};
|
|
620
678
|
b.bp("/config/{configType}/{configId}");
|
|
621
679
|
b.p("configId", () => input.configId, "{configId}", false);
|
|
@@ -625,7 +683,7 @@ var se_GetConfigCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
625
683
|
return b.build();
|
|
626
684
|
}, "se_GetConfigCommand");
|
|
627
685
|
var se_GetDataflowEndpointGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
628
|
-
const b = (0,
|
|
686
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
629
687
|
const headers = {};
|
|
630
688
|
b.bp("/dataflowEndpointGroup/{dataflowEndpointGroupId}");
|
|
631
689
|
b.p("dataflowEndpointGroupId", () => input.dataflowEndpointGroupId, "{dataflowEndpointGroupId}", false);
|
|
@@ -634,7 +692,7 @@ var se_GetDataflowEndpointGroupCommand = /* @__PURE__ */ __name(async (input, co
|
|
|
634
692
|
return b.build();
|
|
635
693
|
}, "se_GetDataflowEndpointGroupCommand");
|
|
636
694
|
var se_GetMinuteUsageCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
637
|
-
const b = (0,
|
|
695
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
638
696
|
const headers = {
|
|
639
697
|
"content-type": "application/json"
|
|
640
698
|
};
|
|
@@ -650,7 +708,7 @@ var se_GetMinuteUsageCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
650
708
|
return b.build();
|
|
651
709
|
}, "se_GetMinuteUsageCommand");
|
|
652
710
|
var se_GetMissionProfileCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
653
|
-
const b = (0,
|
|
711
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
654
712
|
const headers = {};
|
|
655
713
|
b.bp("/missionprofile/{missionProfileId}");
|
|
656
714
|
b.p("missionProfileId", () => input.missionProfileId, "{missionProfileId}", false);
|
|
@@ -659,7 +717,7 @@ var se_GetMissionProfileCommand = /* @__PURE__ */ __name(async (input, context)
|
|
|
659
717
|
return b.build();
|
|
660
718
|
}, "se_GetMissionProfileCommand");
|
|
661
719
|
var se_GetSatelliteCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
662
|
-
const b = (0,
|
|
720
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
663
721
|
const headers = {};
|
|
664
722
|
b.bp("/satellite/{satelliteId}");
|
|
665
723
|
b.p("satelliteId", () => input.satelliteId, "{satelliteId}", false);
|
|
@@ -668,7 +726,7 @@ var se_GetSatelliteCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
668
726
|
return b.build();
|
|
669
727
|
}, "se_GetSatelliteCommand");
|
|
670
728
|
var se_ListConfigsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
671
|
-
const b = (0,
|
|
729
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
672
730
|
const headers = {};
|
|
673
731
|
b.bp("/config");
|
|
674
732
|
const query = (0, import_smithy_client.map)({
|
|
@@ -680,7 +738,7 @@ var se_ListConfigsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
680
738
|
return b.build();
|
|
681
739
|
}, "se_ListConfigsCommand");
|
|
682
740
|
var se_ListContactsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
683
|
-
const b = (0,
|
|
741
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
684
742
|
const headers = {
|
|
685
743
|
"content-type": "application/json"
|
|
686
744
|
};
|
|
@@ -702,7 +760,7 @@ var se_ListContactsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
702
760
|
return b.build();
|
|
703
761
|
}, "se_ListContactsCommand");
|
|
704
762
|
var se_ListDataflowEndpointGroupsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
705
|
-
const b = (0,
|
|
763
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
706
764
|
const headers = {};
|
|
707
765
|
b.bp("/dataflowEndpointGroup");
|
|
708
766
|
const query = (0, import_smithy_client.map)({
|
|
@@ -714,7 +772,7 @@ var se_ListDataflowEndpointGroupsCommand = /* @__PURE__ */ __name(async (input,
|
|
|
714
772
|
return b.build();
|
|
715
773
|
}, "se_ListDataflowEndpointGroupsCommand");
|
|
716
774
|
var se_ListEphemeridesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
717
|
-
const b = (0,
|
|
775
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
718
776
|
const headers = {
|
|
719
777
|
"content-type": "application/json"
|
|
720
778
|
};
|
|
@@ -736,7 +794,7 @@ var se_ListEphemeridesCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
736
794
|
return b.build();
|
|
737
795
|
}, "se_ListEphemeridesCommand");
|
|
738
796
|
var se_ListGroundStationsCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
739
|
-
const b = (0,
|
|
797
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
740
798
|
const headers = {};
|
|
741
799
|
b.bp("/groundstation");
|
|
742
800
|
const query = (0, import_smithy_client.map)({
|
|
@@ -749,7 +807,7 @@ var se_ListGroundStationsCommand = /* @__PURE__ */ __name(async (input, context)
|
|
|
749
807
|
return b.build();
|
|
750
808
|
}, "se_ListGroundStationsCommand");
|
|
751
809
|
var se_ListMissionProfilesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
752
|
-
const b = (0,
|
|
810
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
753
811
|
const headers = {};
|
|
754
812
|
b.bp("/missionprofile");
|
|
755
813
|
const query = (0, import_smithy_client.map)({
|
|
@@ -761,7 +819,7 @@ var se_ListMissionProfilesCommand = /* @__PURE__ */ __name(async (input, context
|
|
|
761
819
|
return b.build();
|
|
762
820
|
}, "se_ListMissionProfilesCommand");
|
|
763
821
|
var se_ListSatellitesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
764
|
-
const b = (0,
|
|
822
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
765
823
|
const headers = {};
|
|
766
824
|
b.bp("/satellite");
|
|
767
825
|
const query = (0, import_smithy_client.map)({
|
|
@@ -773,7 +831,7 @@ var se_ListSatellitesCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
773
831
|
return b.build();
|
|
774
832
|
}, "se_ListSatellitesCommand");
|
|
775
833
|
var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
776
|
-
const b = (0,
|
|
834
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
777
835
|
const headers = {};
|
|
778
836
|
b.bp("/tags/{resourceArn}");
|
|
779
837
|
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
@@ -782,7 +840,7 @@ var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context
|
|
|
782
840
|
return b.build();
|
|
783
841
|
}, "se_ListTagsForResourceCommand");
|
|
784
842
|
var se_RegisterAgentCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
785
|
-
const b = (0,
|
|
843
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
786
844
|
const headers = {
|
|
787
845
|
"content-type": "application/json"
|
|
788
846
|
};
|
|
@@ -798,7 +856,7 @@ var se_RegisterAgentCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
798
856
|
return b.build();
|
|
799
857
|
}, "se_RegisterAgentCommand");
|
|
800
858
|
var se_ReserveContactCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
801
|
-
const b = (0,
|
|
859
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
802
860
|
const headers = {
|
|
803
861
|
"content-type": "application/json"
|
|
804
862
|
};
|
|
@@ -818,7 +876,7 @@ var se_ReserveContactCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
818
876
|
return b.build();
|
|
819
877
|
}, "se_ReserveContactCommand");
|
|
820
878
|
var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
821
|
-
const b = (0,
|
|
879
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
822
880
|
const headers = {
|
|
823
881
|
"content-type": "application/json"
|
|
824
882
|
};
|
|
@@ -834,7 +892,7 @@ var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
834
892
|
return b.build();
|
|
835
893
|
}, "se_TagResourceCommand");
|
|
836
894
|
var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
837
|
-
const b = (0,
|
|
895
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
838
896
|
const headers = {};
|
|
839
897
|
b.bp("/tags/{resourceArn}");
|
|
840
898
|
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
@@ -849,7 +907,7 @@ var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
849
907
|
return b.build();
|
|
850
908
|
}, "se_UntagResourceCommand");
|
|
851
909
|
var se_UpdateAgentStatusCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
852
|
-
const b = (0,
|
|
910
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
853
911
|
const headers = {
|
|
854
912
|
"content-type": "application/json"
|
|
855
913
|
};
|
|
@@ -867,7 +925,7 @@ var se_UpdateAgentStatusCommand = /* @__PURE__ */ __name(async (input, context)
|
|
|
867
925
|
return b.build();
|
|
868
926
|
}, "se_UpdateAgentStatusCommand");
|
|
869
927
|
var se_UpdateConfigCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
870
|
-
const b = (0,
|
|
928
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
871
929
|
const headers = {
|
|
872
930
|
"content-type": "application/json"
|
|
873
931
|
};
|
|
@@ -885,7 +943,7 @@ var se_UpdateConfigCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
885
943
|
return b.build();
|
|
886
944
|
}, "se_UpdateConfigCommand");
|
|
887
945
|
var se_UpdateEphemerisCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
888
|
-
const b = (0,
|
|
946
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
889
947
|
const headers = {
|
|
890
948
|
"content-type": "application/json"
|
|
891
949
|
};
|
|
@@ -903,7 +961,7 @@ var se_UpdateEphemerisCommand = /* @__PURE__ */ __name(async (input, context) =>
|
|
|
903
961
|
return b.build();
|
|
904
962
|
}, "se_UpdateEphemerisCommand");
|
|
905
963
|
var se_UpdateMissionProfileCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
906
|
-
const b = (0,
|
|
964
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
907
965
|
const headers = {
|
|
908
966
|
"content-type": "application/json"
|
|
909
967
|
};
|
|
@@ -1099,7 +1157,7 @@ var de_DescribeEphemerisCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1099
1157
|
priority: import_smithy_client.expectInt32,
|
|
1100
1158
|
satelliteId: import_smithy_client.expectString,
|
|
1101
1159
|
status: import_smithy_client.expectString,
|
|
1102
|
-
suppliedData: (_) => (0, import_smithy_client._json)((0,
|
|
1160
|
+
suppliedData: (_) => (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(_)),
|
|
1103
1161
|
tags: import_smithy_client._json
|
|
1104
1162
|
});
|
|
1105
1163
|
Object.assign(contents, doc);
|
|
@@ -1130,7 +1188,7 @@ var de_GetConfigCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1130
1188
|
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
1131
1189
|
const doc = (0, import_smithy_client.take)(data, {
|
|
1132
1190
|
configArn: import_smithy_client.expectString,
|
|
1133
|
-
configData: (_) => de_ConfigTypeData((0,
|
|
1191
|
+
configData: (_) => de_ConfigTypeData((0, import_core2.awsExpectUnion)(_), context),
|
|
1134
1192
|
configId: import_smithy_client.expectString,
|
|
1135
1193
|
configType: import_smithy_client.expectString,
|
|
1136
1194
|
name: import_smithy_client.expectString,
|
|
@@ -1193,7 +1251,7 @@ var de_GetMissionProfileCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
1193
1251
|
missionProfileId: import_smithy_client.expectString,
|
|
1194
1252
|
name: import_smithy_client.expectString,
|
|
1195
1253
|
region: import_smithy_client.expectString,
|
|
1196
|
-
streamsKmsKey: (_) => (0, import_smithy_client._json)((0,
|
|
1254
|
+
streamsKmsKey: (_) => (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(_)),
|
|
1197
1255
|
streamsKmsRole: import_smithy_client.expectString,
|
|
1198
1256
|
tags: import_smithy_client._json,
|
|
1199
1257
|
trackingConfigArn: import_smithy_client.expectString
|
|
@@ -2435,32 +2493,32 @@ var GroundStation = _GroundStation;
|
|
|
2435
2493
|
(0, import_smithy_client.createAggregatedClient)(commands, GroundStation);
|
|
2436
2494
|
|
|
2437
2495
|
// src/pagination/ListConfigsPaginator.ts
|
|
2438
|
-
|
|
2439
|
-
var paginateListConfigs = (0,
|
|
2496
|
+
|
|
2497
|
+
var paginateListConfigs = (0, import_core.createPaginator)(GroundStationClient, ListConfigsCommand, "nextToken", "nextToken", "maxResults");
|
|
2440
2498
|
|
|
2441
2499
|
// src/pagination/ListContactsPaginator.ts
|
|
2442
|
-
|
|
2443
|
-
var paginateListContacts = (0,
|
|
2500
|
+
|
|
2501
|
+
var paginateListContacts = (0, import_core.createPaginator)(GroundStationClient, ListContactsCommand, "nextToken", "nextToken", "maxResults");
|
|
2444
2502
|
|
|
2445
2503
|
// src/pagination/ListDataflowEndpointGroupsPaginator.ts
|
|
2446
|
-
|
|
2447
|
-
var paginateListDataflowEndpointGroups = (0,
|
|
2504
|
+
|
|
2505
|
+
var paginateListDataflowEndpointGroups = (0, import_core.createPaginator)(GroundStationClient, ListDataflowEndpointGroupsCommand, "nextToken", "nextToken", "maxResults");
|
|
2448
2506
|
|
|
2449
2507
|
// src/pagination/ListEphemeridesPaginator.ts
|
|
2450
|
-
|
|
2451
|
-
var paginateListEphemerides = (0,
|
|
2508
|
+
|
|
2509
|
+
var paginateListEphemerides = (0, import_core.createPaginator)(GroundStationClient, ListEphemeridesCommand, "nextToken", "nextToken", "maxResults");
|
|
2452
2510
|
|
|
2453
2511
|
// src/pagination/ListGroundStationsPaginator.ts
|
|
2454
|
-
|
|
2455
|
-
var paginateListGroundStations = (0,
|
|
2512
|
+
|
|
2513
|
+
var paginateListGroundStations = (0, import_core.createPaginator)(GroundStationClient, ListGroundStationsCommand, "nextToken", "nextToken", "maxResults");
|
|
2456
2514
|
|
|
2457
2515
|
// src/pagination/ListMissionProfilesPaginator.ts
|
|
2458
|
-
|
|
2459
|
-
var paginateListMissionProfiles = (0,
|
|
2516
|
+
|
|
2517
|
+
var paginateListMissionProfiles = (0, import_core.createPaginator)(GroundStationClient, ListMissionProfilesCommand, "nextToken", "nextToken", "maxResults");
|
|
2460
2518
|
|
|
2461
2519
|
// src/pagination/ListSatellitesPaginator.ts
|
|
2462
|
-
|
|
2463
|
-
var paginateListSatellites = (0,
|
|
2520
|
+
|
|
2521
|
+
var paginateListSatellites = (0, import_core.createPaginator)(GroundStationClient, ListSatellitesCommand, "nextToken", "nextToken", "maxResults");
|
|
2464
2522
|
|
|
2465
2523
|
// src/waiters/waitForContactScheduled.ts
|
|
2466
2524
|
var import_util_waiter = require("@smithy/util-waiter");
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
|
4
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
6
|
const url_parser_1 = require("@smithy/url-parser");
|
|
6
7
|
const util_base64_1 = require("@smithy/util-base64");
|
|
7
8
|
const util_utf8_1 = require("@smithy/util-utf8");
|
|
9
|
+
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
|
|
8
10
|
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
9
11
|
const getRuntimeConfig = (config) => {
|
|
10
12
|
return {
|
|
@@ -14,6 +16,14 @@ const getRuntimeConfig = (config) => {
|
|
|
14
16
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
15
17
|
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
16
18
|
extensions: config?.extensions ?? [],
|
|
19
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultGroundStationHttpAuthSchemeProvider,
|
|
20
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
21
|
+
{
|
|
22
|
+
schemeId: "aws.auth#sigv4",
|
|
23
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
24
|
+
signer: new core_1.AwsSdkSigV4Signer(),
|
|
25
|
+
},
|
|
26
|
+
],
|
|
17
27
|
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
18
28
|
serviceId: config?.serviceId ?? "GroundStation",
|
|
19
29
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
2
2
|
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
|
3
3
|
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
|
|
4
|
-
import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
|
|
5
4
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
6
5
|
import { resolveRegionConfig } from "@smithy/config-resolver";
|
|
6
|
+
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
7
7
|
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
8
8
|
import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
|
|
9
9
|
import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
|
|
10
10
|
import { Client as __Client, } from "@smithy/smithy-client";
|
|
11
|
+
import { defaultGroundStationHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
|
|
11
12
|
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
|
12
13
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
13
14
|
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
|
@@ -20,8 +21,8 @@ export class GroundStationClient extends __Client {
|
|
|
20
21
|
const _config_3 = resolveEndpointConfig(_config_2);
|
|
21
22
|
const _config_4 = resolveRetryConfig(_config_3);
|
|
22
23
|
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
23
|
-
const _config_6 =
|
|
24
|
-
const _config_7 =
|
|
24
|
+
const _config_6 = resolveUserAgentConfig(_config_5);
|
|
25
|
+
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
25
26
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
26
27
|
super(_config_8);
|
|
27
28
|
this.config = _config_8;
|
|
@@ -30,10 +31,22 @@ export class GroundStationClient extends __Client {
|
|
|
30
31
|
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
31
32
|
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
32
33
|
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
33
|
-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
34
34
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
35
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
36
|
+
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
|
|
37
|
+
identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
|
|
38
|
+
}));
|
|
39
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
35
40
|
}
|
|
36
41
|
destroy() {
|
|
37
42
|
super.destroy();
|
|
38
43
|
}
|
|
44
|
+
getDefaultHttpAuthSchemeParametersProvider() {
|
|
45
|
+
return defaultGroundStationHttpAuthSchemeParametersProvider;
|
|
46
|
+
}
|
|
47
|
+
getIdentityProviderConfigProvider() {
|
|
48
|
+
return async (config) => new DefaultIdentityProviderConfig({
|
|
49
|
+
"aws.auth#sigv4": config.credentials,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
39
52
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
2
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
3
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
4
|
+
let _credentials = runtimeConfig.credentials;
|
|
5
|
+
return {
|
|
6
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
7
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
8
|
+
if (index === -1) {
|
|
9
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
httpAuthSchemes() {
|
|
16
|
+
return _httpAuthSchemes;
|
|
17
|
+
},
|
|
18
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
19
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
20
|
+
},
|
|
21
|
+
httpAuthSchemeProvider() {
|
|
22
|
+
return _httpAuthSchemeProvider;
|
|
23
|
+
},
|
|
24
|
+
setCredentials(credentials) {
|
|
25
|
+
_credentials = credentials;
|
|
26
|
+
},
|
|
27
|
+
credentials() {
|
|
28
|
+
return _credentials;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export const resolveHttpAuthRuntimeConfig = (config) => {
|
|
33
|
+
return {
|
|
34
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
35
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
36
|
+
credentials: config.credentials(),
|
|
37
|
+
};
|
|
38
|
+
};
|