@depup/aws-sdk__client-sso-oidc 3.1010.0-depup.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/LICENSE +201 -0
- package/README.md +39 -0
- package/changes.json +42 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +69 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +214 -0
- package/dist-cjs/models/SSOOIDCServiceException.js +12 -0
- package/dist-cjs/models/errors.js +250 -0
- package/dist-cjs/runtimeConfig.browser.js +38 -0
- package/dist-cjs/runtimeConfig.js +53 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +49 -0
- package/dist-cjs/schemas/schemas_0.js +246 -0
- package/dist-es/SSOOIDC.js +15 -0
- package/dist-es/SSOOIDCClient.js +50 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +63 -0
- package/dist-es/commands/CreateTokenCommand.js +16 -0
- package/dist-es/commands/CreateTokenWithIAMCommand.js +16 -0
- package/dist-es/commands/RegisterClientCommand.js +16 -0
- package/dist-es/commands/StartDeviceAuthorizationCommand.js +16 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/endpoint/EndpointParameters.js +13 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +8 -0
- package/dist-es/models/SSOOIDCServiceException.js +8 -0
- package/dist-es/models/enums.js +9 -0
- package/dist-es/models/errors.js +233 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/runtimeConfig.browser.js +33 -0
- package/dist-es/runtimeConfig.js +48 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +45 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +243 -0
- package/dist-types/SSOOIDC.d.ts +76 -0
- package/dist-types/SSOOIDCClient.d.ts +229 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/CreateTokenCommand.d.ts +176 -0
- package/dist-types/commands/CreateTokenWithIAMCommand.d.ts +272 -0
- package/dist-types/commands/RegisterClientCommand.d.ts +151 -0
- package/dist-types/commands/StartDeviceAuthorizationCommand.d.ts +125 -0
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +50 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +54 -0
- package/dist-types/models/SSOOIDCServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +25 -0
- package/dist-types/models/errors.d.ts +364 -0
- package/dist-types/models/models_0.d.ts +436 -0
- package/dist-types/runtimeConfig.browser.d.ts +63 -0
- package/dist-types/runtimeConfig.d.ts +63 -0
- package/dist-types/runtimeConfig.native.d.ts +62 -0
- package/dist-types/runtimeConfig.shared.d.ts +38 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +36 -0
- package/dist-types/ts3.4/SSOOIDC.d.ts +73 -0
- package/dist-types/ts3.4/SSOOIDCClient.d.ts +143 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
- package/dist-types/ts3.4/commands/CreateTokenCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/CreateTokenWithIAMCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/RegisterClientCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/StartDeviceAuthorizationCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +4 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +11 -0
- package/dist-types/ts3.4/models/SSOOIDCServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/enums.d.ts +13 -0
- package/dist-types/ts3.4/models/errors.d.ts +134 -0
- package/dist-types/ts3.4/models/models_0.d.ts +74 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +125 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +120 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +129 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +58 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +35 -0
- package/package.json +159 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
3
|
+
import { NoAuthSigner } from "@smithy/core";
|
|
4
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
5
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
6
|
+
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
7
|
+
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
8
|
+
import { defaultSSOOIDCHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
9
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
10
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
11
|
+
export const getRuntimeConfig = (config) => {
|
|
12
|
+
return {
|
|
13
|
+
apiVersion: "2019-06-10",
|
|
14
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
15
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
16
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
17
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
18
|
+
extensions: config?.extensions ?? [],
|
|
19
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOOIDCHttpAuthSchemeProvider,
|
|
20
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
21
|
+
{
|
|
22
|
+
schemeId: "aws.auth#sigv4",
|
|
23
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
24
|
+
signer: new AwsSdkSigV4Signer(),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
schemeId: "smithy.api#noAuth",
|
|
28
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
29
|
+
signer: new NoAuthSigner(),
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
33
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
34
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
35
|
+
defaultNamespace: "com.amazonaws.ssooidc",
|
|
36
|
+
errorTypeRegistries,
|
|
37
|
+
version: "2019-06-10",
|
|
38
|
+
serviceTarget: "AWSSSOOIDCService",
|
|
39
|
+
},
|
|
40
|
+
serviceId: config?.serviceId ?? "SSO OIDC",
|
|
41
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
42
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
43
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
|
2
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
3
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
4
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
7
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
8
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
9
|
+
};
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
const _A = "Assertion";
|
|
2
|
+
const _AAD = "AwsAdditionalDetails";
|
|
3
|
+
const _ADE = "AccessDeniedException";
|
|
4
|
+
const _APE = "AuthorizationPendingException";
|
|
5
|
+
const _AT = "AccessToken";
|
|
6
|
+
const _CS = "ClientSecret";
|
|
7
|
+
const _CT = "CreateToken";
|
|
8
|
+
const _CTR = "CreateTokenRequest";
|
|
9
|
+
const _CTRr = "CreateTokenResponse";
|
|
10
|
+
const _CTWIAM = "CreateTokenWithIAM";
|
|
11
|
+
const _CTWIAMR = "CreateTokenWithIAMRequest";
|
|
12
|
+
const _CTWIAMRr = "CreateTokenWithIAMResponse";
|
|
13
|
+
const _CV = "CodeVerifier";
|
|
14
|
+
const _ETE = "ExpiredTokenException";
|
|
15
|
+
const _ICE = "InvalidClientException";
|
|
16
|
+
const _ICME = "InvalidClientMetadataException";
|
|
17
|
+
const _IGE = "InvalidGrantException";
|
|
18
|
+
const _IRE = "InvalidRequestException";
|
|
19
|
+
const _IRRE = "InvalidRequestRegionException";
|
|
20
|
+
const _IRUE = "InvalidRedirectUriException";
|
|
21
|
+
const _ISE = "InternalServerException";
|
|
22
|
+
const _ISEn = "InvalidScopeException";
|
|
23
|
+
const _IT = "IdToken";
|
|
24
|
+
const _RC = "RegisterClient";
|
|
25
|
+
const _RCR = "RegisterClientRequest";
|
|
26
|
+
const _RCRe = "RegisterClientResponse";
|
|
27
|
+
const _RT = "RefreshToken";
|
|
28
|
+
const _SDA = "StartDeviceAuthorization";
|
|
29
|
+
const _SDAR = "StartDeviceAuthorizationRequest";
|
|
30
|
+
const _SDARt = "StartDeviceAuthorizationResponse";
|
|
31
|
+
const _SDE = "SlowDownException";
|
|
32
|
+
const _ST = "SubjectToken";
|
|
33
|
+
const _UCE = "UnauthorizedClientException";
|
|
34
|
+
const _UGTE = "UnsupportedGrantTypeException";
|
|
35
|
+
const _a = "assertion";
|
|
36
|
+
const _aAD = "awsAdditionalDetails";
|
|
37
|
+
const _aE = "authorizationEndpoint";
|
|
38
|
+
const _aT = "accessToken";
|
|
39
|
+
const _c = "client";
|
|
40
|
+
const _cI = "clientId";
|
|
41
|
+
const _cIIA = "clientIdIssuedAt";
|
|
42
|
+
const _cN = "clientName";
|
|
43
|
+
const _cS = "clientSecret";
|
|
44
|
+
const _cSEA = "clientSecretExpiresAt";
|
|
45
|
+
const _cT = "clientType";
|
|
46
|
+
const _cV = "codeVerifier";
|
|
47
|
+
const _co = "code";
|
|
48
|
+
const _dC = "deviceCode";
|
|
49
|
+
const _e = "error";
|
|
50
|
+
const _eAA = "entitledApplicationArn";
|
|
51
|
+
const _eI = "expiresIn";
|
|
52
|
+
const _ed = "error_description";
|
|
53
|
+
const _en = "endpoint";
|
|
54
|
+
const _gT = "grantType";
|
|
55
|
+
const _gTr = "grantTypes";
|
|
56
|
+
const _h = "http";
|
|
57
|
+
const _hE = "httpError";
|
|
58
|
+
const _i = "interval";
|
|
59
|
+
const _iC = "identityContext";
|
|
60
|
+
const _iT = "idToken";
|
|
61
|
+
const _iTT = "issuedTokenType";
|
|
62
|
+
const _iU = "issuerUrl";
|
|
63
|
+
const _r = "reason";
|
|
64
|
+
const _rT = "refreshToken";
|
|
65
|
+
const _rTT = "requestedTokenType";
|
|
66
|
+
const _rU = "redirectUri";
|
|
67
|
+
const _rUe = "redirectUris";
|
|
68
|
+
const _re = "region";
|
|
69
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.ssooidc";
|
|
70
|
+
const _sT = "subjectToken";
|
|
71
|
+
const _sTT = "subjectTokenType";
|
|
72
|
+
const _sU = "startUrl";
|
|
73
|
+
const _sc = "scope";
|
|
74
|
+
const _sco = "scopes";
|
|
75
|
+
const _se = "server";
|
|
76
|
+
const _tE = "tokenEndpoint";
|
|
77
|
+
const _tT = "tokenType";
|
|
78
|
+
const _uC = "userCode";
|
|
79
|
+
const _vU = "verificationUri";
|
|
80
|
+
const _vUC = "verificationUriComplete";
|
|
81
|
+
const n0 = "com.amazonaws.ssooidc";
|
|
82
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
83
|
+
import { AccessDeniedException, AuthorizationPendingException, ExpiredTokenException, InternalServerException, InvalidClientException, InvalidClientMetadataException, InvalidGrantException, InvalidRedirectUriException, InvalidRequestException, InvalidRequestRegionException, InvalidScopeException, SlowDownException, UnauthorizedClientException, UnsupportedGrantTypeException, } from "../models/errors";
|
|
84
|
+
import { SSOOIDCServiceException } from "../models/SSOOIDCServiceException";
|
|
85
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
86
|
+
export var SSOOIDCServiceException$ = [-3, _s, "SSOOIDCServiceException", 0, [], []];
|
|
87
|
+
_s_registry.registerError(SSOOIDCServiceException$, SSOOIDCServiceException);
|
|
88
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
89
|
+
export var AccessDeniedException$ = [-3, n0, _ADE,
|
|
90
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
91
|
+
[_e, _r, _ed],
|
|
92
|
+
[0, 0, 0]
|
|
93
|
+
];
|
|
94
|
+
n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
|
|
95
|
+
export var AuthorizationPendingException$ = [-3, n0, _APE,
|
|
96
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
97
|
+
[_e, _ed],
|
|
98
|
+
[0, 0]
|
|
99
|
+
];
|
|
100
|
+
n0_registry.registerError(AuthorizationPendingException$, AuthorizationPendingException);
|
|
101
|
+
export var ExpiredTokenException$ = [-3, n0, _ETE,
|
|
102
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
103
|
+
[_e, _ed],
|
|
104
|
+
[0, 0]
|
|
105
|
+
];
|
|
106
|
+
n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
|
|
107
|
+
export var InternalServerException$ = [-3, n0, _ISE,
|
|
108
|
+
{ [_e]: _se, [_hE]: 500 },
|
|
109
|
+
[_e, _ed],
|
|
110
|
+
[0, 0]
|
|
111
|
+
];
|
|
112
|
+
n0_registry.registerError(InternalServerException$, InternalServerException);
|
|
113
|
+
export var InvalidClientException$ = [-3, n0, _ICE,
|
|
114
|
+
{ [_e]: _c, [_hE]: 401 },
|
|
115
|
+
[_e, _ed],
|
|
116
|
+
[0, 0]
|
|
117
|
+
];
|
|
118
|
+
n0_registry.registerError(InvalidClientException$, InvalidClientException);
|
|
119
|
+
export var InvalidClientMetadataException$ = [-3, n0, _ICME,
|
|
120
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
121
|
+
[_e, _ed],
|
|
122
|
+
[0, 0]
|
|
123
|
+
];
|
|
124
|
+
n0_registry.registerError(InvalidClientMetadataException$, InvalidClientMetadataException);
|
|
125
|
+
export var InvalidGrantException$ = [-3, n0, _IGE,
|
|
126
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
127
|
+
[_e, _ed],
|
|
128
|
+
[0, 0]
|
|
129
|
+
];
|
|
130
|
+
n0_registry.registerError(InvalidGrantException$, InvalidGrantException);
|
|
131
|
+
export var InvalidRedirectUriException$ = [-3, n0, _IRUE,
|
|
132
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
133
|
+
[_e, _ed],
|
|
134
|
+
[0, 0]
|
|
135
|
+
];
|
|
136
|
+
n0_registry.registerError(InvalidRedirectUriException$, InvalidRedirectUriException);
|
|
137
|
+
export var InvalidRequestException$ = [-3, n0, _IRE,
|
|
138
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
139
|
+
[_e, _r, _ed],
|
|
140
|
+
[0, 0, 0]
|
|
141
|
+
];
|
|
142
|
+
n0_registry.registerError(InvalidRequestException$, InvalidRequestException);
|
|
143
|
+
export var InvalidRequestRegionException$ = [-3, n0, _IRRE,
|
|
144
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
145
|
+
[_e, _ed, _en, _re],
|
|
146
|
+
[0, 0, 0, 0]
|
|
147
|
+
];
|
|
148
|
+
n0_registry.registerError(InvalidRequestRegionException$, InvalidRequestRegionException);
|
|
149
|
+
export var InvalidScopeException$ = [-3, n0, _ISEn,
|
|
150
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
151
|
+
[_e, _ed],
|
|
152
|
+
[0, 0]
|
|
153
|
+
];
|
|
154
|
+
n0_registry.registerError(InvalidScopeException$, InvalidScopeException);
|
|
155
|
+
export var SlowDownException$ = [-3, n0, _SDE,
|
|
156
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
157
|
+
[_e, _ed],
|
|
158
|
+
[0, 0]
|
|
159
|
+
];
|
|
160
|
+
n0_registry.registerError(SlowDownException$, SlowDownException);
|
|
161
|
+
export var UnauthorizedClientException$ = [-3, n0, _UCE,
|
|
162
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
163
|
+
[_e, _ed],
|
|
164
|
+
[0, 0]
|
|
165
|
+
];
|
|
166
|
+
n0_registry.registerError(UnauthorizedClientException$, UnauthorizedClientException);
|
|
167
|
+
export var UnsupportedGrantTypeException$ = [-3, n0, _UGTE,
|
|
168
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
169
|
+
[_e, _ed],
|
|
170
|
+
[0, 0]
|
|
171
|
+
];
|
|
172
|
+
n0_registry.registerError(UnsupportedGrantTypeException$, UnsupportedGrantTypeException);
|
|
173
|
+
export const errorTypeRegistries = [
|
|
174
|
+
_s_registry,
|
|
175
|
+
n0_registry,
|
|
176
|
+
];
|
|
177
|
+
var AccessToken = [0, n0, _AT, 8, 0];
|
|
178
|
+
var Assertion = [0, n0, _A, 8, 0];
|
|
179
|
+
var ClientSecret = [0, n0, _CS, 8, 0];
|
|
180
|
+
var CodeVerifier = [0, n0, _CV, 8, 0];
|
|
181
|
+
var IdToken = [0, n0, _IT, 8, 0];
|
|
182
|
+
var RefreshToken = [0, n0, _RT, 8, 0];
|
|
183
|
+
var SubjectToken = [0, n0, _ST, 8, 0];
|
|
184
|
+
export var AwsAdditionalDetails$ = [3, n0, _AAD,
|
|
185
|
+
0,
|
|
186
|
+
[_iC],
|
|
187
|
+
[0]
|
|
188
|
+
];
|
|
189
|
+
export var CreateTokenRequest$ = [3, n0, _CTR,
|
|
190
|
+
0,
|
|
191
|
+
[_cI, _cS, _gT, _dC, _co, _rT, _sc, _rU, _cV],
|
|
192
|
+
[0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]], 3
|
|
193
|
+
];
|
|
194
|
+
export var CreateTokenResponse$ = [3, n0, _CTRr,
|
|
195
|
+
0,
|
|
196
|
+
[_aT, _tT, _eI, _rT, _iT],
|
|
197
|
+
[[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]]
|
|
198
|
+
];
|
|
199
|
+
export var CreateTokenWithIAMRequest$ = [3, n0, _CTWIAMR,
|
|
200
|
+
0,
|
|
201
|
+
[_cI, _gT, _co, _rT, _a, _sc, _rU, _sT, _sTT, _rTT, _cV],
|
|
202
|
+
[0, 0, 0, [() => RefreshToken, 0], [() => Assertion, 0], 64 | 0, 0, [() => SubjectToken, 0], 0, 0, [() => CodeVerifier, 0]], 2
|
|
203
|
+
];
|
|
204
|
+
export var CreateTokenWithIAMResponse$ = [3, n0, _CTWIAMRr,
|
|
205
|
+
0,
|
|
206
|
+
[_aT, _tT, _eI, _rT, _iT, _iTT, _sc, _aAD],
|
|
207
|
+
[[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0], 0, 64 | 0, () => AwsAdditionalDetails$]
|
|
208
|
+
];
|
|
209
|
+
export var RegisterClientRequest$ = [3, n0, _RCR,
|
|
210
|
+
0,
|
|
211
|
+
[_cN, _cT, _sco, _rUe, _gTr, _iU, _eAA],
|
|
212
|
+
[0, 0, 64 | 0, 64 | 0, 64 | 0, 0, 0], 2
|
|
213
|
+
];
|
|
214
|
+
export var RegisterClientResponse$ = [3, n0, _RCRe,
|
|
215
|
+
0,
|
|
216
|
+
[_cI, _cS, _cIIA, _cSEA, _aE, _tE],
|
|
217
|
+
[0, [() => ClientSecret, 0], 1, 1, 0, 0]
|
|
218
|
+
];
|
|
219
|
+
export var StartDeviceAuthorizationRequest$ = [3, n0, _SDAR,
|
|
220
|
+
0,
|
|
221
|
+
[_cI, _cS, _sU],
|
|
222
|
+
[0, [() => ClientSecret, 0], 0], 3
|
|
223
|
+
];
|
|
224
|
+
export var StartDeviceAuthorizationResponse$ = [3, n0, _SDARt,
|
|
225
|
+
0,
|
|
226
|
+
[_dC, _uC, _vU, _vUC, _eI, _i],
|
|
227
|
+
[0, 0, 0, 0, 1, 1]
|
|
228
|
+
];
|
|
229
|
+
var GrantTypes = 64 | 0;
|
|
230
|
+
var RedirectUris = 64 | 0;
|
|
231
|
+
var Scopes = 64 | 0;
|
|
232
|
+
export var CreateToken$ = [9, n0, _CT,
|
|
233
|
+
{ [_h]: ["POST", "/token", 200] }, () => CreateTokenRequest$, () => CreateTokenResponse$
|
|
234
|
+
];
|
|
235
|
+
export var CreateTokenWithIAM$ = [9, n0, _CTWIAM,
|
|
236
|
+
{ [_h]: ["POST", "/token?aws_iam=t", 200] }, () => CreateTokenWithIAMRequest$, () => CreateTokenWithIAMResponse$
|
|
237
|
+
];
|
|
238
|
+
export var RegisterClient$ = [9, n0, _RC,
|
|
239
|
+
{ [_h]: ["POST", "/client/register", 200] }, () => RegisterClientRequest$, () => RegisterClientResponse$
|
|
240
|
+
];
|
|
241
|
+
export var StartDeviceAuthorization$ = [9, n0, _SDA,
|
|
242
|
+
{ [_h]: ["POST", "/device_authorization", 200] }, () => StartDeviceAuthorizationRequest$, () => StartDeviceAuthorizationResponse$
|
|
243
|
+
];
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { CreateTokenCommandInput, CreateTokenCommandOutput } from "./commands/CreateTokenCommand";
|
|
3
|
+
import { CreateTokenWithIAMCommandInput, CreateTokenWithIAMCommandOutput } from "./commands/CreateTokenWithIAMCommand";
|
|
4
|
+
import { RegisterClientCommandInput, RegisterClientCommandOutput } from "./commands/RegisterClientCommand";
|
|
5
|
+
import { StartDeviceAuthorizationCommandInput, StartDeviceAuthorizationCommandOutput } from "./commands/StartDeviceAuthorizationCommand";
|
|
6
|
+
import { SSOOIDCClient } from "./SSOOIDCClient";
|
|
7
|
+
export interface SSOOIDC {
|
|
8
|
+
/**
|
|
9
|
+
* @see {@link CreateTokenCommand}
|
|
10
|
+
*/
|
|
11
|
+
createToken(args: CreateTokenCommandInput, options?: __HttpHandlerOptions): Promise<CreateTokenCommandOutput>;
|
|
12
|
+
createToken(args: CreateTokenCommandInput, cb: (err: any, data?: CreateTokenCommandOutput) => void): void;
|
|
13
|
+
createToken(args: CreateTokenCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateTokenCommandOutput) => void): void;
|
|
14
|
+
/**
|
|
15
|
+
* @see {@link CreateTokenWithIAMCommand}
|
|
16
|
+
*/
|
|
17
|
+
createTokenWithIAM(args: CreateTokenWithIAMCommandInput, options?: __HttpHandlerOptions): Promise<CreateTokenWithIAMCommandOutput>;
|
|
18
|
+
createTokenWithIAM(args: CreateTokenWithIAMCommandInput, cb: (err: any, data?: CreateTokenWithIAMCommandOutput) => void): void;
|
|
19
|
+
createTokenWithIAM(args: CreateTokenWithIAMCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateTokenWithIAMCommandOutput) => void): void;
|
|
20
|
+
/**
|
|
21
|
+
* @see {@link RegisterClientCommand}
|
|
22
|
+
*/
|
|
23
|
+
registerClient(args: RegisterClientCommandInput, options?: __HttpHandlerOptions): Promise<RegisterClientCommandOutput>;
|
|
24
|
+
registerClient(args: RegisterClientCommandInput, cb: (err: any, data?: RegisterClientCommandOutput) => void): void;
|
|
25
|
+
registerClient(args: RegisterClientCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RegisterClientCommandOutput) => void): void;
|
|
26
|
+
/**
|
|
27
|
+
* @see {@link StartDeviceAuthorizationCommand}
|
|
28
|
+
*/
|
|
29
|
+
startDeviceAuthorization(args: StartDeviceAuthorizationCommandInput, options?: __HttpHandlerOptions): Promise<StartDeviceAuthorizationCommandOutput>;
|
|
30
|
+
startDeviceAuthorization(args: StartDeviceAuthorizationCommandInput, cb: (err: any, data?: StartDeviceAuthorizationCommandOutput) => void): void;
|
|
31
|
+
startDeviceAuthorization(args: StartDeviceAuthorizationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartDeviceAuthorizationCommandOutput) => void): void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* <p>IAM Identity Center OpenID Connect (OIDC) is a web service that enables a client (such as CLI or a
|
|
35
|
+
* native application) to register with IAM Identity Center. The service also enables the client to fetch the
|
|
36
|
+
* user’s access token upon successful authentication and authorization with IAM Identity Center.</p>
|
|
37
|
+
* <p>
|
|
38
|
+
* <b>API namespaces</b>
|
|
39
|
+
* </p>
|
|
40
|
+
* <p>IAM Identity Center uses the <code>sso</code> and <code>identitystore</code> API namespaces. IAM Identity Center
|
|
41
|
+
* OpenID Connect uses the <code>sso-oauth</code> namespace.</p>
|
|
42
|
+
* <p>
|
|
43
|
+
* <b>Considerations for using this guide</b>
|
|
44
|
+
* </p>
|
|
45
|
+
* <p>Before you begin using this guide, we recommend that you first review the following
|
|
46
|
+
* important information about how the IAM Identity Center OIDC service works.</p>
|
|
47
|
+
* <ul>
|
|
48
|
+
* <li>
|
|
49
|
+
* <p>The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0 Device
|
|
50
|
+
* Authorization Grant standard (<a href="https://tools.ietf.org/html/rfc8628">https://tools.ietf.org/html/rfc8628</a>) that are necessary to enable single
|
|
51
|
+
* sign-on authentication with the CLI. </p>
|
|
52
|
+
* </li>
|
|
53
|
+
* <li>
|
|
54
|
+
* <p>With older versions of the CLI, the service only emits OIDC access tokens, so to
|
|
55
|
+
* obtain a new token, users must explicitly re-authenticate. To access the OIDC flow that
|
|
56
|
+
* supports token refresh and doesn’t require re-authentication, update to the latest CLI
|
|
57
|
+
* version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with support for OIDC token refresh
|
|
58
|
+
* and configurable IAM Identity Center session durations. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/configure-user-session.html">Configure Amazon Web Services access portal session duration </a>. </p>
|
|
59
|
+
* </li>
|
|
60
|
+
* <li>
|
|
61
|
+
* <p>The access tokens provided by this service grant access to all Amazon Web Services account
|
|
62
|
+
* entitlements assigned to an IAM Identity Center user, not just a particular application.</p>
|
|
63
|
+
* </li>
|
|
64
|
+
* <li>
|
|
65
|
+
* <p>The documentation in this guide does not describe the mechanism to convert the access
|
|
66
|
+
* token into Amazon Web Services Auth (“sigv4”) credentials for use with IAM-protected Amazon Web Services service
|
|
67
|
+
* endpoints. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html">GetRoleCredentials</a> in the <i>IAM Identity Center Portal API Reference
|
|
68
|
+
* Guide</i>.</p>
|
|
69
|
+
* </li>
|
|
70
|
+
* </ul>
|
|
71
|
+
* <p>For general information about IAM Identity Center, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html">What is
|
|
72
|
+
* IAM Identity Center?</a> in the <i>IAM Identity Center User Guide</i>.</p>
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
export declare class SSOOIDC extends SSOOIDCClient implements SSOOIDC {
|
|
76
|
+
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { type HostHeaderInputConfig, type HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
2
|
+
import { type UserAgentInputConfig, type UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
3
|
+
import { type RegionInputConfig, type RegionResolvedConfig } from "@smithy/config-resolver";
|
|
4
|
+
import { type EndpointInputConfig, type EndpointResolvedConfig } from "@smithy/middleware-endpoint";
|
|
5
|
+
import { type RetryInputConfig, type RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
6
|
+
import type { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
7
|
+
import { type DefaultsMode as __DefaultsMode, type SmithyConfiguration as __SmithyConfiguration, type SmithyResolvedConfiguration as __SmithyResolvedConfiguration, Client as __Client } from "@smithy/smithy-client";
|
|
8
|
+
import { type BodyLengthCalculator as __BodyLengthCalculator, type CheckOptionalClientConfig as __CheckOptionalClientConfig, type ChecksumConstructor as __ChecksumConstructor, type Decoder as __Decoder, type Encoder as __Encoder, type HashConstructor as __HashConstructor, type HttpHandlerOptions as __HttpHandlerOptions, type Logger as __Logger, type Provider as __Provider, type StreamCollector as __StreamCollector, type UrlParser as __UrlParser, AwsCredentialIdentityProvider, Provider, UserAgent as __UserAgent } from "@smithy/types";
|
|
9
|
+
import { type HttpAuthSchemeInputConfig, type HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
10
|
+
import { CreateTokenCommandInput, CreateTokenCommandOutput } from "./commands/CreateTokenCommand";
|
|
11
|
+
import { CreateTokenWithIAMCommandInput, CreateTokenWithIAMCommandOutput } from "./commands/CreateTokenWithIAMCommand";
|
|
12
|
+
import { RegisterClientCommandInput, RegisterClientCommandOutput } from "./commands/RegisterClientCommand";
|
|
13
|
+
import { StartDeviceAuthorizationCommandInput, StartDeviceAuthorizationCommandOutput } from "./commands/StartDeviceAuthorizationCommand";
|
|
14
|
+
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
15
|
+
import { type RuntimeExtension, type RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
16
|
+
export { __Client };
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export type ServiceInputTypes = CreateTokenCommandInput | CreateTokenWithIAMCommandInput | RegisterClientCommandInput | StartDeviceAuthorizationCommandInput;
|
|
21
|
+
/**
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export type ServiceOutputTypes = CreateTokenCommandOutput | CreateTokenWithIAMCommandOutput | RegisterClientCommandOutput | StartDeviceAuthorizationCommandOutput;
|
|
25
|
+
/**
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
|
|
29
|
+
/**
|
|
30
|
+
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
|
|
31
|
+
*/
|
|
32
|
+
requestHandler?: __HttpHandlerUserInput;
|
|
33
|
+
/**
|
|
34
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
35
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
39
|
+
/**
|
|
40
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
urlParser?: __UrlParser;
|
|
44
|
+
/**
|
|
45
|
+
* A function that can calculate the length of a request body.
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
49
|
+
/**
|
|
50
|
+
* A function that converts a stream into an array of bytes.
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
streamCollector?: __StreamCollector;
|
|
54
|
+
/**
|
|
55
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
base64Decoder?: __Decoder;
|
|
59
|
+
/**
|
|
60
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
base64Encoder?: __Encoder;
|
|
64
|
+
/**
|
|
65
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
utf8Decoder?: __Decoder;
|
|
69
|
+
/**
|
|
70
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
utf8Encoder?: __Encoder;
|
|
74
|
+
/**
|
|
75
|
+
* The runtime environment.
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
runtime?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
81
|
+
* trait of an operation.
|
|
82
|
+
*/
|
|
83
|
+
disableHostPrefix?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Unique service identifier.
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
serviceId?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
91
|
+
*/
|
|
92
|
+
useDualstackEndpoint?: boolean | __Provider<boolean>;
|
|
93
|
+
/**
|
|
94
|
+
* Enables FIPS compatible endpoints.
|
|
95
|
+
*/
|
|
96
|
+
useFipsEndpoint?: boolean | __Provider<boolean>;
|
|
97
|
+
/**
|
|
98
|
+
* The AWS region to which this client will send requests
|
|
99
|
+
*/
|
|
100
|
+
region?: string | __Provider<string>;
|
|
101
|
+
/**
|
|
102
|
+
* Setting a client profile is similar to setting a value for the
|
|
103
|
+
* AWS_PROFILE environment variable. Setting a profile on a client
|
|
104
|
+
* in code only affects the single client instance, unlike AWS_PROFILE.
|
|
105
|
+
*
|
|
106
|
+
* When set, and only for environments where an AWS configuration
|
|
107
|
+
* file exists, fields configurable by this file will be retrieved
|
|
108
|
+
* from the specified profile within that file.
|
|
109
|
+
* Conflicting code configuration and environment variables will
|
|
110
|
+
* still have higher priority.
|
|
111
|
+
*
|
|
112
|
+
* For client credential resolution that involves checking the AWS
|
|
113
|
+
* configuration file, the client's profile (this value) will be
|
|
114
|
+
* used unless a different profile is set in the credential
|
|
115
|
+
* provider options.
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
118
|
+
profile?: string;
|
|
119
|
+
/**
|
|
120
|
+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
124
|
+
/**
|
|
125
|
+
* Default credentials provider; Not available in browser runtime.
|
|
126
|
+
* @deprecated
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
|
|
130
|
+
/**
|
|
131
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
132
|
+
*/
|
|
133
|
+
maxAttempts?: number | __Provider<number>;
|
|
134
|
+
/**
|
|
135
|
+
* Specifies which retry algorithm to use.
|
|
136
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
137
|
+
*
|
|
138
|
+
*/
|
|
139
|
+
retryMode?: string | __Provider<string>;
|
|
140
|
+
/**
|
|
141
|
+
* Optional logger for logging debug/info/warn/error.
|
|
142
|
+
*/
|
|
143
|
+
logger?: __Logger;
|
|
144
|
+
/**
|
|
145
|
+
* Optional extensions
|
|
146
|
+
*/
|
|
147
|
+
extensions?: RuntimeExtension[];
|
|
148
|
+
/**
|
|
149
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
150
|
+
*/
|
|
151
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
156
|
+
export type SSOOIDCClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
|
|
157
|
+
/**
|
|
158
|
+
* @public
|
|
159
|
+
*
|
|
160
|
+
* The configuration interface of SSOOIDCClient class constructor that set the region, credentials and other options.
|
|
161
|
+
*/
|
|
162
|
+
export interface SSOOIDCClientConfig extends SSOOIDCClientConfigType {
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* @public
|
|
166
|
+
*/
|
|
167
|
+
export type SSOOIDCClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
|
168
|
+
/**
|
|
169
|
+
* @public
|
|
170
|
+
*
|
|
171
|
+
* The resolved configuration interface of SSOOIDCClient class. This is resolved and normalized from the {@link SSOOIDCClientConfig | constructor configuration interface}.
|
|
172
|
+
*/
|
|
173
|
+
export interface SSOOIDCClientResolvedConfig extends SSOOIDCClientResolvedConfigType {
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* <p>IAM Identity Center OpenID Connect (OIDC) is a web service that enables a client (such as CLI or a
|
|
177
|
+
* native application) to register with IAM Identity Center. The service also enables the client to fetch the
|
|
178
|
+
* user’s access token upon successful authentication and authorization with IAM Identity Center.</p>
|
|
179
|
+
* <p>
|
|
180
|
+
* <b>API namespaces</b>
|
|
181
|
+
* </p>
|
|
182
|
+
* <p>IAM Identity Center uses the <code>sso</code> and <code>identitystore</code> API namespaces. IAM Identity Center
|
|
183
|
+
* OpenID Connect uses the <code>sso-oauth</code> namespace.</p>
|
|
184
|
+
* <p>
|
|
185
|
+
* <b>Considerations for using this guide</b>
|
|
186
|
+
* </p>
|
|
187
|
+
* <p>Before you begin using this guide, we recommend that you first review the following
|
|
188
|
+
* important information about how the IAM Identity Center OIDC service works.</p>
|
|
189
|
+
* <ul>
|
|
190
|
+
* <li>
|
|
191
|
+
* <p>The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0 Device
|
|
192
|
+
* Authorization Grant standard (<a href="https://tools.ietf.org/html/rfc8628">https://tools.ietf.org/html/rfc8628</a>) that are necessary to enable single
|
|
193
|
+
* sign-on authentication with the CLI. </p>
|
|
194
|
+
* </li>
|
|
195
|
+
* <li>
|
|
196
|
+
* <p>With older versions of the CLI, the service only emits OIDC access tokens, so to
|
|
197
|
+
* obtain a new token, users must explicitly re-authenticate. To access the OIDC flow that
|
|
198
|
+
* supports token refresh and doesn’t require re-authentication, update to the latest CLI
|
|
199
|
+
* version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with support for OIDC token refresh
|
|
200
|
+
* and configurable IAM Identity Center session durations. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/configure-user-session.html">Configure Amazon Web Services access portal session duration </a>. </p>
|
|
201
|
+
* </li>
|
|
202
|
+
* <li>
|
|
203
|
+
* <p>The access tokens provided by this service grant access to all Amazon Web Services account
|
|
204
|
+
* entitlements assigned to an IAM Identity Center user, not just a particular application.</p>
|
|
205
|
+
* </li>
|
|
206
|
+
* <li>
|
|
207
|
+
* <p>The documentation in this guide does not describe the mechanism to convert the access
|
|
208
|
+
* token into Amazon Web Services Auth (“sigv4”) credentials for use with IAM-protected Amazon Web Services service
|
|
209
|
+
* endpoints. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html">GetRoleCredentials</a> in the <i>IAM Identity Center Portal API Reference
|
|
210
|
+
* Guide</i>.</p>
|
|
211
|
+
* </li>
|
|
212
|
+
* </ul>
|
|
213
|
+
* <p>For general information about IAM Identity Center, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html">What is
|
|
214
|
+
* IAM Identity Center?</a> in the <i>IAM Identity Center User Guide</i>.</p>
|
|
215
|
+
* @public
|
|
216
|
+
*/
|
|
217
|
+
export declare class SSOOIDCClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, SSOOIDCClientResolvedConfig> {
|
|
218
|
+
/**
|
|
219
|
+
* The resolved configuration of SSOOIDCClient class. This is resolved and normalized from the {@link SSOOIDCClientConfig | constructor configuration interface}.
|
|
220
|
+
*/
|
|
221
|
+
readonly config: SSOOIDCClientResolvedConfig;
|
|
222
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<SSOOIDCClientConfig>);
|
|
223
|
+
/**
|
|
224
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
225
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
226
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
227
|
+
*/
|
|
228
|
+
destroy(): void;
|
|
229
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type HttpAuthScheme, AwsCredentialIdentity, AwsCredentialIdentityProvider } from "@smithy/types";
|
|
2
|
+
import type { SSOOIDCHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface HttpAuthExtensionConfiguration {
|
|
7
|
+
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
|
|
8
|
+
httpAuthSchemes(): HttpAuthScheme[];
|
|
9
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider: SSOOIDCHttpAuthSchemeProvider): void;
|
|
10
|
+
httpAuthSchemeProvider(): SSOOIDCHttpAuthSchemeProvider;
|
|
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: SSOOIDCHttpAuthSchemeProvider;
|
|
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;
|