@aws-sdk/client-rekognitionstreaming 3.621.0 → 3.622.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/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/index.js +84 -30
- package/dist-cjs/runtimeConfig.shared.js +10 -0
- package/dist-es/RekognitionStreamingClient.js +21 -14
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/StartFaceLivenessSessionCommand.js +3 -1
- package/dist-es/runtimeConfig.shared.js +10 -0
- package/dist-es/runtimeExtensions.js +3 -0
- package/dist-types/RekognitionStreamingClient.d.ts +15 -14
- 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 +7 -7
- package/dist-types/runtimeConfig.d.ts +5 -3
- package/dist-types/runtimeConfig.native.d.ts +6 -4
- package/dist-types/runtimeConfig.shared.d.ts +2 -0
- package/dist-types/ts3.4/RekognitionStreamingClient.d.ts +18 -20
- 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 +9 -9
- package/dist-types/ts3.4/runtimeConfig.d.ts +8 -8
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +11 -11
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -0
- package/package.json +11 -11
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveHttpAuthSchemeConfig = exports.defaultRekognitionStreamingHttpAuthSchemeProvider = exports.defaultRekognitionStreamingHttpAuthSchemeParametersProvider = void 0;
|
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const util_middleware_1 = require("@smithy/util-middleware");
|
|
6
|
+
const defaultRekognitionStreamingHttpAuthSchemeParametersProvider = 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.defaultRekognitionStreamingHttpAuthSchemeParametersProvider = defaultRekognitionStreamingHttpAuthSchemeParametersProvider;
|
|
16
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
17
|
+
return {
|
|
18
|
+
schemeId: "aws.auth#sigv4",
|
|
19
|
+
signingProperties: {
|
|
20
|
+
name: "rekognition",
|
|
21
|
+
region: authParameters.region,
|
|
22
|
+
},
|
|
23
|
+
propertiesExtractor: (config, context) => ({
|
|
24
|
+
signingProperties: {
|
|
25
|
+
config,
|
|
26
|
+
context,
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const defaultRekognitionStreamingHttpAuthSchemeProvider = (authParameters) => {
|
|
32
|
+
const options = [];
|
|
33
|
+
switch (authParameters.operation) {
|
|
34
|
+
default: {
|
|
35
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return options;
|
|
39
|
+
};
|
|
40
|
+
exports.defaultRekognitionStreamingHttpAuthSchemeProvider = defaultRekognitionStreamingHttpAuthSchemeProvider;
|
|
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
|
@@ -51,15 +51,16 @@ var import_middleware_eventstream = require("@aws-sdk/middleware-eventstream");
|
|
|
51
51
|
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
52
52
|
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
53
53
|
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
54
|
-
var import_middleware_signing = require("@aws-sdk/middleware-signing");
|
|
55
54
|
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
56
55
|
var import_middleware_websocket = require("@aws-sdk/middleware-websocket");
|
|
57
56
|
var import_config_resolver = require("@smithy/config-resolver");
|
|
57
|
+
var import_core = require("@smithy/core");
|
|
58
58
|
var import_eventstream_serde_config_resolver = require("@smithy/eventstream-serde-config-resolver");
|
|
59
59
|
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
60
60
|
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
61
61
|
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
62
62
|
|
|
63
|
+
var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
|
|
63
64
|
|
|
64
65
|
// src/endpoint/EndpointParameters.ts
|
|
65
66
|
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
@@ -84,19 +85,62 @@ var import_runtimeConfig = require("././runtimeConfig");
|
|
|
84
85
|
var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
|
|
85
86
|
var import_protocol_http = require("@smithy/protocol-http");
|
|
86
87
|
var import_smithy_client = require("@smithy/smithy-client");
|
|
88
|
+
|
|
89
|
+
// src/auth/httpAuthExtensionConfiguration.ts
|
|
90
|
+
var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
|
|
91
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
92
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
93
|
+
let _credentials = runtimeConfig.credentials;
|
|
94
|
+
return {
|
|
95
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
96
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
97
|
+
if (index === -1) {
|
|
98
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
99
|
+
} else {
|
|
100
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
httpAuthSchemes() {
|
|
104
|
+
return _httpAuthSchemes;
|
|
105
|
+
},
|
|
106
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
107
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
108
|
+
},
|
|
109
|
+
httpAuthSchemeProvider() {
|
|
110
|
+
return _httpAuthSchemeProvider;
|
|
111
|
+
},
|
|
112
|
+
setCredentials(credentials) {
|
|
113
|
+
_credentials = credentials;
|
|
114
|
+
},
|
|
115
|
+
credentials() {
|
|
116
|
+
return _credentials;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}, "getHttpAuthExtensionConfiguration");
|
|
120
|
+
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
|
|
121
|
+
return {
|
|
122
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
123
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
124
|
+
credentials: config.credentials()
|
|
125
|
+
};
|
|
126
|
+
}, "resolveHttpAuthRuntimeConfig");
|
|
127
|
+
|
|
128
|
+
// src/runtimeExtensions.ts
|
|
87
129
|
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
88
130
|
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
89
131
|
const extensionConfiguration = {
|
|
90
132
|
...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
91
133
|
...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
92
|
-
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
|
|
134
|
+
...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
135
|
+
...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig))
|
|
93
136
|
};
|
|
94
137
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
95
138
|
return {
|
|
96
139
|
...runtimeConfig,
|
|
97
140
|
...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
98
141
|
...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
99
|
-
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
|
|
142
|
+
...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
143
|
+
...resolveHttpAuthRuntimeConfig(extensionConfiguration)
|
|
100
144
|
};
|
|
101
145
|
}, "resolveRuntimeExtensions");
|
|
102
146
|
|
|
@@ -105,25 +149,33 @@ var _RekognitionStreamingClient = class _RekognitionStreamingClient extends impo
|
|
|
105
149
|
constructor(...[configuration]) {
|
|
106
150
|
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
107
151
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
108
|
-
const _config_2 = (0,
|
|
109
|
-
const _config_3 = (0,
|
|
110
|
-
const _config_4 = (0,
|
|
111
|
-
const _config_5 = (0,
|
|
112
|
-
const _config_6 = (0,
|
|
113
|
-
const _config_7 = (0,
|
|
114
|
-
const _config_8 = (0,
|
|
115
|
-
const _config_9 = (0,
|
|
116
|
-
const _config_10 = (0,
|
|
152
|
+
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
|
|
153
|
+
const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
|
|
154
|
+
const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
|
|
155
|
+
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
156
|
+
const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
|
|
157
|
+
const _config_7 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_6);
|
|
158
|
+
const _config_8 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_7);
|
|
159
|
+
const _config_9 = (0, import_middleware_eventstream.resolveEventStreamConfig)(_config_8);
|
|
160
|
+
const _config_10 = (0, import_middleware_websocket.resolveWebSocketConfig)(_config_9);
|
|
117
161
|
const _config_11 = resolveRuntimeExtensions(_config_10, (configuration == null ? void 0 : configuration.extensions) || []);
|
|
118
162
|
super(_config_11);
|
|
119
163
|
this.config = _config_11;
|
|
120
|
-
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
121
|
-
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
122
|
-
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
123
|
-
this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
|
|
124
164
|
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
125
165
|
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
126
166
|
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
167
|
+
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
168
|
+
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
169
|
+
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
170
|
+
this.middlewareStack.use(
|
|
171
|
+
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
172
|
+
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultRekognitionStreamingHttpAuthSchemeParametersProvider,
|
|
173
|
+
identityProviderConfigProvider: async (config) => new import_core.DefaultIdentityProviderConfig({
|
|
174
|
+
"aws.auth#sigv4": config.credentials
|
|
175
|
+
})
|
|
176
|
+
})
|
|
177
|
+
);
|
|
178
|
+
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
|
|
127
179
|
}
|
|
128
180
|
/**
|
|
129
181
|
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
@@ -380,11 +432,11 @@ var StartFaceLivenessSessionResponseFilterSensitiveLog = /* @__PURE__ */ __name(
|
|
|
380
432
|
}), "StartFaceLivenessSessionResponseFilterSensitiveLog");
|
|
381
433
|
|
|
382
434
|
// src/protocols/Aws_restJson1.ts
|
|
383
|
-
var
|
|
384
|
-
|
|
435
|
+
var import_core2 = require("@aws-sdk/core");
|
|
436
|
+
|
|
385
437
|
|
|
386
438
|
var se_StartFaceLivenessSessionCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
387
|
-
const b = (0,
|
|
439
|
+
const b = (0, import_core.requestBuilder)(input, context);
|
|
388
440
|
const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
|
|
389
441
|
"content-type": "application/json",
|
|
390
442
|
[_xarslsi]: input[_SI],
|
|
@@ -415,9 +467,9 @@ var de_StartFaceLivenessSessionCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
415
467
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
416
468
|
const parsedOutput = {
|
|
417
469
|
...output,
|
|
418
|
-
body: await (0,
|
|
470
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
419
471
|
};
|
|
420
|
-
const errorCode = (0,
|
|
472
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
421
473
|
switch (errorCode) {
|
|
422
474
|
case "AccessDeniedException":
|
|
423
475
|
case "com.amazonaws.rekognitionstreaming#AccessDeniedException":
|
|
@@ -629,48 +681,48 @@ var de_LivenessResponseStream = /* @__PURE__ */ __name((output, context) => {
|
|
|
629
681
|
}, "de_LivenessResponseStream");
|
|
630
682
|
var de_DisconnectionEvent_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
631
683
|
const contents = {};
|
|
632
|
-
const data = await (0,
|
|
684
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
633
685
|
Object.assign(contents, (0, import_smithy_client._json)(data));
|
|
634
686
|
return contents;
|
|
635
687
|
}, "de_DisconnectionEvent_event");
|
|
636
688
|
var de_InternalServerException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
637
689
|
const parsedOutput = {
|
|
638
690
|
...output,
|
|
639
|
-
body: await (0,
|
|
691
|
+
body: await (0, import_core2.parseJsonBody)(output.body, context)
|
|
640
692
|
};
|
|
641
693
|
return de_InternalServerExceptionRes(parsedOutput, context);
|
|
642
694
|
}, "de_InternalServerException_event");
|
|
643
695
|
var de_ServerSessionInformationEvent_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
644
696
|
const contents = {};
|
|
645
|
-
const data = await (0,
|
|
697
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
646
698
|
Object.assign(contents, de_ServerSessionInformationEvent(data, context));
|
|
647
699
|
return contents;
|
|
648
700
|
}, "de_ServerSessionInformationEvent_event");
|
|
649
701
|
var de_ServiceQuotaExceededException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
650
702
|
const parsedOutput = {
|
|
651
703
|
...output,
|
|
652
|
-
body: await (0,
|
|
704
|
+
body: await (0, import_core2.parseJsonBody)(output.body, context)
|
|
653
705
|
};
|
|
654
706
|
return de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
655
707
|
}, "de_ServiceQuotaExceededException_event");
|
|
656
708
|
var de_ServiceUnavailableException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
657
709
|
const parsedOutput = {
|
|
658
710
|
...output,
|
|
659
|
-
body: await (0,
|
|
711
|
+
body: await (0, import_core2.parseJsonBody)(output.body, context)
|
|
660
712
|
};
|
|
661
713
|
return de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
662
714
|
}, "de_ServiceUnavailableException_event");
|
|
663
715
|
var de_ThrottlingException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
664
716
|
const parsedOutput = {
|
|
665
717
|
...output,
|
|
666
|
-
body: await (0,
|
|
718
|
+
body: await (0, import_core2.parseJsonBody)(output.body, context)
|
|
667
719
|
};
|
|
668
720
|
return de_ThrottlingExceptionRes(parsedOutput, context);
|
|
669
721
|
}, "de_ThrottlingException_event");
|
|
670
722
|
var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
671
723
|
const parsedOutput = {
|
|
672
724
|
...output,
|
|
673
|
-
body: await (0,
|
|
725
|
+
body: await (0, import_core2.parseJsonBody)(output.body, context)
|
|
674
726
|
};
|
|
675
727
|
return de_ValidationExceptionRes(parsedOutput, context);
|
|
676
728
|
}, "de_ValidationException_event");
|
|
@@ -786,7 +838,7 @@ var de_ServerSessionInformationEvent = /* @__PURE__ */ __name((output, context)
|
|
|
786
838
|
}, "de_ServerSessionInformationEvent");
|
|
787
839
|
var de_SessionInformation = /* @__PURE__ */ __name((output, context) => {
|
|
788
840
|
return (0, import_smithy_client.take)(output, {
|
|
789
|
-
Challenge: (_) => de_ServerChallenge((0,
|
|
841
|
+
Challenge: (_) => de_ServerChallenge((0, import_core2.awsExpectUnion)(_), context)
|
|
790
842
|
});
|
|
791
843
|
}, "de_SessionInformation");
|
|
792
844
|
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
@@ -813,7 +865,9 @@ var _StartFaceLivenessSessionCommand = class _StartFaceLivenessSessionCommand ex
|
|
|
813
865
|
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
814
866
|
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
|
|
815
867
|
(0, import_middleware_eventstream.getEventStreamPlugin)(config),
|
|
816
|
-
(0, import_middleware_websocket.getWebSocketPlugin)(config, {
|
|
868
|
+
(0, import_middleware_websocket.getWebSocketPlugin)(config, {
|
|
869
|
+
headerPrefix: "x-amz-rekognition-streaming-liveness-"
|
|
870
|
+
})
|
|
817
871
|
];
|
|
818
872
|
}).s("RekognitionStreamingService", "StartFaceLivenessSession", {
|
|
819
873
|
/**
|
|
@@ -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.defaultRekognitionStreamingHttpAuthSchemeProvider,
|
|
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 ?? "RekognitionStreaming",
|
|
19
29
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
@@ -2,15 +2,16 @@ import { resolveEventStreamConfig, } from "@aws-sdk/middleware-eventstream";
|
|
|
2
2
|
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
3
3
|
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
|
4
4
|
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
|
|
5
|
-
import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
|
|
6
5
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
7
6
|
import { resolveWebSocketConfig } from "@aws-sdk/middleware-websocket";
|
|
8
7
|
import { resolveRegionConfig } from "@smithy/config-resolver";
|
|
8
|
+
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
9
9
|
import { resolveEventStreamSerdeConfig, } from "@smithy/eventstream-serde-config-resolver";
|
|
10
10
|
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
11
11
|
import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
|
|
12
12
|
import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
|
|
13
13
|
import { Client as __Client, } from "@smithy/smithy-client";
|
|
14
|
+
import { defaultRekognitionStreamingHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
|
|
14
15
|
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
|
15
16
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
16
17
|
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
|
@@ -19,25 +20,31 @@ export class RekognitionStreamingClient extends __Client {
|
|
|
19
20
|
constructor(...[configuration]) {
|
|
20
21
|
const _config_0 = __getRuntimeConfig(configuration || {});
|
|
21
22
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
22
|
-
const _config_2 =
|
|
23
|
-
const _config_3 =
|
|
24
|
-
const _config_4 =
|
|
25
|
-
const _config_5 =
|
|
26
|
-
const _config_6 =
|
|
27
|
-
const _config_7 =
|
|
28
|
-
const _config_8 =
|
|
29
|
-
const _config_9 =
|
|
30
|
-
const _config_10 =
|
|
23
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
24
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
25
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
|
26
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
27
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
|
28
|
+
const _config_7 = resolveEventStreamSerdeConfig(_config_6);
|
|
29
|
+
const _config_8 = resolveHttpAuthSchemeConfig(_config_7);
|
|
30
|
+
const _config_9 = resolveEventStreamConfig(_config_8);
|
|
31
|
+
const _config_10 = resolveWebSocketConfig(_config_9);
|
|
31
32
|
const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []);
|
|
32
33
|
super(_config_11);
|
|
33
34
|
this.config = _config_11;
|
|
34
|
-
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
35
|
-
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
36
|
-
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
37
|
-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
38
35
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
39
36
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
40
37
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
38
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
39
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
40
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
41
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
42
|
+
httpAuthSchemeParametersProvider: defaultRekognitionStreamingHttpAuthSchemeParametersProvider,
|
|
43
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
44
|
+
"aws.auth#sigv4": config.credentials,
|
|
45
|
+
}),
|
|
46
|
+
}));
|
|
47
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
41
48
|
}
|
|
42
49
|
destroy() {
|
|
43
50
|
super.destroy();
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
|
|
2
|
+
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
|
|
3
|
+
export const defaultRekognitionStreamingHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
4
|
+
return {
|
|
5
|
+
operation: getSmithyContext(context).operation,
|
|
6
|
+
region: (await normalizeProvider(config.region)()) ||
|
|
7
|
+
(() => {
|
|
8
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
9
|
+
})(),
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
13
|
+
return {
|
|
14
|
+
schemeId: "aws.auth#sigv4",
|
|
15
|
+
signingProperties: {
|
|
16
|
+
name: "rekognition",
|
|
17
|
+
region: authParameters.region,
|
|
18
|
+
},
|
|
19
|
+
propertiesExtractor: (config, context) => ({
|
|
20
|
+
signingProperties: {
|
|
21
|
+
config,
|
|
22
|
+
context,
|
|
23
|
+
},
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export const defaultRekognitionStreamingHttpAuthSchemeProvider = (authParameters) => {
|
|
28
|
+
const options = [];
|
|
29
|
+
switch (authParameters.operation) {
|
|
30
|
+
default: {
|
|
31
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return options;
|
|
35
|
+
};
|
|
36
|
+
export const resolveHttpAuthSchemeConfig = (config) => {
|
|
37
|
+
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
38
|
+
return {
|
|
39
|
+
...config_0,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -17,7 +17,9 @@ export class StartFaceLivenessSessionCommand extends $Command
|
|
|
17
17
|
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
18
18
|
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
19
19
|
getEventStreamPlugin(config),
|
|
20
|
-
getWebSocketPlugin(config, {
|
|
20
|
+
getWebSocketPlugin(config, {
|
|
21
|
+
headerPrefix: "x-amz-rekognition-streaming-liveness-",
|
|
22
|
+
}),
|
|
21
23
|
];
|
|
22
24
|
})
|
|
23
25
|
.s("RekognitionStreamingService", "StartFaceLivenessSession", {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
1
2
|
import { NoOpLogger } from "@smithy/smithy-client";
|
|
2
3
|
import { parseUrl } from "@smithy/url-parser";
|
|
3
4
|
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
4
5
|
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
6
|
+
import { defaultRekognitionStreamingHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
5
7
|
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
6
8
|
export const getRuntimeConfig = (config) => {
|
|
7
9
|
return {
|
|
@@ -11,6 +13,14 @@ export const getRuntimeConfig = (config) => {
|
|
|
11
13
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
12
14
|
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
13
15
|
extensions: config?.extensions ?? [],
|
|
16
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultRekognitionStreamingHttpAuthSchemeProvider,
|
|
17
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
18
|
+
{
|
|
19
|
+
schemeId: "aws.auth#sigv4",
|
|
20
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
21
|
+
signer: new AwsSdkSigV4Signer(),
|
|
22
|
+
},
|
|
23
|
+
],
|
|
14
24
|
logger: config?.logger ?? new NoOpLogger(),
|
|
15
25
|
serviceId: config?.serviceId ?? "RekognitionStreaming",
|
|
16
26
|
urlParser: config?.urlParser ?? parseUrl,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
|
2
2
|
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
3
3
|
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
4
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
4
5
|
const asPartial = (t) => t;
|
|
5
6
|
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
7
|
const extensionConfiguration = {
|
|
7
8
|
...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
|
|
8
9
|
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
|
9
10
|
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
|
11
|
+
...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
|
|
10
12
|
};
|
|
11
13
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
12
14
|
return {
|
|
@@ -14,5 +16,6 @@ export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
|
14
16
|
...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
|
|
15
17
|
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
|
16
18
|
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
|
19
|
+
...resolveHttpAuthRuntimeConfig(extensionConfiguration),
|
|
17
20
|
};
|
|
18
21
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { EventStreamInputConfig, EventStreamResolvedConfig } from "@aws-sdk/middleware-eventstream";
|
|
2
2
|
import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
3
|
-
import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
|
|
4
3
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
5
4
|
import { WebSocketInputConfig, WebSocketResolvedConfig } from "@aws-sdk/middleware-websocket";
|
|
6
|
-
import {
|
|
5
|
+
import { EventStreamPayloadHandlerProvider as __EventStreamPayloadHandlerProvider } from "@aws-sdk/types";
|
|
7
6
|
import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
|
|
8
7
|
import { EventStreamSerdeInputConfig, EventStreamSerdeResolvedConfig } from "@smithy/eventstream-serde-config-resolver";
|
|
9
8
|
import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
|
|
10
9
|
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
11
10
|
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
12
11
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
13
|
-
import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, EventStreamSerdeProvider as __EventStreamSerdeProvider, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
12
|
+
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, EventStreamSerdeProvider as __EventStreamSerdeProvider, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
13
|
+
import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
14
14
|
import { StartFaceLivenessSessionCommandInput, StartFaceLivenessSessionCommandOutput } from "./commands/StartFaceLivenessSessionCommand";
|
|
15
15
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
16
16
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
@@ -100,20 +100,16 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
|
|
|
100
100
|
*/
|
|
101
101
|
region?: string | __Provider<string>;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
104
|
-
* @internal
|
|
105
|
-
*/
|
|
106
|
-
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
|
|
107
|
-
/**
|
|
108
|
-
* The function that provides necessary utilities for handling request event stream.
|
|
103
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
109
104
|
* @internal
|
|
110
105
|
*/
|
|
111
|
-
|
|
106
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
112
107
|
/**
|
|
113
|
-
*
|
|
108
|
+
* Default credentials provider; Not available in browser runtime.
|
|
109
|
+
* @deprecated
|
|
114
110
|
* @internal
|
|
115
111
|
*/
|
|
116
|
-
|
|
112
|
+
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
|
|
117
113
|
/**
|
|
118
114
|
* Value for how many times a request will be made at most in case of retry.
|
|
119
115
|
*/
|
|
@@ -140,11 +136,16 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
|
|
|
140
136
|
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
141
137
|
*/
|
|
142
138
|
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
139
|
+
/**
|
|
140
|
+
* The function that provides necessary utilities for handling request event stream.
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
143
|
+
eventStreamPayloadHandlerProvider?: __EventStreamPayloadHandlerProvider;
|
|
143
144
|
}
|
|
144
145
|
/**
|
|
145
146
|
* @public
|
|
146
147
|
*/
|
|
147
|
-
export type RekognitionStreamingClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults &
|
|
148
|
+
export type RekognitionStreamingClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & EventStreamSerdeInputConfig & HttpAuthSchemeInputConfig & EventStreamInputConfig & WebSocketInputConfig & ClientInputEndpointParameters;
|
|
148
149
|
/**
|
|
149
150
|
* @public
|
|
150
151
|
*
|
|
@@ -155,7 +156,7 @@ export interface RekognitionStreamingClientConfig extends RekognitionStreamingCl
|
|
|
155
156
|
/**
|
|
156
157
|
* @public
|
|
157
158
|
*/
|
|
158
|
-
export type RekognitionStreamingClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig &
|
|
159
|
+
export type RekognitionStreamingClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & EventStreamSerdeResolvedConfig & HttpAuthSchemeResolvedConfig & EventStreamResolvedConfig & WebSocketResolvedConfig & ClientResolvedEndpointParameters;
|
|
159
160
|
/**
|
|
160
161
|
* @public
|
|
161
162
|
*
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
|
|
2
|
+
import { RekognitionStreamingHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface HttpAuthExtensionConfiguration {
|
|
7
|
+
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
|
|
8
|
+
httpAuthSchemes(): HttpAuthScheme[];
|
|
9
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider: RekognitionStreamingHttpAuthSchemeProvider): void;
|
|
10
|
+
httpAuthSchemeProvider(): RekognitionStreamingHttpAuthSchemeProvider;
|
|
11
|
+
setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
|
|
12
|
+
credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export type HttpAuthRuntimeConfig = Partial<{
|
|
18
|
+
httpAuthSchemes: HttpAuthScheme[];
|
|
19
|
+
httpAuthSchemeProvider: RekognitionStreamingHttpAuthSchemeProvider;
|
|
20
|
+
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core";
|
|
2
|
+
import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider } from "@smithy/types";
|
|
3
|
+
import { RekognitionStreamingClientResolvedConfig } from "../RekognitionStreamingClient";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface RekognitionStreamingHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
|
|
8
|
+
region?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export interface RekognitionStreamingHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<RekognitionStreamingClientResolvedConfig, HandlerExecutionContext, RekognitionStreamingHttpAuthSchemeParameters, object> {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const defaultRekognitionStreamingHttpAuthSchemeParametersProvider: (config: RekognitionStreamingClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise<RekognitionStreamingHttpAuthSchemeParameters>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export interface RekognitionStreamingHttpAuthSchemeProvider extends HttpAuthSchemeProvider<RekognitionStreamingHttpAuthSchemeParameters> {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare const defaultRekognitionStreamingHttpAuthSchemeProvider: RekognitionStreamingHttpAuthSchemeProvider;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
|
|
32
|
+
/**
|
|
33
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
httpAuthSchemes?: HttpAuthScheme[];
|
|
37
|
+
/**
|
|
38
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
httpAuthSchemeProvider?: RekognitionStreamingHttpAuthSchemeProvider;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
|
|
47
|
+
/**
|
|
48
|
+
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
readonly httpAuthSchemes: HttpAuthScheme[];
|
|
52
|
+
/**
|
|
53
|
+
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
readonly httpAuthSchemeProvider: RekognitionStreamingHttpAuthSchemeProvider;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
|
|
2
2
|
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
|
|
3
3
|
import { DefaultExtensionConfiguration } from "@smithy/types";
|
|
4
|
+
import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
|
|
4
5
|
/**
|
|
5
6
|
* @internal
|
|
6
7
|
*/
|
|
7
|
-
export interface RekognitionStreamingExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration {
|
|
8
|
+
export interface RekognitionStreamingExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {
|
|
8
9
|
}
|
|
@@ -7,7 +7,7 @@ export declare const getRuntimeConfig: (config: RekognitionStreamingClientConfig
|
|
|
7
7
|
runtime: string;
|
|
8
8
|
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
|
|
9
9
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
10
|
-
credentialDefaultProvider: (input: any) => import("@smithy/types").
|
|
10
|
+
credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider;
|
|
11
11
|
defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
|
|
12
12
|
eventStreamPayloadHandlerProvider: import("@smithy/types").EventStreamPayloadHandlerProvider;
|
|
13
13
|
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|
|
@@ -29,19 +29,19 @@ export declare const getRuntimeConfig: (config: RekognitionStreamingClientConfig
|
|
|
29
29
|
serviceId: string;
|
|
30
30
|
logger: import("@smithy/types").Logger;
|
|
31
31
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
32
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
33
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
32
34
|
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
33
35
|
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
34
36
|
logger?: import("@smithy/types").Logger | undefined;
|
|
35
37
|
}) => import("@smithy/types").EndpointV2;
|
|
36
38
|
tls?: boolean | undefined;
|
|
37
|
-
|
|
39
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
40
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").RekognitionStreamingHttpAuthSchemeProvider;
|
|
41
|
+
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
|
|
38
42
|
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise<import("@smithy/types").RequestSigner>) | undefined;
|
|
39
43
|
signingEscapePath?: boolean | undefined;
|
|
40
44
|
systemClockOffset?: number | undefined;
|
|
41
45
|
signingRegion?: string | undefined;
|
|
42
|
-
signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined;
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
46
|
-
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
46
|
+
signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined;
|
|
47
47
|
};
|
|
@@ -29,17 +29,19 @@ export declare const getRuntimeConfig: (config: RekognitionStreamingClientConfig
|
|
|
29
29
|
serviceId: string;
|
|
30
30
|
logger: import("@smithy/types").Logger;
|
|
31
31
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
32
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
33
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
32
34
|
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
33
35
|
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
34
36
|
logger?: import("@smithy/types").Logger | undefined;
|
|
35
37
|
}) => import("@smithy/types").EndpointV2;
|
|
36
38
|
tls?: boolean | undefined;
|
|
37
|
-
|
|
39
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
40
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").RekognitionStreamingHttpAuthSchemeProvider;
|
|
41
|
+
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
|
|
38
42
|
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise<import("@smithy/types").RequestSigner>) | undefined;
|
|
39
43
|
signingEscapePath?: boolean | undefined;
|
|
40
44
|
systemClockOffset?: number | undefined;
|
|
41
45
|
signingRegion?: string | undefined;
|
|
42
46
|
signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined;
|
|
43
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
44
|
-
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
45
47
|
};
|
|
@@ -23,25 +23,27 @@ export declare const getRuntimeConfig: (config: RekognitionStreamingClientConfig
|
|
|
23
23
|
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
24
24
|
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
25
25
|
region: string | import("@smithy/types").Provider<any>;
|
|
26
|
-
credentialDefaultProvider: (input: any) => import("@smithy/types").Provider<import("@aws-sdk/types").Credentials>;
|
|
27
26
|
defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
|
|
27
|
+
credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider;
|
|
28
28
|
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
29
29
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
30
30
|
logger: import("@smithy/types").Logger;
|
|
31
31
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
32
32
|
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|
|
33
33
|
defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
|
|
34
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
35
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
34
36
|
endpoint?: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2> | undefined;
|
|
35
37
|
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
36
38
|
logger?: import("@smithy/types").Logger | undefined;
|
|
37
39
|
}) => import("@smithy/types").EndpointV2;
|
|
38
40
|
tls?: boolean | undefined;
|
|
39
|
-
|
|
41
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
42
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").RekognitionStreamingHttpAuthSchemeProvider;
|
|
43
|
+
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
|
|
40
44
|
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise<import("@smithy/types").RequestSigner>) | undefined;
|
|
41
45
|
signingEscapePath?: boolean | undefined;
|
|
42
46
|
systemClockOffset?: number | undefined;
|
|
43
47
|
signingRegion?: string | undefined;
|
|
44
48
|
signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined;
|
|
45
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
46
|
-
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
|
|
47
49
|
};
|
|
@@ -11,6 +11,8 @@ export declare const getRuntimeConfig: (config: RekognitionStreamingClientConfig
|
|
|
11
11
|
logger?: import("@smithy/types").Logger | undefined;
|
|
12
12
|
}) => import("@smithy/types").EndpointV2;
|
|
13
13
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
14
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").RekognitionStreamingHttpAuthSchemeProvider;
|
|
15
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
14
16
|
logger: import("@smithy/types").Logger;
|
|
15
17
|
serviceId: string;
|
|
16
18
|
urlParser: import("@smithy/types").UrlParser;
|
|
@@ -6,10 +6,6 @@ import {
|
|
|
6
6
|
HostHeaderInputConfig,
|
|
7
7
|
HostHeaderResolvedConfig,
|
|
8
8
|
} from "@aws-sdk/middleware-host-header";
|
|
9
|
-
import {
|
|
10
|
-
AwsAuthInputConfig,
|
|
11
|
-
AwsAuthResolvedConfig,
|
|
12
|
-
} from "@aws-sdk/middleware-signing";
|
|
13
9
|
import {
|
|
14
10
|
UserAgentInputConfig,
|
|
15
11
|
UserAgentResolvedConfig,
|
|
@@ -18,10 +14,7 @@ import {
|
|
|
18
14
|
WebSocketInputConfig,
|
|
19
15
|
WebSocketResolvedConfig,
|
|
20
16
|
} from "@aws-sdk/middleware-websocket";
|
|
21
|
-
import {
|
|
22
|
-
Credentials as __Credentials,
|
|
23
|
-
EventStreamPayloadHandlerProvider as __EventStreamPayloadHandlerProvider,
|
|
24
|
-
} from "@aws-sdk/types";
|
|
17
|
+
import { EventStreamPayloadHandlerProvider as __EventStreamPayloadHandlerProvider } from "@aws-sdk/types";
|
|
25
18
|
import {
|
|
26
19
|
RegionInputConfig,
|
|
27
20
|
RegionResolvedConfig,
|
|
@@ -46,6 +39,7 @@ import {
|
|
|
46
39
|
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
|
|
47
40
|
} from "@smithy/smithy-client";
|
|
48
41
|
import {
|
|
42
|
+
AwsCredentialIdentityProvider,
|
|
49
43
|
BodyLengthCalculator as __BodyLengthCalculator,
|
|
50
44
|
CheckOptionalClientConfig as __CheckOptionalClientConfig,
|
|
51
45
|
ChecksumConstructor as __ChecksumConstructor,
|
|
@@ -61,6 +55,10 @@ import {
|
|
|
61
55
|
UrlParser as __UrlParser,
|
|
62
56
|
UserAgent as __UserAgent,
|
|
63
57
|
} from "@smithy/types";
|
|
58
|
+
import {
|
|
59
|
+
HttpAuthSchemeInputConfig,
|
|
60
|
+
HttpAuthSchemeResolvedConfig,
|
|
61
|
+
} from "./auth/httpAuthSchemeProvider";
|
|
64
62
|
import {
|
|
65
63
|
StartFaceLivenessSessionCommandInput,
|
|
66
64
|
StartFaceLivenessSessionCommandOutput,
|
|
@@ -91,29 +89,29 @@ export interface ClientDefaults
|
|
|
91
89
|
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
92
90
|
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
93
91
|
region?: string | __Provider<string>;
|
|
94
|
-
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
|
|
95
|
-
eventStreamPayloadHandlerProvider?: __EventStreamPayloadHandlerProvider;
|
|
96
92
|
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
93
|
+
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
|
|
97
94
|
maxAttempts?: number | __Provider<number>;
|
|
98
95
|
retryMode?: string | __Provider<string>;
|
|
99
96
|
logger?: __Logger;
|
|
100
97
|
extensions?: RuntimeExtension[];
|
|
101
98
|
eventStreamSerdeProvider?: __EventStreamSerdeProvider;
|
|
102
99
|
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
100
|
+
eventStreamPayloadHandlerProvider?: __EventStreamPayloadHandlerProvider;
|
|
103
101
|
}
|
|
104
102
|
export type RekognitionStreamingClientConfigType = Partial<
|
|
105
103
|
__SmithyConfiguration<__HttpHandlerOptions>
|
|
106
104
|
> &
|
|
107
105
|
ClientDefaults &
|
|
106
|
+
UserAgentInputConfig &
|
|
107
|
+
RetryInputConfig &
|
|
108
108
|
RegionInputConfig &
|
|
109
|
-
EndpointInputConfig<EndpointParameters> &
|
|
110
109
|
HostHeaderInputConfig &
|
|
111
|
-
|
|
110
|
+
EndpointInputConfig<EndpointParameters> &
|
|
111
|
+
EventStreamSerdeInputConfig &
|
|
112
|
+
HttpAuthSchemeInputConfig &
|
|
112
113
|
EventStreamInputConfig &
|
|
113
114
|
WebSocketInputConfig &
|
|
114
|
-
UserAgentInputConfig &
|
|
115
|
-
RetryInputConfig &
|
|
116
|
-
EventStreamSerdeInputConfig &
|
|
117
115
|
ClientInputEndpointParameters;
|
|
118
116
|
export interface RekognitionStreamingClientConfig
|
|
119
117
|
extends RekognitionStreamingClientConfigType {}
|
|
@@ -121,15 +119,15 @@ export type RekognitionStreamingClientResolvedConfigType =
|
|
|
121
119
|
__SmithyResolvedConfiguration<__HttpHandlerOptions> &
|
|
122
120
|
Required<ClientDefaults> &
|
|
123
121
|
RuntimeExtensionsConfig &
|
|
122
|
+
UserAgentResolvedConfig &
|
|
123
|
+
RetryResolvedConfig &
|
|
124
124
|
RegionResolvedConfig &
|
|
125
|
-
EndpointResolvedConfig<EndpointParameters> &
|
|
126
125
|
HostHeaderResolvedConfig &
|
|
127
|
-
|
|
126
|
+
EndpointResolvedConfig<EndpointParameters> &
|
|
127
|
+
EventStreamSerdeResolvedConfig &
|
|
128
|
+
HttpAuthSchemeResolvedConfig &
|
|
128
129
|
EventStreamResolvedConfig &
|
|
129
130
|
WebSocketResolvedConfig &
|
|
130
|
-
UserAgentResolvedConfig &
|
|
131
|
-
RetryResolvedConfig &
|
|
132
|
-
EventStreamSerdeResolvedConfig &
|
|
133
131
|
ClientResolvedEndpointParameters;
|
|
134
132
|
export interface RekognitionStreamingClientResolvedConfig
|
|
135
133
|
extends RekognitionStreamingClientResolvedConfigType {}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AwsCredentialIdentity,
|
|
3
|
+
AwsCredentialIdentityProvider,
|
|
4
|
+
HttpAuthScheme,
|
|
5
|
+
} from "@smithy/types";
|
|
6
|
+
import { RekognitionStreamingHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
7
|
+
export interface HttpAuthExtensionConfiguration {
|
|
8
|
+
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
|
|
9
|
+
httpAuthSchemes(): HttpAuthScheme[];
|
|
10
|
+
setHttpAuthSchemeProvider(
|
|
11
|
+
httpAuthSchemeProvider: RekognitionStreamingHttpAuthSchemeProvider
|
|
12
|
+
): void;
|
|
13
|
+
httpAuthSchemeProvider(): RekognitionStreamingHttpAuthSchemeProvider;
|
|
14
|
+
setCredentials(
|
|
15
|
+
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider
|
|
16
|
+
): void;
|
|
17
|
+
credentials():
|
|
18
|
+
| AwsCredentialIdentity
|
|
19
|
+
| AwsCredentialIdentityProvider
|
|
20
|
+
| undefined;
|
|
21
|
+
}
|
|
22
|
+
export type HttpAuthRuntimeConfig = Partial<{
|
|
23
|
+
httpAuthSchemes: HttpAuthScheme[];
|
|
24
|
+
httpAuthSchemeProvider: RekognitionStreamingHttpAuthSchemeProvider;
|
|
25
|
+
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const getHttpAuthExtensionConfiguration: (
|
|
28
|
+
runtimeConfig: HttpAuthRuntimeConfig
|
|
29
|
+
) => HttpAuthExtensionConfiguration;
|
|
30
|
+
export declare const resolveHttpAuthRuntimeConfig: (
|
|
31
|
+
config: HttpAuthExtensionConfiguration
|
|
32
|
+
) => HttpAuthRuntimeConfig;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AwsSdkSigV4AuthInputConfig,
|
|
3
|
+
AwsSdkSigV4AuthResolvedConfig,
|
|
4
|
+
AwsSdkSigV4PreviouslyResolved,
|
|
5
|
+
} from "@aws-sdk/core";
|
|
6
|
+
import {
|
|
7
|
+
HandlerExecutionContext,
|
|
8
|
+
HttpAuthScheme,
|
|
9
|
+
HttpAuthSchemeParameters,
|
|
10
|
+
HttpAuthSchemeParametersProvider,
|
|
11
|
+
HttpAuthSchemeProvider,
|
|
12
|
+
} from "@smithy/types";
|
|
13
|
+
import { RekognitionStreamingClientResolvedConfig } from "../RekognitionStreamingClient";
|
|
14
|
+
export interface RekognitionStreamingHttpAuthSchemeParameters
|
|
15
|
+
extends HttpAuthSchemeParameters {
|
|
16
|
+
region?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface RekognitionStreamingHttpAuthSchemeParametersProvider
|
|
19
|
+
extends HttpAuthSchemeParametersProvider<
|
|
20
|
+
RekognitionStreamingClientResolvedConfig,
|
|
21
|
+
HandlerExecutionContext,
|
|
22
|
+
RekognitionStreamingHttpAuthSchemeParameters,
|
|
23
|
+
object
|
|
24
|
+
> {}
|
|
25
|
+
export declare const defaultRekognitionStreamingHttpAuthSchemeParametersProvider: (
|
|
26
|
+
config: RekognitionStreamingClientResolvedConfig,
|
|
27
|
+
context: HandlerExecutionContext,
|
|
28
|
+
input: object
|
|
29
|
+
) => Promise<RekognitionStreamingHttpAuthSchemeParameters>;
|
|
30
|
+
export interface RekognitionStreamingHttpAuthSchemeProvider
|
|
31
|
+
extends HttpAuthSchemeProvider<RekognitionStreamingHttpAuthSchemeParameters> {}
|
|
32
|
+
export declare const defaultRekognitionStreamingHttpAuthSchemeProvider: RekognitionStreamingHttpAuthSchemeProvider;
|
|
33
|
+
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
|
|
34
|
+
httpAuthSchemes?: HttpAuthScheme[];
|
|
35
|
+
httpAuthSchemeProvider?: RekognitionStreamingHttpAuthSchemeProvider;
|
|
36
|
+
}
|
|
37
|
+
export interface HttpAuthSchemeResolvedConfig
|
|
38
|
+
extends AwsSdkSigV4AuthResolvedConfig {
|
|
39
|
+
readonly httpAuthSchemes: HttpAuthScheme[];
|
|
40
|
+
readonly httpAuthSchemeProvider: RekognitionStreamingHttpAuthSchemeProvider;
|
|
41
|
+
}
|
|
42
|
+
export declare const resolveHttpAuthSchemeConfig: <T>(
|
|
43
|
+
config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved
|
|
44
|
+
) => T & HttpAuthSchemeResolvedConfig;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
|
|
2
2
|
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
|
|
3
3
|
import { DefaultExtensionConfiguration } from "@smithy/types";
|
|
4
|
+
import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
|
|
4
5
|
export interface RekognitionStreamingExtensionConfiguration
|
|
5
6
|
extends HttpHandlerExtensionConfiguration,
|
|
6
7
|
DefaultExtensionConfiguration,
|
|
7
|
-
AwsRegionExtensionConfiguration
|
|
8
|
+
AwsRegionExtensionConfiguration,
|
|
9
|
+
HttpAuthExtensionConfiguration {}
|
|
@@ -10,7 +10,7 @@ export declare const getRuntimeConfig: (
|
|
|
10
10
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
11
11
|
credentialDefaultProvider: (
|
|
12
12
|
input: any
|
|
13
|
-
) => import("@smithy/types").
|
|
13
|
+
) => import("@smithy/types").AwsCredentialIdentityProvider;
|
|
14
14
|
defaultUserAgentProvider: import("@smithy/types").Provider<
|
|
15
15
|
import("@smithy/types").UserAgent
|
|
16
16
|
>;
|
|
@@ -34,6 +34,11 @@ export declare const getRuntimeConfig: (
|
|
|
34
34
|
serviceId: string;
|
|
35
35
|
logger: import("@smithy/types").Logger;
|
|
36
36
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
37
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
38
|
+
retryStrategy?:
|
|
39
|
+
| import("@smithy/types").RetryStrategy
|
|
40
|
+
| import("@smithy/types").RetryStrategyV2
|
|
41
|
+
| undefined;
|
|
37
42
|
endpoint?:
|
|
38
43
|
| ((
|
|
39
44
|
| string
|
|
@@ -58,11 +63,11 @@ export declare const getRuntimeConfig: (
|
|
|
58
63
|
}
|
|
59
64
|
) => import("@smithy/types").EndpointV2;
|
|
60
65
|
tls?: boolean | undefined;
|
|
66
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
67
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").RekognitionStreamingHttpAuthSchemeProvider;
|
|
61
68
|
credentials?:
|
|
62
69
|
| import("@smithy/types").AwsCredentialIdentity
|
|
63
|
-
| import("@smithy/types").
|
|
64
|
-
import("@smithy/types").AwsCredentialIdentity
|
|
65
|
-
>
|
|
70
|
+
| import("@smithy/types").AwsCredentialIdentityProvider
|
|
66
71
|
| undefined;
|
|
67
72
|
signer?:
|
|
68
73
|
| import("@smithy/types").RequestSigner
|
|
@@ -79,9 +84,4 @@ export declare const getRuntimeConfig: (
|
|
|
79
84
|
import("@smithy/signature-v4").SignatureV4CryptoInit
|
|
80
85
|
) => import("@smithy/types").RequestSigner)
|
|
81
86
|
| undefined;
|
|
82
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
83
|
-
retryStrategy?:
|
|
84
|
-
| import("@smithy/types").RetryStrategy
|
|
85
|
-
| import("@smithy/types").RetryStrategyV2
|
|
86
|
-
| undefined;
|
|
87
87
|
};
|
|
@@ -40,6 +40,11 @@ export declare const getRuntimeConfig: (
|
|
|
40
40
|
serviceId: string;
|
|
41
41
|
logger: import("@smithy/types").Logger;
|
|
42
42
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
43
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
44
|
+
retryStrategy?:
|
|
45
|
+
| import("@smithy/types").RetryStrategy
|
|
46
|
+
| import("@smithy/types").RetryStrategyV2
|
|
47
|
+
| undefined;
|
|
43
48
|
endpoint?:
|
|
44
49
|
| ((
|
|
45
50
|
| string
|
|
@@ -64,11 +69,11 @@ export declare const getRuntimeConfig: (
|
|
|
64
69
|
}
|
|
65
70
|
) => import("@smithy/types").EndpointV2;
|
|
66
71
|
tls?: boolean | undefined;
|
|
72
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
73
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").RekognitionStreamingHttpAuthSchemeProvider;
|
|
67
74
|
credentials?:
|
|
68
75
|
| import("@smithy/types").AwsCredentialIdentity
|
|
69
|
-
| import("@smithy/types").
|
|
70
|
-
import("@smithy/types").AwsCredentialIdentity
|
|
71
|
-
>
|
|
76
|
+
| import("@smithy/types").AwsCredentialIdentityProvider
|
|
72
77
|
| undefined;
|
|
73
78
|
signer?:
|
|
74
79
|
| import("@smithy/types").RequestSigner
|
|
@@ -85,9 +90,4 @@ export declare const getRuntimeConfig: (
|
|
|
85
90
|
import("@smithy/signature-v4").SignatureV4CryptoInit
|
|
86
91
|
) => import("@smithy/types").RequestSigner)
|
|
87
92
|
| undefined;
|
|
88
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
89
|
-
retryStrategy?:
|
|
90
|
-
| import("@smithy/types").RetryStrategy
|
|
91
|
-
| import("@smithy/types").RetryStrategyV2
|
|
92
|
-
| undefined;
|
|
93
93
|
};
|
|
@@ -36,12 +36,12 @@ export declare const getRuntimeConfig: (
|
|
|
36
36
|
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
37
37
|
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
38
38
|
region: string | import("@smithy/types").Provider<any>;
|
|
39
|
-
credentialDefaultProvider: (
|
|
40
|
-
input: any
|
|
41
|
-
) => import("@smithy/types").Provider<import("@aws-sdk/types").Credentials>;
|
|
42
39
|
defaultUserAgentProvider: import("@smithy/types").Provider<
|
|
43
40
|
import("@smithy/types").UserAgent
|
|
44
41
|
>;
|
|
42
|
+
credentialDefaultProvider: (
|
|
43
|
+
input: any
|
|
44
|
+
) => import("@smithy/types").AwsCredentialIdentityProvider;
|
|
45
45
|
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
46
46
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
47
47
|
logger: import("@smithy/types").Logger;
|
|
@@ -52,6 +52,11 @@ export declare const getRuntimeConfig: (
|
|
|
52
52
|
| import("@smithy/types").Provider<
|
|
53
53
|
import("@smithy/smithy-client").DefaultsMode
|
|
54
54
|
>;
|
|
55
|
+
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
56
|
+
retryStrategy?:
|
|
57
|
+
| import("@smithy/types").RetryStrategy
|
|
58
|
+
| import("@smithy/types").RetryStrategyV2
|
|
59
|
+
| undefined;
|
|
55
60
|
endpoint?:
|
|
56
61
|
| string
|
|
57
62
|
| import("@smithy/types").Endpoint
|
|
@@ -66,11 +71,11 @@ export declare const getRuntimeConfig: (
|
|
|
66
71
|
}
|
|
67
72
|
) => import("@smithy/types").EndpointV2;
|
|
68
73
|
tls?: boolean | undefined;
|
|
74
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
75
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").RekognitionStreamingHttpAuthSchemeProvider;
|
|
69
76
|
credentials?:
|
|
70
77
|
| import("@smithy/types").AwsCredentialIdentity
|
|
71
|
-
| import("@smithy/types").
|
|
72
|
-
import("@smithy/types").AwsCredentialIdentity
|
|
73
|
-
>
|
|
78
|
+
| import("@smithy/types").AwsCredentialIdentityProvider
|
|
74
79
|
| undefined;
|
|
75
80
|
signer?:
|
|
76
81
|
| import("@smithy/types").RequestSigner
|
|
@@ -87,9 +92,4 @@ export declare const getRuntimeConfig: (
|
|
|
87
92
|
import("@smithy/signature-v4").SignatureV4CryptoInit
|
|
88
93
|
) => import("@smithy/types").RequestSigner)
|
|
89
94
|
| undefined;
|
|
90
|
-
customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
|
|
91
|
-
retryStrategy?:
|
|
92
|
-
| import("@smithy/types").RetryStrategy
|
|
93
|
-
| import("@smithy/types").RetryStrategyV2
|
|
94
|
-
| undefined;
|
|
95
95
|
};
|
|
@@ -13,6 +13,8 @@ export declare const getRuntimeConfig: (
|
|
|
13
13
|
}
|
|
14
14
|
) => import("@smithy/types").EndpointV2;
|
|
15
15
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
16
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").RekognitionStreamingHttpAuthSchemeProvider;
|
|
17
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
16
18
|
logger: import("@smithy/types").Logger;
|
|
17
19
|
serviceId: string;
|
|
18
20
|
urlParser: import("@smithy/types").UrlParser;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-rekognitionstreaming",
|
|
3
3
|
"description": "AWS SDK for JavaScript Rekognitionstreaming Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.622.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-rekognitionstreaming",
|
|
@@ -20,16 +20,15 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/client-sso-oidc": "3.
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
25
|
-
"@aws-sdk/core": "3.
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sso-oidc": "3.622.0",
|
|
24
|
+
"@aws-sdk/client-sts": "3.622.0",
|
|
25
|
+
"@aws-sdk/core": "3.622.0",
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.622.0",
|
|
27
27
|
"@aws-sdk/eventstream-handler-node": "3.620.0",
|
|
28
28
|
"@aws-sdk/middleware-eventstream": "3.620.0",
|
|
29
29
|
"@aws-sdk/middleware-host-header": "3.620.0",
|
|
30
30
|
"@aws-sdk/middleware-logger": "3.609.0",
|
|
31
31
|
"@aws-sdk/middleware-recursion-detection": "3.620.0",
|
|
32
|
-
"@aws-sdk/middleware-signing": "3.620.0",
|
|
33
32
|
"@aws-sdk/middleware-user-agent": "3.620.0",
|
|
34
33
|
"@aws-sdk/middleware-websocket": "3.621.0",
|
|
35
34
|
"@aws-sdk/region-config-resolver": "3.614.0",
|
|
@@ -38,7 +37,7 @@
|
|
|
38
37
|
"@aws-sdk/util-user-agent-browser": "3.609.0",
|
|
39
38
|
"@aws-sdk/util-user-agent-node": "3.614.0",
|
|
40
39
|
"@smithy/config-resolver": "^3.0.5",
|
|
41
|
-
"@smithy/core": "^2.3.
|
|
40
|
+
"@smithy/core": "^2.3.2",
|
|
42
41
|
"@smithy/eventstream-serde-browser": "^3.0.5",
|
|
43
42
|
"@smithy/eventstream-serde-config-resolver": "^3.0.3",
|
|
44
43
|
"@smithy/eventstream-serde-node": "^3.0.4",
|
|
@@ -47,21 +46,22 @@
|
|
|
47
46
|
"@smithy/invalid-dependency": "^3.0.3",
|
|
48
47
|
"@smithy/middleware-content-length": "^3.0.5",
|
|
49
48
|
"@smithy/middleware-endpoint": "^3.1.0",
|
|
50
|
-
"@smithy/middleware-retry": "^3.0.
|
|
49
|
+
"@smithy/middleware-retry": "^3.0.14",
|
|
51
50
|
"@smithy/middleware-serde": "^3.0.3",
|
|
52
51
|
"@smithy/middleware-stack": "^3.0.3",
|
|
53
52
|
"@smithy/node-config-provider": "^3.1.4",
|
|
54
53
|
"@smithy/node-http-handler": "^3.1.4",
|
|
55
54
|
"@smithy/protocol-http": "^4.1.0",
|
|
56
|
-
"@smithy/smithy-client": "^3.1.
|
|
55
|
+
"@smithy/smithy-client": "^3.1.12",
|
|
57
56
|
"@smithy/types": "^3.3.0",
|
|
58
57
|
"@smithy/url-parser": "^3.0.3",
|
|
59
58
|
"@smithy/util-base64": "^3.0.0",
|
|
60
59
|
"@smithy/util-body-length-browser": "^3.0.0",
|
|
61
60
|
"@smithy/util-body-length-node": "^3.0.0",
|
|
62
|
-
"@smithy/util-defaults-mode-browser": "^3.0.
|
|
63
|
-
"@smithy/util-defaults-mode-node": "^3.0.
|
|
61
|
+
"@smithy/util-defaults-mode-browser": "^3.0.14",
|
|
62
|
+
"@smithy/util-defaults-mode-node": "^3.0.14",
|
|
64
63
|
"@smithy/util-endpoints": "^2.0.5",
|
|
64
|
+
"@smithy/util-middleware": "^3.0.3",
|
|
65
65
|
"@smithy/util-retry": "^3.0.3",
|
|
66
66
|
"@smithy/util-utf8": "^3.0.0",
|
|
67
67
|
"tslib": "^2.6.2"
|