@aws-sdk/client-sso-oidc 3.451.0 → 3.455.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.
Files changed (48) hide show
  1. package/README.md +20 -13
  2. package/dist-cjs/SSOOIDC.js +2 -0
  3. package/dist-cjs/SSOOIDCClient.js +6 -4
  4. package/dist-cjs/commands/CreateTokenCommand.js +3 -2
  5. package/dist-cjs/commands/CreateTokenWithIAMCommand.js +54 -0
  6. package/dist-cjs/commands/RegisterClientCommand.js +2 -1
  7. package/dist-cjs/commands/StartDeviceAuthorizationCommand.js +2 -1
  8. package/dist-cjs/commands/index.js +1 -0
  9. package/dist-cjs/endpoint/EndpointParameters.js +1 -1
  10. package/dist-cjs/models/models_0.js +56 -1
  11. package/dist-cjs/protocols/Aws_restJson1.js +124 -1
  12. package/dist-cjs/runtimeConfig.browser.js +1 -0
  13. package/dist-cjs/runtimeConfig.js +3 -0
  14. package/dist-es/SSOOIDC.js +2 -0
  15. package/dist-es/SSOOIDCClient.js +6 -4
  16. package/dist-es/commands/CreateTokenCommand.js +3 -2
  17. package/dist-es/commands/CreateTokenWithIAMCommand.js +50 -0
  18. package/dist-es/commands/RegisterClientCommand.js +2 -1
  19. package/dist-es/commands/StartDeviceAuthorizationCommand.js +2 -1
  20. package/dist-es/commands/index.js +1 -0
  21. package/dist-es/endpoint/EndpointParameters.js +1 -1
  22. package/dist-es/models/models_0.js +48 -0
  23. package/dist-es/protocols/Aws_restJson1.js +122 -1
  24. package/dist-es/runtimeConfig.browser.js +1 -0
  25. package/dist-es/runtimeConfig.js +3 -0
  26. package/dist-types/SSOOIDC.d.ts +19 -13
  27. package/dist-types/SSOOIDCClient.d.ts +24 -17
  28. package/dist-types/commands/CreateTokenCommand.d.ts +50 -3
  29. package/dist-types/commands/CreateTokenWithIAMCommand.d.ts +258 -0
  30. package/dist-types/commands/RegisterClientCommand.d.ts +24 -0
  31. package/dist-types/commands/StartDeviceAuthorizationCommand.d.ts +23 -0
  32. package/dist-types/commands/index.d.ts +1 -0
  33. package/dist-types/index.d.ts +12 -13
  34. package/dist-types/models/models_0.d.ts +364 -36
  35. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  36. package/dist-types/runtimeConfig.browser.d.ts +7 -0
  37. package/dist-types/runtimeConfig.d.ts +7 -0
  38. package/dist-types/runtimeConfig.native.d.ts +7 -0
  39. package/dist-types/ts3.4/SSOOIDC.d.ts +17 -0
  40. package/dist-types/ts3.4/SSOOIDCClient.d.ts +14 -0
  41. package/dist-types/ts3.4/commands/CreateTokenWithIAMCommand.d.ts +39 -0
  42. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  43. package/dist-types/ts3.4/models/models_0.d.ts +50 -0
  44. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
  45. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +24 -0
  46. package/dist-types/ts3.4/runtimeConfig.d.ts +24 -0
  47. package/dist-types/ts3.4/runtimeConfig.native.d.ts +24 -0
  48. package/package.json +4 -1
