@aws-sdk/client-sso-oidc 3.181.0 → 3.183.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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-sso-oidc
9
+
10
+
11
+
12
+
13
+
14
+ # [3.182.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.181.0...v3.182.0) (2022-09-30)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-sso-oidc
17
+
18
+
19
+
20
+
21
+
6
22
  # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
7
23
 
8
24
 
package/README.md CHANGED
@@ -9,24 +9,46 @@
9
9
 
10
10
  AWS SDK for JavaScript SSOOIDC Client for Node.js, Browser and React Native.
11
11
 
12
- <p>AWS Single Sign-On (SSO) OpenID Connect (OIDC) is a web service that enables a client
13
- (such as AWS CLI or a native application) to register with AWS SSO. The service also
14
- enables the client to fetch the user’s access token upon successful authentication and
15
- authorization with AWS SSO. This service conforms with the OAuth 2.0 based implementation of
16
- the device authorization grant standard (<a href="https://tools.ietf.org/html/rfc8628">https://tools.ietf.org/html/rfc8628</a>).</p>
17
-
18
- <p>For general information about AWS SSO, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html">What is AWS
19
- Single Sign-On?</a> in the <i>AWS SSO User Guide</i>.</p>
20
-
21
- <p>This API reference guide describes the AWS SSO OIDC operations that you can call
22
- programatically and includes detailed information on data types and errors.</p>
23
-
12
+ <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
13
+ or a native application) to register with IAM Identity Center. The service also enables the client to
14
+ fetch the user’s access token upon successful authentication and authorization with
15
+ IAM Identity Center.</p>
24
16
  <note>
25
- <p>AWS provides SDKs that consist of libraries and sample code for various programming
26
- languages and platforms such as Java, Ruby, .Net, iOS, and Android. The SDKs provide a
27
- convenient way to create programmatic access to AWS SSO and other AWS services. For more
28
- information about the AWS SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
17
+ <p>Although AWS Single Sign-On was renamed, the <code>sso</code> and
18
+ <code>identitystore</code> API namespaces will continue to retain their original name for
19
+ 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>
29
20
  </note>
21
+ <p>
22
+ <b>Considerations for Using This Guide</b>
23
+ </p>
24
+ <p>Before you begin using this guide, we recommend that you first review the following
25
+ important information about how the IAM Identity Center OIDC service works.</p>
26
+ <ul>
27
+ <li>
28
+ <p>The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0
29
+ 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
30
+ sign-on authentication with the AWS CLI. Support for other OIDC flows frequently needed
31
+ for native applications, such as Authorization Code Flow (+ PKCE), will be addressed in
32
+ future releases.</p>
33
+ </li>
34
+ <li>
35
+ <p>The service emits only OIDC access tokens, such that obtaining a new token (For
36
+ example, token refresh) requires explicit user re-authentication.</p>
37
+ </li>
38
+ <li>
39
+ <p>The access tokens provided by this service grant access to all AWS account
40
+ entitlements assigned to an IAM Identity Center user, not just a particular application.</p>
41
+ </li>
42
+ <li>
43
+ <p>The documentation in this guide does not describe the mechanism to convert the access
44
+ token into AWS Auth (“sigv4”) credentials for use with IAM-protected AWS service
45
+ 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
46
+ Guide</i>.</p>
47
+ </li>
48
+ </ul>
49
+
50
+ <p>For general information about IAM Identity Center, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html">What is
51
+ IAM Identity Center?</a> in the <i>IAM Identity Center User Guide</i>.</p>
30
52
 
31
53
  ## Installing
32
54
 
@@ -1,55 +1,48 @@
1
- import { __extends } from "tslib";
2
1
  import { CreateTokenCommand } from "./commands/CreateTokenCommand";
3
2
  import { RegisterClientCommand, } from "./commands/RegisterClientCommand";
4
3
  import { StartDeviceAuthorizationCommand, } from "./commands/StartDeviceAuthorizationCommand";
5
4
  import { SSOOIDCClient } from "./SSOOIDCClient";
