@aws-sdk/token-providers 3.387.0 → 3.388.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/README.md +17 -3
- package/dist-cjs/{client-sso-oidc-bundle/dist-node.js → bundle/client-sso-oidc-browser.js} +277 -120
- package/dist-cjs/{client-sso-oidc-bundle/dist-browser.js → bundle/client-sso-oidc-node.js} +355 -186
- package/dist-cjs/getNewSsoOidcToken.js +2 -2
- package/dist-cjs/getSsoOidcClient.js +2 -2
- package/dist-cjs/index.js +1 -1
- package/dist-es/{client-sso-oidc-bundle/dist-browser.js → bundle/client-sso-oidc-browser.js} +260 -97
- package/dist-es/{client-sso-oidc-bundle/dist-node.js → bundle/client-sso-oidc-node.js} +260 -97
- package/dist-es/getNewSsoOidcToken.js +1 -1
- package/dist-es/getSsoOidcClient.js +1 -1
- package/dist-es/index.js +1 -1
- package/dist-types/index.d.ts +1 -1
- package/dist-types/ts3.4/index.d.ts +1 -1
- package/package.json +35 -5
- /package/dist-types/{client-sso-oidc-bundle/dist-browser.d.ts → bundle/client-sso-oidc-browser.d.ts} +0 -0
- /package/dist-types/{client-sso-oidc-bundle/dist-node.d.ts → bundle/client-sso-oidc-node.d.ts} +0 -0
- /package/dist-types/ts3.4/{client-sso-oidc-bundle/dist-browser.d.ts → bundle/client-sso-oidc-browser.d.ts} +0 -0
- /package/dist-types/ts3.4/{client-sso-oidc-bundle/dist-node.d.ts → bundle/client-sso-oidc-node.d.ts} +0 -0
|
@@ -15,102 +15,7 @@ var resolveClientEndpointParameters = (options) => {
|
|
|
15
15
|
defaultSigningName: "awsssooidc"
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
var package_default = {
|
|
19
|
-
name: "@aws-sdk/client-sso-oidc",
|
|
20
|
-
description: "AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",
|
|
21
|
-
version: "3.386.0",
|
|
22
|
-
scripts: {
|
|
23
|
-
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
24
|
-
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
25
|
-
"build:docs": "typedoc",
|
|
26
|
-
"build:es": "tsc -p tsconfig.es.json",
|
|
27
|
-
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
|
|
28
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
29
|
-
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
30
|
-
clean: "rimraf ./dist-* && rimraf *.tsbuildinfo",
|
|
31
|
-
"extract:docs": "api-extractor run --local",
|
|
32
|
-
"generate:client": "node ../../scripts/generate-clients/single-service --solo sso-oidc"
|
|
33
|
-
},
|
|
34
|
-
main: "./dist-cjs/index.js",
|
|
35
|
-
types: "./dist-types/index.d.ts",
|
|
36
|
-
module: "./dist-es/index.js",
|
|
37
|
-
sideEffects: false,
|
|
38
|
-
dependencies: {
|
|
39
|
-
"@aws-crypto/sha256-browser": "3.0.0",
|
|
40
|
-
"@aws-crypto/sha256-js": "3.0.0",
|
|
41
|
-
"@aws-sdk/middleware-host-header": "*",
|
|
42
|
-
"@aws-sdk/middleware-logger": "*",
|
|
43
|
-
"@aws-sdk/middleware-recursion-detection": "*",
|
|
44
|
-
"@aws-sdk/middleware-user-agent": "*",
|
|
45
|
-
"@aws-sdk/types": "*",
|
|
46
|
-
"@aws-sdk/util-endpoints": "*",
|
|
47
|
-
"@aws-sdk/util-user-agent-browser": "*",
|
|
48
|
-
"@aws-sdk/util-user-agent-node": "*",
|
|
49
|
-
"@smithy/config-resolver": "^2.0.2",
|
|
50
|
-
"@smithy/fetch-http-handler": "^2.0.2",
|
|
51
|
-
"@smithy/hash-node": "^2.0.2",
|
|
52
|
-
"@smithy/invalid-dependency": "^2.0.2",
|
|
53
|
-
"@smithy/middleware-content-length": "^2.0.2",
|
|
54
|
-
"@smithy/middleware-endpoint": "^2.0.2",
|
|
55
|
-
"@smithy/middleware-retry": "^2.0.2",
|
|
56
|
-
"@smithy/middleware-serde": "^2.0.2",
|
|
57
|
-
"@smithy/middleware-stack": "^2.0.0",
|
|
58
|
-
"@smithy/node-config-provider": "^2.0.2",
|
|
59
|
-
"@smithy/node-http-handler": "^2.0.2",
|
|
60
|
-
"@smithy/protocol-http": "^2.0.2",
|
|
61
|
-
"@smithy/smithy-client": "^2.0.2",
|
|
62
|
-
"@smithy/types": "^2.1.0",
|
|
63
|
-
"@smithy/url-parser": "^2.0.2",
|
|
64
|
-
"@smithy/util-base64": "^2.0.0",
|
|
65
|
-
"@smithy/util-body-length-browser": "^2.0.0",
|
|
66
|
-
"@smithy/util-body-length-node": "^2.0.0",
|
|
67
|
-
"@smithy/util-defaults-mode-browser": "^2.0.2",
|
|
68
|
-
"@smithy/util-defaults-mode-node": "^2.0.2",
|
|
69
|
-
"@smithy/util-retry": "^2.0.0",
|
|
70
|
-
"@smithy/util-utf8": "^2.0.0",
|
|
71
|
-
tslib: "^2.5.0"
|
|
72
|
-
},
|
|
73
|
-
devDependencies: {
|
|
74
|
-
"@smithy/service-client-documentation-generator": "^2.0.0",
|
|
75
|
-
"@tsconfig/node14": "1.0.3",
|
|
76
|
-
"@types/node": "^14.14.31",
|
|
77
|
-
concurrently: "7.0.0",
|
|
78
|
-
"downlevel-dts": "0.10.1",
|
|
79
|
-
rimraf: "3.0.2",
|
|
80
|
-
typedoc: "0.23.23",
|
|
81
|
-
typescript: "~4.9.5"
|
|
82
|
-
},
|
|
83
|
-
engines: {
|
|
84
|
-
node: ">=14.0.0"
|
|
85
|
-
},
|
|
86
|
-
typesVersions: {
|
|
87
|
-
"<4.0": {
|
|
88
|
-
"dist-types/*": [
|
|
89
|
-
"dist-types/ts3.4/*"
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
files: [
|
|
94
|
-
"dist-*/**"
|
|
95
|
-
],
|
|
96
|
-
author: {
|
|
97
|
-
name: "AWS SDK for JavaScript Team",
|
|
98
|
-
url: "https://aws.amazon.com/javascript/"
|
|
99
|
-
},
|
|
100
|
-
license: "Apache-2.0",
|
|
101
|
-
browser: {
|
|
102
|
-
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
|
|
103
|
-
},
|
|
104
|
-
"react-native": {
|
|
105
|
-
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
106
|
-
},
|
|
107
|
-
homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",
|
|
108
|
-
repository: {
|
|
109
|
-
type: "git",
|
|
110
|
-
url: "https://github.com/aws/aws-sdk-js-v3.git",
|
|
111
|
-
directory: "clients/client-sso-oidc"
|
|
112
|
-
}
|
|
113
|
-
};
|
|
18
|
+
var package_default = { version: "3.387.0" };
|
|
114
19
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
115
20
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS } from "@smithy/config-resolver";
|
|
116
21
|
import { Hash } from "@smithy/hash-node";
|
|
@@ -213,11 +118,12 @@ var SSOOIDCClient = class extends __Client {
|
|
|
213
118
|
super.destroy();
|
|
214
119
|
}
|
|
215
120
|
};
|
|
121
|
+
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
216
122
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
217
123
|
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
218
124
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
219
125
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
220
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException } from "@smithy/smithy-client";
|
|
126
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException } from "@smithy/smithy-client";
|
|
221
127
|
import { ServiceException as __ServiceException } from "@smithy/smithy-client";
|
|
222
128
|
var SSOOIDCServiceException = class _SSOOIDCServiceException extends __ServiceException {
|
|
223
129
|
constructor(options) {
|
|
@@ -379,6 +285,20 @@ var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends
|
|
|
379
285
|
this.error_description = opts.error_description;
|
|
380
286
|
}
|
|
381
287
|
};
|
|
288
|
+
var InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException {
|
|
289
|
+
constructor(opts) {
|
|
290
|
+
super({
|
|
291
|
+
name: "InvalidClientMetadataException",
|
|
292
|
+
$fault: "client",
|
|
293
|
+
...opts
|
|
294
|
+
});
|
|
295
|
+
this.name = "InvalidClientMetadataException";
|
|
296
|
+
this.$fault = "client";
|
|
297
|
+
Object.setPrototypeOf(this, _InvalidClientMetadataException.prototype);
|
|
298
|
+
this.error = opts.error;
|
|
299
|
+
this.error_description = opts.error_description;
|
|
300
|
+
}
|
|
301
|
+
};
|
|
382
302
|
var se_CreateTokenCommand = async (input, context) => {
|
|
383
303
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
384
304
|
const headers = {
|
|
@@ -406,6 +326,50 @@ var se_CreateTokenCommand = async (input, context) => {
|
|
|
406
326
|
body
|
|
407
327
|
});
|
|
408
328
|
};
|
|
329
|
+
var se_RegisterClientCommand = async (input, context) => {
|
|
330
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
331
|
+
const headers = {
|
|
332
|
+
"content-type": "application/json"
|
|
333
|
+
};
|
|
334
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/client/register`;
|
|
335
|
+
let body;
|
|
336
|
+
body = JSON.stringify(take(input, {
|
|
337
|
+
clientName: [],
|
|
338
|
+
clientType: [],
|
|
339
|
+
scopes: (_) => _json(_)
|
|
340
|
+
}));
|
|
341
|
+
return new __HttpRequest({
|
|
342
|
+
protocol,
|
|
343
|
+
hostname,
|
|
344
|
+
port,
|
|
345
|
+
method: "POST",
|
|
346
|
+
headers,
|
|
347
|
+
path: resolvedPath,
|
|
348
|
+
body
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
var se_StartDeviceAuthorizationCommand = async (input, context) => {
|
|
352
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
353
|
+
const headers = {
|
|
354
|
+
"content-type": "application/json"
|
|
355
|
+
};
|
|
356
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}/device_authorization`;
|
|
357
|
+
let body;
|
|
358
|
+
body = JSON.stringify(take(input, {
|
|
359
|
+
clientId: [],
|
|
360
|
+
clientSecret: [],
|
|
361
|
+
startUrl: []
|
|
362
|
+
}));
|
|
363
|
+
return new __HttpRequest({
|
|
364
|
+
protocol,
|
|
365
|
+
hostname,
|
|
366
|
+
port,
|
|
367
|
+
method: "POST",
|
|
368
|
+
headers,
|
|
369
|
+
path: resolvedPath,
|
|
370
|
+
body
|
|
371
|
+
});
|
|
372
|
+
};
|
|
409
373
|
var de_CreateTokenCommand = async (output, context) => {
|
|
410
374
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
411
375
|
return de_CreateTokenCommandError(output, context);
|
|
@@ -473,6 +437,103 @@ var de_CreateTokenCommandError = async (output, context) => {
|
|
|
473
437
|
});
|
|
474
438
|
}
|
|
475
439
|
};
|
|
440
|
+
var de_RegisterClientCommand = async (output, context) => {
|
|
441
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
442
|
+
return de_RegisterClientCommandError(output, context);
|
|
443
|
+
}
|
|
444
|
+
const contents = map({
|
|
445
|
+
$metadata: deserializeMetadata(output)
|
|
446
|
+
});
|
|
447
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
448
|
+
const doc = take(data, {
|
|
449
|
+
authorizationEndpoint: __expectString,
|
|
450
|
+
clientId: __expectString,
|
|
451
|
+
clientIdIssuedAt: __expectLong,
|
|
452
|
+
clientSecret: __expectString,
|
|
453
|
+
clientSecretExpiresAt: __expectLong,
|
|
454
|
+
tokenEndpoint: __expectString
|
|
455
|
+
});
|
|
456
|
+
Object.assign(contents, doc);
|
|
457
|
+
return contents;
|
|
458
|
+
};
|
|
459
|
+
var de_RegisterClientCommandError = async (output, context) => {
|
|
460
|
+
const parsedOutput = {
|
|
461
|
+
...output,
|
|
462
|
+
body: await parseErrorBody(output.body, context)
|
|
463
|
+
};
|
|
464
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
465
|
+
switch (errorCode) {
|
|
466
|
+
case "InternalServerException":
|
|
467
|
+
case "com.amazonaws.ssooidc#InternalServerException":
|
|
468
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
469
|
+
case "InvalidClientMetadataException":
|
|
470
|
+
case "com.amazonaws.ssooidc#InvalidClientMetadataException":
|
|
471
|
+
throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context);
|
|
472
|
+
case "InvalidRequestException":
|
|
473
|
+
case "com.amazonaws.ssooidc#InvalidRequestException":
|
|
474
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
475
|
+
case "InvalidScopeException":
|
|
476
|
+
case "com.amazonaws.ssooidc#InvalidScopeException":
|
|
477
|
+
throw await de_InvalidScopeExceptionRes(parsedOutput, context);
|
|
478
|
+
default:
|
|
479
|
+
const parsedBody = parsedOutput.body;
|
|
480
|
+
return throwDefaultError({
|
|
481
|
+
output,
|
|
482
|
+
parsedBody,
|
|
483
|
+
errorCode
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
var de_StartDeviceAuthorizationCommand = async (output, context) => {
|
|
488
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
489
|
+
return de_StartDeviceAuthorizationCommandError(output, context);
|
|
490
|
+
}
|
|
491
|
+
const contents = map({
|
|
492
|
+
$metadata: deserializeMetadata(output)
|
|
493
|
+
});
|
|
494
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
495
|
+
const doc = take(data, {
|
|
496
|
+
deviceCode: __expectString,
|
|
497
|
+
expiresIn: __expectInt32,
|
|
498
|
+
interval: __expectInt32,
|
|
499
|
+
userCode: __expectString,
|
|
500
|
+
verificationUri: __expectString,
|
|
501
|
+
verificationUriComplete: __expectString
|
|
502
|
+
});
|
|
503
|
+
Object.assign(contents, doc);
|
|
504
|
+
return contents;
|
|
505
|
+
};
|
|
506
|
+
var de_StartDeviceAuthorizationCommandError = async (output, context) => {
|
|
507
|
+
const parsedOutput = {
|
|
508
|
+
...output,
|
|
509
|
+
body: await parseErrorBody(output.body, context)
|
|
510
|
+
};
|
|
511
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
512
|
+
switch (errorCode) {
|
|
513
|
+
case "InternalServerException":
|
|
514
|
+
case "com.amazonaws.ssooidc#InternalServerException":
|
|
515
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
516
|
+
case "InvalidClientException":
|
|
517
|
+
case "com.amazonaws.ssooidc#InvalidClientException":
|
|
518
|
+
throw await de_InvalidClientExceptionRes(parsedOutput, context);
|
|
519
|
+
case "InvalidRequestException":
|
|
520
|
+
case "com.amazonaws.ssooidc#InvalidRequestException":
|
|
521
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
522
|
+
case "SlowDownException":
|
|
523
|
+
case "com.amazonaws.ssooidc#SlowDownException":
|
|
524
|
+
throw await de_SlowDownExceptionRes(parsedOutput, context);
|
|
525
|
+
case "UnauthorizedClientException":
|
|
526
|
+
case "com.amazonaws.ssooidc#UnauthorizedClientException":
|
|
527
|
+
throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
|
|
528
|
+
default:
|
|
529
|
+
const parsedBody = parsedOutput.body;
|
|
530
|
+
return throwDefaultError({
|
|
531
|
+
output,
|
|
532
|
+
parsedBody,
|
|
533
|
+
errorCode
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
};
|
|
476
537
|
var throwDefaultError = withBaseException(SSOOIDCServiceException);
|
|
477
538
|
var de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
478
539
|
const contents = map({});
|
|
@@ -544,6 +605,20 @@ var de_InvalidClientExceptionRes = async (parsedOutput, context) => {
|
|
|
544
605
|
});
|
|
545
606
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
546
607
|
};
|
|
608
|
+
var de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => {
|
|
609
|
+
const contents = map({});
|
|
610
|
+
const data = parsedOutput.body;
|
|
611
|
+
const doc = take(data, {
|
|
612
|
+
error: __expectString,
|
|
613
|
+
error_description: __expectString
|
|
614
|
+
});
|
|
615
|
+
Object.assign(contents, doc);
|
|
616
|
+
const exception = new InvalidClientMetadataException({
|
|
617
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
618
|
+
...contents
|
|
619
|
+
});
|
|
620
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
621
|
+
};
|
|
547
622
|
var de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
|
|
548
623
|
const contents = map({});
|
|
549
624
|
const data = parsedOutput.body;
|
|
@@ -712,4 +787,92 @@ var CreateTokenCommand = class _CreateTokenCommand extends $Command {
|
|
|
712
787
|
return de_CreateTokenCommand(output, context);
|
|
713
788
|
}
|
|
714
789
|
};
|
|
790
|
+
import { getEndpointPlugin as getEndpointPlugin2 } from "@smithy/middleware-endpoint";
|
|
791
|
+
import { getSerdePlugin as getSerdePlugin2 } from "@smithy/middleware-serde";
|
|
792
|
+
import { Command as $Command2 } from "@smithy/smithy-client";
|
|
793
|
+
var RegisterClientCommand = class _RegisterClientCommand extends $Command2 {
|
|
794
|
+
constructor(input) {
|
|
795
|
+
super();
|
|
796
|
+
this.input = input;
|
|
797
|
+
}
|
|
798
|
+
static getEndpointParameterInstructions() {
|
|
799
|
+
return {
|
|
800
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
801
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
802
|
+
Region: { type: "builtInParams", name: "region" },
|
|
803
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
807
|
+
this.middlewareStack.use(getSerdePlugin2(configuration, this.serialize, this.deserialize));
|
|
808
|
+
this.middlewareStack.use(getEndpointPlugin2(configuration, _RegisterClientCommand.getEndpointParameterInstructions()));
|
|
809
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
810
|
+
const { logger } = configuration;
|
|
811
|
+
const clientName = "SSOOIDCClient";
|
|
812
|
+
const commandName = "RegisterClientCommand";
|
|
813
|
+
const handlerExecutionContext = {
|
|
814
|
+
logger,
|
|
815
|
+
clientName,
|
|
816
|
+
commandName,
|
|
817
|
+
inputFilterSensitiveLog: (_) => _,
|
|
818
|
+
outputFilterSensitiveLog: (_) => _
|
|
819
|
+
};
|
|
820
|
+
const { requestHandler } = configuration;
|
|
821
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
822
|
+
}
|
|
823
|
+
serialize(input, context) {
|
|
824
|
+
return se_RegisterClientCommand(input, context);
|
|
825
|
+
}
|
|
826
|
+
deserialize(output, context) {
|
|
827
|
+
return de_RegisterClientCommand(output, context);
|
|
828
|
+
}
|
|
829
|
+
};
|
|
830
|
+
import { getEndpointPlugin as getEndpointPlugin3 } from "@smithy/middleware-endpoint";
|
|
831
|
+
import { getSerdePlugin as getSerdePlugin3 } from "@smithy/middleware-serde";
|
|
832
|
+
import { Command as $Command3 } from "@smithy/smithy-client";
|
|
833
|
+
var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends $Command3 {
|
|
834
|
+
constructor(input) {
|
|
835
|
+
super();
|
|
836
|
+
this.input = input;
|
|
837
|
+
}
|
|
838
|
+
static getEndpointParameterInstructions() {
|
|
839
|
+
return {
|
|
840
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
841
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
842
|
+
Region: { type: "builtInParams", name: "region" },
|
|
843
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
847
|
+
this.middlewareStack.use(getSerdePlugin3(configuration, this.serialize, this.deserialize));
|
|
848
|
+
this.middlewareStack.use(getEndpointPlugin3(configuration, _StartDeviceAuthorizationCommand.getEndpointParameterInstructions()));
|
|
849
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
850
|
+
const { logger } = configuration;
|
|
851
|
+
const clientName = "SSOOIDCClient";
|
|
852
|
+
const commandName = "StartDeviceAuthorizationCommand";
|
|
853
|
+
const handlerExecutionContext = {
|
|
854
|
+
logger,
|
|
855
|
+
clientName,
|
|
856
|
+
commandName,
|
|
857
|
+
inputFilterSensitiveLog: (_) => _,
|
|
858
|
+
outputFilterSensitiveLog: (_) => _
|
|
859
|
+
};
|
|
860
|
+
const { requestHandler } = configuration;
|
|
861
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
862
|
+
}
|
|
863
|
+
serialize(input, context) {
|
|
864
|
+
return se_StartDeviceAuthorizationCommand(input, context);
|
|
865
|
+
}
|
|
866
|
+
deserialize(output, context) {
|
|
867
|
+
return de_StartDeviceAuthorizationCommand(output, context);
|
|
868
|
+
}
|
|
869
|
+
};
|
|
870
|
+
var commands = {
|
|
871
|
+
CreateTokenCommand,
|
|
872
|
+
RegisterClientCommand,
|
|
873
|
+
StartDeviceAuthorizationCommand
|
|
874
|
+
};
|
|
875
|
+
var SSOOIDC = class extends SSOOIDCClient {
|
|
876
|
+
};
|
|
877
|
+
createAggregatedClient(commands, SSOOIDC);
|
|
715
878
|
export { AccessDeniedException, AuthorizationPendingException, CreateTokenCommand, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidRequestException, InvalidScopeException, SSOOIDCClient, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateTokenCommand } from "./client-sso-oidc-
|
|
1
|
+
import { CreateTokenCommand } from "./bundle/client-sso-oidc-node";
|
|
2
2
|
import { getSsoOidcClient } from "./getSsoOidcClient";
|
|
3
3
|
export const getNewSsoOidcToken = (ssoToken, ssoRegion) => {
|
|
4
4
|
const ssoOidcClient = getSsoOidcClient(ssoRegion);
|
package/dist-es/index.js
CHANGED
package/dist-types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/token-providers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.388.0",
|
|
4
4
|
"description": "A collection of token providers",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build:client-
|
|
10
|
-
"build": "
|
|
9
|
+
"build:client-bundle": "node ./scripts/esbuild",
|
|
10
|
+
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
11
11
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
12
12
|
"build:es": "tsc -p tsconfig.es.json",
|
|
13
13
|
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
|
|
@@ -27,10 +27,40 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
|
+
"@aws-crypto/sha256-browser": "3.0.0",
|
|
31
|
+
"@aws-crypto/sha256-js": "3.0.0",
|
|
32
|
+
"@aws-sdk/middleware-host-header": "3.387.0",
|
|
33
|
+
"@aws-sdk/middleware-logger": "3.387.0",
|
|
34
|
+
"@aws-sdk/middleware-recursion-detection": "3.387.0",
|
|
35
|
+
"@aws-sdk/middleware-user-agent": "3.387.0",
|
|
30
36
|
"@aws-sdk/types": "3.387.0",
|
|
37
|
+
"@aws-sdk/util-endpoints": "3.387.0",
|
|
38
|
+
"@aws-sdk/util-user-agent-browser": "3.387.0",
|
|
39
|
+
"@aws-sdk/util-user-agent-node": "3.387.0",
|
|
40
|
+
"@smithy/config-resolver": "^2.0.2",
|
|
41
|
+
"@smithy/fetch-http-handler": "^2.0.2",
|
|
42
|
+
"@smithy/hash-node": "^2.0.2",
|
|
43
|
+
"@smithy/invalid-dependency": "^2.0.2",
|
|
44
|
+
"@smithy/middleware-content-length": "^2.0.2",
|
|
45
|
+
"@smithy/middleware-endpoint": "^2.0.2",
|
|
46
|
+
"@smithy/middleware-retry": "^2.0.2",
|
|
47
|
+
"@smithy/middleware-serde": "^2.0.2",
|
|
48
|
+
"@smithy/middleware-stack": "^2.0.0",
|
|
49
|
+
"@smithy/node-config-provider": "^2.0.2",
|
|
50
|
+
"@smithy/node-http-handler": "^2.0.2",
|
|
31
51
|
"@smithy/property-provider": "^2.0.0",
|
|
52
|
+
"@smithy/protocol-http": "^2.0.2",
|
|
32
53
|
"@smithy/shared-ini-file-loader": "^2.0.0",
|
|
54
|
+
"@smithy/smithy-client": "^2.0.2",
|
|
33
55
|
"@smithy/types": "^2.1.0",
|
|
56
|
+
"@smithy/url-parser": "^2.0.2",
|
|
57
|
+
"@smithy/util-base64": "^2.0.0",
|
|
58
|
+
"@smithy/util-body-length-browser": "^2.0.0",
|
|
59
|
+
"@smithy/util-body-length-node": "^2.0.0",
|
|
60
|
+
"@smithy/util-defaults-mode-browser": "^2.0.2",
|
|
61
|
+
"@smithy/util-defaults-mode-node": "^2.0.2",
|
|
62
|
+
"@smithy/util-retry": "^2.0.0",
|
|
63
|
+
"@smithy/util-utf8": "^2.0.0",
|
|
34
64
|
"tslib": "^2.5.0"
|
|
35
65
|
},
|
|
36
66
|
"devDependencies": {
|
|
@@ -57,10 +87,10 @@
|
|
|
57
87
|
"dist-*/**"
|
|
58
88
|
],
|
|
59
89
|
"browser": {
|
|
60
|
-
"./dist-es/client-sso-oidc-
|
|
90
|
+
"./dist-es/bundle/client-sso-oidc-node": "./dist-es/bundle/client-sso-oidc-browser"
|
|
61
91
|
},
|
|
62
92
|
"react-native": {
|
|
63
|
-
"./dist-es/client-sso-oidc-
|
|
93
|
+
"./dist-es/bundle/client-sso-oidc-node": "./dist-es/bundle/client-sso-oidc-browser"
|
|
64
94
|
},
|
|
65
95
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/token-providers",
|
|
66
96
|
"repository": {
|
/package/dist-types/{client-sso-oidc-bundle/dist-browser.d.ts → bundle/client-sso-oidc-browser.d.ts}
RENAMED
|
File without changes
|
/package/dist-types/{client-sso-oidc-bundle/dist-node.d.ts → bundle/client-sso-oidc-node.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist-types/ts3.4/{client-sso-oidc-bundle/dist-node.d.ts → bundle/client-sso-oidc-node.d.ts}
RENAMED
|
File without changes
|