@@ -0,0 +1,258 @@
1
+ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
4
+ import { CreateTokenWithIAMRequest, CreateTokenWithIAMResponse } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, SSOOIDCClientResolvedConfig } from "../SSOOIDCClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link CreateTokenWithIAMCommand}.
14
+ */
15
+ export interface CreateTokenWithIAMCommandInput extends CreateTokenWithIAMRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link CreateTokenWithIAMCommand}.
21
+ */
22
+ export interface CreateTokenWithIAMCommandOutput extends CreateTokenWithIAMResponse, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Creates and returns access and refresh tokens for clients and applications that are
27
+ * authenticated using IAM entities. The access token can be used to fetch short-term credentials
28
+ * for the assigned AWS accounts or to access application APIs using <code>bearer</code>
29
+ * authentication.</p>
30
+ * @example
31
+ * Use a bare-bones client and the command you need to make an API call.
32
+ * ```javascript
33
+ * import { SSOOIDCClient, CreateTokenWithIAMCommand } from "@aws-sdk/client-sso-oidc"; // ES Modules import
34
+ * // const { SSOOIDCClient, CreateTokenWithIAMCommand } = require("@aws-sdk/client-sso-oidc"); // CommonJS import
35
+ * const client = new SSOOIDCClient(config);
36
+ * const input = { // CreateTokenWithIAMRequest
37
+ * clientId: "STRING_VALUE", // required
38
+ * grantType: "STRING_VALUE", // required
39
+ * code: "STRING_VALUE",
40
+ * refreshToken: "STRING_VALUE",
41
+ * assertion: "STRING_VALUE",
42
+ * scope: [ // Scopes
43
+ * "STRING_VALUE",
44
+ * ],
45
+ * redirectUri: "STRING_VALUE",
46
+ * subjectToken: "STRING_VALUE",
47
+ * subjectTokenType: "STRING_VALUE",
48
+ * requestedTokenType: "STRING_VALUE",
49
+ * };
50
+ * const command = new CreateTokenWithIAMCommand(input);
51
+ * const response = await client.send(command);
52
+ * // { // CreateTokenWithIAMResponse
53
+ * // accessToken: "STRING_VALUE",
54
+ * // tokenType: "STRING_VALUE",
55
+ * // expiresIn: Number("int"),
56
+ * // refreshToken: "STRING_VALUE",
57
+ * // idToken: "STRING_VALUE",
58
+ * // issuedTokenType: "STRING_VALUE",
59
+ * // scope: [ // Scopes
60
+ * // "STRING_VALUE",
61
+ * // ],
62
+ * // };
63
+ *
64
+ * ```
65
+ *
66
+ * @param CreateTokenWithIAMCommandInput - {@link CreateTokenWithIAMCommandInput}
67
+ * @returns {@link CreateTokenWithIAMCommandOutput}
68
+ * @see {@link CreateTokenWithIAMCommandInput} for command's `input` shape.
69
+ * @see {@link CreateTokenWithIAMCommandOutput} for command's `response` shape.
70
+ * @see {@link SSOOIDCClientResolvedConfig | config} for SSOOIDCClient's `config` shape.
71
+ *
72
+ * @throws {@link AccessDeniedException} (client fault)
73
+ * <p>You do not have sufficient access to perform this action.</p>
74
+ *
75
+ * @throws {@link AuthorizationPendingException} (client fault)
76
+ * <p>Indicates that a request to authorize a client with an access user session token is
77
+ * pending.</p>
78
+ *
79
+ * @throws {@link ExpiredTokenException} (client fault)
80
+ * <p>Indicates that the token issued by the service is expired and is no longer valid.</p>
81
+ *
82
+ * @throws {@link InternalServerException} (server fault)
83
+ * <p>Indicates that an error from the service occurred while trying to process a
84
+ * request.</p>
85
+ *
86
+ * @throws {@link InvalidClientException} (client fault)
87
+ * <p>Indicates that the <code>clientId</code> or <code>clientSecret</code> in the request is
88
+ * invalid. For example, this can occur when a client sends an incorrect <code>clientId</code> or
89
+ * an expired <code>clientSecret</code>.</p>
90
+ *
91
+ * @throws {@link InvalidGrantException} (client fault)
92
+ * <p>Indicates that a request contains an invalid grant. This can occur if a client makes a
93
+ * <a>CreateToken</a> request with an invalid grant type.</p>
94
+ *
95
+ * @throws {@link InvalidRequestException} (client fault)
96
+ * <p>Indicates that something is wrong with the input to the request. For example, a required
97
+ * parameter might be missing or out of range.</p>
98
+ *
99
+ * @throws {@link InvalidRequestRegionException} (client fault)
100
+ * <p>Indicates that a token provided as input to the request was issued by and is only usable
101
+ * by calling IAM Identity Center endpoints in another region.</p>
102
+ *
103
+ * @throws {@link InvalidScopeException} (client fault)
104
+ * <p>Indicates that the scope provided in the request is invalid.</p>
105
+ *
106
+ * @throws {@link SlowDownException} (client fault)
107
+ * <p>Indicates that the client is making the request too frequently and is more than the
108
+ * service can handle. </p>
109
+ *
110
+ * @throws {@link UnauthorizedClientException} (client fault)
111
+ * <p>Indicates that the client is not currently authorized to make the request. This can happen
112
+ * when a <code>clientId</code> is not issued for a public client.</p>
113
+ *
114
+ * @throws {@link UnsupportedGrantTypeException} (client fault)
115
+ * <p>Indicates that the grant type in the request is not supported by the service.</p>
116
+ *
117
+ * @throws {@link SSOOIDCServiceException}
118
+ * <p>Base exception class for all service exceptions from SSOOIDC service.</p>
119
+ *
120
+ * @example Call OAuth/OIDC /token endpoint for Authorization Code grant with IAM authentication
121
+ * ```javascript
122
+ * //
123
+ * const input = {
124
+ * "clientId": "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
125
+ * "code": "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzg0In0EXAMPLEAUTHCODE",
126
+ * "grantType": "authorization_code",
127
+ * "redirectUri": "https://mywebapp.example/redirect",
128
+ * "scope": [
129
+ * "openid",
130
+ * "aws",
131
+ * "sts:identity_context"
132
+ * ]
133
+ * };
134
+ * const command = new CreateTokenWithIAMCommand(input);
135
+ * const response = await client.send(command);
136
+ * /* response ==
137
+ * {
138
+ * "accessToken": "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
139
+ * "expiresIn": 1579729529,
140
+ * "idToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
141
+ * "issuedTokenType": "urn:ietf:params:oauth:token-type:refresh_token",
142
+ * "refreshToken": "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
143
+ * "scope": [
144
+ * "openid",
145
+ * "aws",
146
+ * "sts:identity_context"
147
+ * ],
148
+ * "tokenType": "Bearer"
149
+ * }
150
+ * *\/
151
+ * // example id: create-token-with-iam-for-auth-code
152
+ * ```
153
+ *
154
+ * @example Call OAuth/OIDC /token endpoint for Refresh Token grant with IAM authentication
155
+ * ```javascript
156
+ * //
157
+ * const input = {
158
+ * "clientId": "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
159
+ * "grantType": "refresh_token",
160
+ * "refreshToken": "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN"
161
+ * };
162
+ * const command = new CreateTokenWithIAMCommand(input);
163
+ * const response = await client.send(command);
164
+ * /* response ==
165
+ * {
166
+ * "accessToken": "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
167
+ * "expiresIn": 1579729529,
168
+ * "issuedTokenType": "urn:ietf:params:oauth:token-type:refresh_token",
169
+ * "refreshToken": "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
170
+ * "scope": [
171
+ * "openid",
172
+ * "aws",
173
+ * "sts:identity_context"
174
+ * ],
175
+ * "tokenType": "Bearer"
176
+ * }
177
+ * *\/
178
+ * // example id: create-token-with-iam-for-refresh-token
179
+ * ```
180
+ *
181
+ * @example Call OAuth/OIDC /token endpoint for JWT Bearer grant with IAM authentication
182
+ * ```javascript
183
+ * //
184
+ * const input = {
185
+ * "assertion": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjFMVE16YWtpaGlSbGFfOHoyQkVKVlhlV01xbyJ9.eyJ2ZXIiOiIyLjAiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vOTEyMjA0MGQtNmM2Ny00YzViLWIxMTItMzZhMzA0YjY2ZGFkL3YyLjAiLCJzdWIiOiJBQUFBQUFBQUFBQUFBQUFBQUFBQUFJa3pxRlZyU2FTYUZIeTc4MmJidGFRIiwiYXVkIjoiNmNiMDQwMTgtYTNmNS00NmE3LWI5OTUtOTQwYzc4ZjVhZWYzIiwiZXhwIjoxNTM2MzYxNDExLCJpYXQiOjE1MzYyNzQ3MTEsIm5iZiI6MTUzNjI3NDcxMSwibmFtZSI6IkFiZSBMaW5jb2xuIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiQWJlTGlAbWljcm9zb2Z0LmNvbSIsIm9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC02NmYzLTMzMzJlY2E3ZWE4MSIsInRpZCI6IjkxMjIwNDBkLTZjNjctNGM1Yi1iMTEyLTM2YTMwNGI2NmRhZCIsIm5vbmNlIjoiMTIzNTIzIiwiYWlvIjoiRGYyVVZYTDFpeCFsTUNXTVNPSkJjRmF0emNHZnZGR2hqS3Y4cTVnMHg3MzJkUjVNQjVCaXN2R1FPN1lXQnlqZDhpUURMcSFlR2JJRGFreXA1bW5PcmNkcUhlWVNubHRlcFFtUnA2QUlaOGpZIn0.1AFWW-Ck5nROwSlltm7GzZvDwUkqvhSQpm55TQsmVo9Y59cLhRXpvB8n-55HCr9Z6G_31_UbeUkoz612I2j_Sm9FFShSDDjoaLQr54CreGIJvjtmS3EkK9a7SJBbcpL1MpUtlfygow39tFjY7EVNW9plWUvRrTgVk7lYLprvfzw-CIqw3gHC-T7IK_m_xkr08INERBtaecwhTeN4chPC4W3jdmw_lIxzC48YoQ0dB1L9-ImX98Egypfrlbm0IBL5spFzL6JDZIRRJOu8vecJvj1mq-IUhGt0MacxX8jdxYLP-KUu2d9MbNKpCKJuZ7p8gwTL5B7NlUdh_dmSviPWrw",
186
+ * "clientId": "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
187
+ * "grantType": "urn:ietf:params:oauth:grant-type:jwt-bearer"
188
+ * };
189
+ * const command = new CreateTokenWithIAMCommand(input);
190
+ * const response = await client.send(command);
191
+ * /* response ==
192
+ * {
193
+ * "accessToken": "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
194
+ * "expiresIn": 1579729529,
195
+ * "idToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
196
+ * "issuedTokenType": "urn:ietf:params:oauth:token-type:refresh_token",
197
+ * "refreshToken": "aorvJYubGpU6i91YnH7Mfo-AT2fIVa1zCfA_Rvq9yjVKIP3onFmmykuQ7E93y2I-9Nyj-A_sVvMufaLNL0bqnDRtgAkc0:MGUCMFrRsktMRVlWaOR70XGMFGLL0SlcCw4DiYveIiOVx1uK9BbD0gvAddsW3UTLozXKMgIxAJ3qxUvjpnlLIOaaKOoa/FuNgqJVvr9GMwDtnAtlh9iZzAkEXAMPLEREFRESHTOKEN",
198
+ * "scope": [
199
+ * "openid",
200
+ * "aws",
201
+ * "sts:identity_context"
202
+ * ],
203
+ * "tokenType": "Bearer"
204
+ * }
205
+ * *\/
206
+ * // example id: create-token-with-iam-for-jwt-bearer
207
+ * ```
208
+ *
209
+ * @example Call OAuth/OIDC /token endpoint for Token Exchange grant with IAM authentication
210
+ * ```javascript
211
+ * //
212
+ * const input = {
213
+ * "clientId": "arn:aws:sso::123456789012:application/ssoins-111111111111/apl-222222222222",
214
+ * "grantType": "urn:ietf:params:oauth:grant-type:token-exchange",
215
+ * "requestedTokenType": "urn:ietf:params:oauth:token-type:access_token",
216
+ * "subjectToken": "aoak-Hig8TUDPNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZDIFFERENTACCESSTOKEN",
217
+ * "subjectTokenType": "urn:ietf:params:oauth:token-type:access_token"
218
+ * };
219
+ * const command = new CreateTokenWithIAMCommand(input);
220
+ * const response = await client.send(command);
221
+ * /* response ==
222
+ * {
223
+ * "accessToken": "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
224
+ * "expiresIn": 1579729529,
225
+ * "idToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.5SYiW1kMsuUr7nna-l5tlakM0GNbMHvIM2_n0QD23jM",
226
+ * "issuedTokenType": "urn:ietf:params:oauth:token-type:access_token",
227
+ * "scope": [
228
+ * "openid",
229
+ * "aws",
230
+ * "sts:identity_context"
231
+ * ],
232
+ * "tokenType": "Bearer"
233
+ * }
234
+ * *\/
235
+ * // example id: create-token-with-iam-for-token-exchange
236
+ * ```
237
+ *
238
+ */
239
+ export declare class CreateTokenWithIAMCommand extends $Command<CreateTokenWithIAMCommandInput, CreateTokenWithIAMCommandOutput, SSOOIDCClientResolvedConfig> {
240
+ readonly input: CreateTokenWithIAMCommandInput;
241
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
242
+ /**
243
+ * @public
244
+ */
245
+ constructor(input: CreateTokenWithIAMCommandInput);
246
+ /**
247
+ * @internal
248
+ */
249
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SSOOIDCClientResolvedConfig, options?: __HttpHandlerOptions): Handler<CreateTokenWithIAMCommandInput, CreateTokenWithIAMCommandOutput>;
250
+ /**
251
+ * @internal
252
+ */
253
+ private serialize;
254
+ /**
255
+ * @internal
256
+ */
257
+ private deserialize;
258
+ }
@@ -75,6 +75,30 @@ export interface RegisterClientCommandOutput extends RegisterClientResponse, __M
75
75
  * @throws {@link SSOOIDCServiceException}
