Skip to content

Commit a440c98

Browse files
committed
chore(nested-clients): generate nested clients
1 parent b094ec4 commit a440c98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+10764
-3
lines changed

packages/nested-clients/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@
4444
"files": [
4545
"dist-*/**"
4646
],
47-
"browser": {},
48-
"react-native": {},
47+
"browser": {
48+
"./dist-es/nested-sts/runtimeConfig": "./dist-es/nested-sts/runtimeConfig.browser",
49+
"./dist-es/nested-sso-oidc/runtimeConfig": "./dist-es/nested-sso-oidc/runtimeConfig.browser"
50+
},
51+
"react-native": {
52+
"./dist-es/nested-sts/runtimeConfig": "./dist-es/nested-sts/runtimeConfig.native",
53+
"./dist-es/nested-sso-oidc/runtimeConfig": "./dist-es/nested-sso-oidc/runtimeConfig.native"
54+
},
4955
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
5056
"repository": {
5157
"type": "git",
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
export {};
1+
export { SSOOIDCClient, CreateTokenCommand } from "./nested-sso-oidc/index";
2+
export { STSClient, AssumeRoleCommand, AssumeRoleWithWebIdentityCommand } from "./nested-sts/index";
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
// smithy-typescript generated code
2+
import { createAggregatedClient } from "@smithy/smithy-client";
3+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
4+
5+
import { CreateTokenCommand, CreateTokenCommandInput, CreateTokenCommandOutput } from "./commands/CreateTokenCommand";
6+
import {
7+
CreateTokenWithIAMCommand,
8+
CreateTokenWithIAMCommandInput,
9+
CreateTokenWithIAMCommandOutput,
10+
} from "./commands/CreateTokenWithIAMCommand";
11+
import {
12+
RegisterClientCommand,
13+
RegisterClientCommandInput,
14+
RegisterClientCommandOutput,
15+
} from "./commands/RegisterClientCommand";
16+
import {
17+
StartDeviceAuthorizationCommand,
18+
StartDeviceAuthorizationCommandInput,
19+
StartDeviceAuthorizationCommandOutput,
20+
} from "./commands/StartDeviceAuthorizationCommand";
21+
import { SSOOIDCClient, SSOOIDCClientConfig } from "./SSOOIDCClient";
22+
23+
const commands = {
24+
CreateTokenCommand,
25+
CreateTokenWithIAMCommand,
26+
RegisterClientCommand,
27+
StartDeviceAuthorizationCommand,
28+
};
29+
30+
export interface SSOOIDC {
31+
/**
32+
* @see {@link CreateTokenCommand}
33+
*/
34+
createToken(args: CreateTokenCommandInput, options?: __HttpHandlerOptions): Promise<CreateTokenCommandOutput>;
35+
createToken(args: CreateTokenCommandInput, cb: (err: any, data?: CreateTokenCommandOutput) => void): void;
36+
createToken(
37+
args: CreateTokenCommandInput,
38+
options: __HttpHandlerOptions,
39+
cb: (err: any, data?: CreateTokenCommandOutput) => void
40+
): void;
41+
42+
/**
43+
* @see {@link CreateTokenWithIAMCommand}
44+
*/
45+
createTokenWithIAM(
46+
args: CreateTokenWithIAMCommandInput,
47+
options?: __HttpHandlerOptions
48+
): Promise<CreateTokenWithIAMCommandOutput>;
49+
createTokenWithIAM(
50+
args: CreateTokenWithIAMCommandInput,
51+
cb: (err: any, data?: CreateTokenWithIAMCommandOutput) => void
52+
): void;
53+
createTokenWithIAM(
54+
args: CreateTokenWithIAMCommandInput,
55+
options: __HttpHandlerOptions,
56+
cb: (err: any, data?: CreateTokenWithIAMCommandOutput) => void
57+
): void;
58+
59+
/**
60+
* @see {@link RegisterClientCommand}
61+
*/
62+
registerClient(
63+
args: RegisterClientCommandInput,
64+
options?: __HttpHandlerOptions
65+
): Promise<RegisterClientCommandOutput>;
66+
registerClient(args: RegisterClientCommandInput, cb: (err: any, data?: RegisterClientCommandOutput) => void): void;
67+
registerClient(
68+
args: RegisterClientCommandInput,
69+
options: __HttpHandlerOptions,
70+
cb: (err: any, data?: RegisterClientCommandOutput) => void
71+
): void;
72+
73+
/**
74+
* @see {@link StartDeviceAuthorizationCommand}
75+
*/
76+
startDeviceAuthorization(
77+
args: StartDeviceAuthorizationCommandInput,
78+
options?: __HttpHandlerOptions
79+
): Promise<StartDeviceAuthorizationCommandOutput>;
80+
startDeviceAuthorization(
81+
args: StartDeviceAuthorizationCommandInput,
82+
cb: (err: any, data?: StartDeviceAuthorizationCommandOutput) => void
83+
): void;
84+
startDeviceAuthorization(
85+
args: StartDeviceAuthorizationCommandInput,
86+
options: __HttpHandlerOptions,
87+
cb: (err: any, data?: StartDeviceAuthorizationCommandOutput) => void
88+
): void;
89+
}
90+
91+
/**
92+
* <p>IAM Identity Center OpenID Connect (OIDC) is a web service that enables a client (such as CLI
93+
* or a native application) to register with IAM Identity Center. The service also enables the client to
94+
* fetch the user’s access token upon successful authentication and authorization with
95+
* IAM Identity Center.</p>
96+
* <note>
97+
* <p>IAM Identity Center uses the <code>sso</code> and <code>identitystore</code> API namespaces.</p>
98+
* </note>
99+
* <p>
100+
* <b>Considerations for Using This Guide</b>
101+
* </p>
102+
* <p>Before you begin using this guide, we recommend that you first review the following
103+
* important information about how the IAM Identity Center OIDC service works.</p>
104+
* <ul>
105+
* <li>
106+
* <p>The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0 Device
107+
* Authorization Grant standard (<a href="https://tools.ietf.org/html/rfc8628">https://tools.ietf.org/html/rfc8628</a>) that are necessary to enable single
108+
* sign-on authentication with the CLI. </p>
109+
* </li>
110+
* <li>
111+
* <p>With older versions of the CLI, the service only emits OIDC access tokens, so to
112+
* obtain a new token, users must explicitly re-authenticate. To access the OIDC flow that
113+
* supports token refresh and doesn’t require re-authentication, update to the latest CLI
114+
* version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with support for OIDC token refresh and
115+
* 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>
116+
* </li>
117+
* <li>
118+
* <p>The access tokens provided by this service grant access to all Amazon Web Services account
119+
* entitlements assigned to an IAM Identity Center user, not just a particular application.</p>
120+
* </li>
121+
* <li>
122+
* <p>The documentation in this guide does not describe the mechanism to convert the access
123+
* token into Amazon Web Services Auth (“sigv4”) credentials for use with IAM-protected Amazon Web Services service
124+
* 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
125+
* Guide</i>.</p>
126+
* </li>
127+
* </ul>
128+
* <p>For general information about IAM Identity Center, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html">What is
129+
* IAM Identity Center?</a> in the <i>IAM Identity Center User Guide</i>.</p>
130+
* @public
131+
*/
132+
export class SSOOIDC extends SSOOIDCClient implements SSOOIDC {}
133+
createAggregatedClient(commands, SSOOIDC);

0 commit comments

Comments
 (0)