6
- var SSOOIDC = (function (_super) {
7
- __extends(SSOOIDC, _super);
8
- function SSOOIDC() {
9
- return _super !== null && _super.apply(this, arguments) || this;
10
- }
11
- SSOOIDC.prototype.createToken = function (args, optionsOrCb, cb) {
12
- var command = new CreateTokenCommand(args);
5
+ export class SSOOIDC extends SSOOIDCClient {
6
+ createToken(args, optionsOrCb, cb) {
7
+ const command = new CreateTokenCommand(args);
13
8
  if (typeof optionsOrCb === "function") {
14
9
  this.send(command, optionsOrCb);
15
10
  }
16
11
  else if (typeof cb === "function") {
17
12
  if (typeof optionsOrCb !== "object")
18
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
13
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
19
14
  this.send(command, optionsOrCb || {}, cb);
20
15
  }
21
16
  else {
22
17
  return this.send(command, optionsOrCb);
23
18
  }
24
- };
25
- SSOOIDC.prototype.registerClient = function (args, optionsOrCb, cb) {
26
- var command = new RegisterClientCommand(args);
19
+ }
20
+ registerClient(args, optionsOrCb, cb) {
21
+ const command = new RegisterClientCommand(args);
27
22
  if (typeof optionsOrCb === "function") {
28
23
  this.send(command, optionsOrCb);
29
24
  }
30
25
  else if (typeof cb === "function") {
31
26
  if (typeof optionsOrCb !== "object")
32
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
27
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
33
28
  this.send(command, optionsOrCb || {}, cb);
34
29
  }
35
30
  else {
36
31
  return this.send(command, optionsOrCb);
37
32
  }
38
- };
39
- SSOOIDC.prototype.startDeviceAuthorization = function (args, optionsOrCb, cb) {
40
- var command = new StartDeviceAuthorizationCommand(args);
33
+ }
34
+ startDeviceAuthorization(args, optionsOrCb, cb) {
35
+ const command = new StartDeviceAuthorizationCommand(args);
41
36
  if (typeof optionsOrCb === "function") {
42
37
  this.send(command, optionsOrCb);
43
38
  }
44
39
  else if (typeof cb === "function") {
45
40
  if (typeof optionsOrCb !== "object")
46
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
41
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
47
42
  this.send(command, optionsOrCb || {}, cb);
48
43
  }
49
44
  else {
50
45
  return this.send(command, optionsOrCb);
51
46
  }
52
- };
53
- return SSOOIDC;
54
- }(SSOOIDCClient));
55
- export { SSOOIDC };
47
+ }
48
+ }
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
2
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
3
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -8,29 +7,24 @@ import { getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
8
7
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
9
8
  import { Client as __Client, } from "@aws-sdk/smithy-client";
10
9
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
11
- var SSOOIDCClient = (function (_super) {
12
- __extends(SSOOIDCClient, _super);
13
- function SSOOIDCClient(configuration) {
14
- var _this = this;
15
- var _config_0 = __getRuntimeConfig(configuration);
16
- var _config_1 = resolveRegionConfig(_config_0);
17
- var _config_2 = resolveEndpointsConfig(_config_1);
18
- var _config_3 = resolveRetryConfig(_config_2);
19
- var _config_4 = resolveHostHeaderConfig(_config_3);
20
- var _config_5 = resolveUserAgentConfig(_config_4);
21
- _this = _super.call(this, _config_5) || this;
22
- _this.config = _config_5;
23
- _this.middlewareStack.use(getRetryPlugin(_this.config));
24
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
25
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
26
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
27
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
28
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
29
- return _this;
10
+ export class SSOOIDCClient extends __Client {
11
+ constructor(configuration) {
12
+ const _config_0 = __getRuntimeConfig(configuration);
13
+ const _config_1 = resolveRegionConfig(_config_0);
14
+ const _config_2 = resolveEndpointsConfig(_config_1);
15
+ const _config_3 = resolveRetryConfig(_config_2);
16
+ const _config_4 = resolveHostHeaderConfig(_config_3);
17
+ const _config_5 = resolveUserAgentConfig(_config_4);
18
+ super(_config_5);
19
+ this.config = _config_5;
20
+ this.middlewareStack.use(getRetryPlugin(this.config));
21
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
22
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
23
+ this.middlewareStack.use(getLoggerPlugin(this.config));
24
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
25
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
30
26
  }
31
- SSOOIDCClient.prototype.destroy = function () {
32
- _super.prototype.destroy.call(this);
33
- };
34
- return SSOOIDCClient;
35
- }(__Client));
36
- export { SSOOIDCClient };
27
+ destroy() {
28
+ super.destroy();
29
+ }
30
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1CreateTokenCommand, serializeAws_restJson1CreateTokenCommand, } from "../protocols/Aws_restJson1";
6
- var CreateTokenCommand = (function (_super) {
7
- __extends(CreateTokenCommand, _super);
8
- function CreateTokenCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CreateTokenCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CreateTokenCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "SSOOIDCClient";
18
- var commandName = "CreateTokenCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "SSOOIDCClient";
15
+ const commandName = "CreateTokenCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CreateTokenRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CreateTokenResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CreateTokenCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1CreateTokenCommand(input, context);
33
- };
34
- CreateTokenCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1CreateTokenCommand(output, context);
36
- };
37
- return CreateTokenCommand;
38
- }($Command));
39
- export { CreateTokenCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { RegisterClientRequestFilterSensitiveLog, RegisterClientResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1RegisterClientCommand, serializeAws_restJson1RegisterClientCommand, } from "../protocols/Aws_restJson1";
6
- var RegisterClientCommand = (function (_super) {
7
- __extends(RegisterClientCommand, _super);
8
- function RegisterClientCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class RegisterClientCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- RegisterClientCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "SSOOIDCClient";
18
- var commandName = "RegisterClientCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "SSOOIDCClient";
15
+ const commandName = "RegisterClientCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: RegisterClientRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: RegisterClientResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- RegisterClientCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1RegisterClientCommand(input, context);
33
- };
34
- RegisterClientCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1RegisterClientCommand(output, context);
36
- };
37
- return RegisterClientCommand;
38
- }($Command));
39
- export { RegisterClientCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { StartDeviceAuthorizationRequestFilterSensitiveLog, StartDeviceAuthorizationResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1StartDeviceAuthorizationCommand, serializeAws_restJson1StartDeviceAuthorizationCommand, } from "../protocols/Aws_restJson1";
6
- var StartDeviceAuthorizationCommand = (function (_super) {
7
- __extends(StartDeviceAuthorizationCommand, _super);
8
- function StartDeviceAuthorizationCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class StartDeviceAuthorizationCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- StartDeviceAuthorizationCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "SSOOIDCClient";
18
- var commandName = "StartDeviceAuthorizationCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "SSOOIDCClient";
15
+ const commandName = "StartDeviceAuthorizationCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: StartDeviceAuthorizationRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: StartDeviceAuthorizationResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- StartDeviceAuthorizationCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1StartDeviceAuthorizationCommand(input, context);
33
- };
34
- StartDeviceAuthorizationCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1StartDeviceAuthorizationCommand(output, context);
36
- };
37
- return StartDeviceAuthorizationCommand;
38
- }($Command));
39
- export { StartDeviceAuthorizationCommand };
31
+ }
32
+ }
@@ -1,6 +1,5 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
- var regionHash = {
2
+ const regionHash = {
4
3
  "ap-east-1": {
5
4
  variants: [
6
5
  {
@@ -191,7 +190,7 @@ var regionHash = {
191
190
  signingRegion: "us-west-2",
192
191
  },
193
192
  };
194
- var partitionHash = {
193
+ const partitionHash = {
195
194
  aws: {
196
195
  regions: [
197
196
  "af-south-1",
@@ -311,8 +310,9 @@ var partitionHash = {
311
310
  ],
312
311
  },
313
312
  };
314
- export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
315
- return __generator(this, function (_a) {
316
- return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "awsssooidc", regionHash: regionHash, partitionHash: partitionHash }))];
317
- });
318
- }); };
313
+ export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
314
+ ...options,
315
+ signingService: "awsssooidc",
316
+ regionHash,
317
+ partitionHash,
318
+ });
@@ -1,12 +1,7 @@
1
- import { __extends } from "tslib";
2
1
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
- var SSOOIDCServiceException = (function (_super) {
4
- __extends(SSOOIDCServiceException, _super);
5
- function SSOOIDCServiceException(options) {
6
- var _this = _super.call(this, options) || this;
7
- Object.setPrototypeOf(_this, SSOOIDCServiceException.prototype);
8
- return _this;
2
+ export class SSOOIDCServiceException extends __ServiceException {
3
+ constructor(options) {
4
+ super(options);
5
+ Object.setPrototypeOf(this, SSOOIDCServiceException.prototype);
9
6
  }
10
- return SSOOIDCServiceException;
11
- }(__ServiceException));
12
- export { SSOOIDCServiceException };
7
+ }