76
76
  * <p>Base exception class for all service exceptions from SSOOIDC service.</p>
77
77
  *
78
+ * @example Call OAuth/OIDC /register-client endpoint
79
+ * ```javascript
80
+ * //
81
+ * const input = {
82
+ * "clientName": "My IDE Plugin",
83
+ * "clientType": "public",
84
+ * "scopes": [
85
+ * "sso:account:access",
86
+ * "codewhisperer:completions"
87
+ * ]
88
+ * };
89
+ * const command = new RegisterClientCommand(input);
90
+ * const response = await client.send(command);
91
+ * /* response ==
92
+ * {
93
+ * "clientId": "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
94
+ * "clientIdIssuedAt": 1579725929,
95
+ * "clientSecret": "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
96
+ * "clientSecretExpiresAt": 1587584729
97
+ * }
98
+ * *\/
99
+ * // example id: register-client
100
+ * ```
101
+ *
78
102
  */
79
103
  export declare class RegisterClientCommand extends $Command<RegisterClientCommandInput, RegisterClientCommandOutput, SSOOIDCClientResolvedConfig> {
80
104
  readonly input: RegisterClientCommandInput;
@@ -79,6 +79,29 @@ export interface StartDeviceAuthorizationCommandOutput extends StartDeviceAuthor
79
79
  * @throws {@link SSOOIDCServiceException}
80
80
  * <p>Base exception class for all service exceptions from SSOOIDC service.</p>
81
81
  *
82
+ * @example Call OAuth/OIDC /start-device-authorization endpoint
83
+ * ```javascript
84
+ * //
85
+ * const input = {
86
+ * "clientId": "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID",
87
+ * "clientSecret": "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0",
88
+ * "startUrl": "https://identitycenter.amazonaws.com/ssoins-111111111111"
89
+ * };
90
+ * const command = new StartDeviceAuthorizationCommand(input);
91
+ * const response = await client.send(command);
92
+ * /* response ==
93
+ * {
94
+ * "deviceCode": "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE",
95
+ * "expiresIn": 1579729529,
96
+ * "interval": 1,
97
+ * "userCode": "makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
98
+ * "verificationUri": "https://device.sso.us-west-2.amazonaws.com",
99
+ * "verificationUriComplete": "https://device.sso.us-west-2.amazonaws.com?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE"
100
+ * }
101
+ * *\/
102
+ * // example id: start-device-authorization
103
+ * ```
104
+ *
82
105
  */
83
106
  export declare class StartDeviceAuthorizationCommand extends $Command<StartDeviceAuthorizationCommandInput, StartDeviceAuthorizationCommandOutput, SSOOIDCClientResolvedConfig> {
84
107
  readonly input: StartDeviceAuthorizationCommandInput;
@@ -1,3 +1,4 @@
1
1
  export * from "./CreateTokenCommand";
2
+ export * from "./CreateTokenWithIAMCommand";
2
3
  export * from "./RegisterClientCommand";
3
4
  export * from "./StartDeviceAuthorizationCommand";
@@ -1,12 +1,10 @@
1
1
  /**
2
- * <p>AWS IAM Identity Center (successor to AWS Single Sign-On) OpenID Connect (OIDC) is a web service that enables a client (such as AWS CLI
2
+ * <p>IAM Identity Center OpenID Connect (OIDC) is a web service that enables a client (such as CLI
3
3
  * or a native application) to register with IAM Identity Center. The service also enables the client to
4
4
  * fetch the user’s access token upon successful authentication and authorization with
5
5
  * IAM Identity Center.</p>
6
6
  * <note>
7
- * <p>Although AWS Single Sign-On was renamed, the <code>sso</code> and
8
- * <code>identitystore</code> API namespaces will continue to retain their original name for
9
- * backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">IAM Identity Center rename</a>.</p>
7
+ * <p>IAM Identity Center uses the <code>sso</code> and <code>identitystore</code> API namespaces.</p>
10
8
  * </note>
11
9
  * <p>
12
10
  * <b>Considerations for Using This Guide</b>
@@ -15,23 +13,24 @@
15
13
  * important information about how the IAM Identity Center OIDC service works.</p>
16
14
  * <ul>
17
15
  * <li>
18
- * <p>The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0
19
- * Device Authorization Grant standard (<a href="https://tools.ietf.org/html/rfc8628">https://tools.ietf.org/html/rfc8628</a>) that are necessary to enable single
20
- * sign-on authentication with the AWS CLI. Support for other OIDC flows frequently needed
21
- * for native applications, such as Authorization Code Flow (+ PKCE), will be addressed in
22
- * future releases.</p>
16
+ * <p>The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0 Device
17
+ * Authorization Grant standard (<a href="https://tools.ietf.org/html/rfc8628">https://tools.ietf.org/html/rfc8628</a>) that are necessary to enable single
18
+ * sign-on authentication with the CLI. </p>
23
19
  * </li>
24
20
  * <li>
25
- * <p>The service emits only OIDC access tokens, such that obtaining a new token (For
26
- * example, token refresh) requires explicit user re-authentication.</p>
21
+ * <p>With older versions of the CLI, the service only emits OIDC access tokens, so to
22
+ * obtain a new token, users must explicitly re-authenticate. To access the OIDC flow that
23
+ * supports token refresh and doesn’t require re-authentication, update to the latest CLI
24
+ * version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with support for OIDC token refresh and
25
+ * 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>
27
26
  * </li>
28
27
  * <li>
29
- * <p>The access tokens provided by this service grant access to all AWS account
28
+ * <p>The access tokens provided by this service grant access to all Amazon Web Services account
30
29
  * entitlements assigned to an IAM Identity Center user, not just a particular application.</p>
31
30
  * </li>
32
31
  * <li>
33
32
  * <p>The documentation in this guide does not describe the mechanism to convert the access
34
- * token into AWS Auth (“sigv4”) credentials for use with IAM-protected AWS service
33
+ * token into Amazon Web Services Auth (“sigv4”) credentials for use with IAM-protected Amazon Web Services service
35
34
  * 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
36
35
  * Guide</i>.</p>
37
36
  * </li>