Skip to content

Commit 6106ad2

Browse files
author
awstools
committed
feat(client-sso-oidc): This release includes exception definition and documentation updates.
1 parent 6368fb5 commit 6106ad2

File tree

8 files changed

+72
-20
lines changed

8 files changed

+72
-20
lines changed

clients/client-sso-oidc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ user’s access token upon successful authentication and authorization with IAM
1313
<b>API namespaces</b>
1414
</p>
1515
<p>IAM Identity Center uses the <code>sso</code> and <code>identitystore</code> API namespaces. IAM Identity Center
16-
OpenID Connect uses the <code>sso-oidc</code> namespace.</p>
16+
OpenID Connect uses the <code>sso-oauth</code> namespace.</p>
1717
<p>
1818
<b>Considerations for using this guide</b>
1919
</p>

clients/client-sso-oidc/src/SSOOIDC.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export interface SSOOIDC {
9696
* <b>API namespaces</b>
9797
* </p>
9898
* <p>IAM Identity Center uses the <code>sso</code> and <code>identitystore</code> API namespaces. IAM Identity Center
99-
* OpenID Connect uses the <code>sso-oidc</code> namespace.</p>
99+
* OpenID Connect uses the <code>sso-oauth</code> namespace.</p>
100100
* <p>
101101
* <b>Considerations for using this guide</b>
102102
* </p>

clients/client-sso-oidc/src/SSOOIDCClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export interface SSOOIDCClientResolvedConfig extends SSOOIDCClientResolvedConfig
287287
* <b>API namespaces</b>
288288
* </p>
289289
* <p>IAM Identity Center uses the <code>sso</code> and <code>identitystore</code> API namespaces. IAM Identity Center
290-
* OpenID Connect uses the <code>sso-oidc</code> namespace.</p>
290+
* OpenID Connect uses the <code>sso-oauth</code> namespace.</p>
291291
* <p>
292292
* <b>Considerations for using this guide</b>
293293
* </p>

clients/client-sso-oidc/src/commands/CreateTokenWithIAMCommand.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ export interface CreateTokenWithIAMCommandInput extends CreateTokenWithIAMReques
3333
export interface CreateTokenWithIAMCommandOutput extends CreateTokenWithIAMResponse, __MetadataBearer {}
3434

3535
/**
36-
* <p>Creates and returns access and refresh tokens for clients and applications that are
37-
* authenticated using IAM entities. The access token can be used to fetch short-lived
38-
* credentials for the assigned Amazon Web Services accounts or to access application APIs using
39-
* <code>bearer</code> authentication.</p>
36+
* <p>Creates and returns access and refresh tokens for authorized client applications that are
37+
* authenticated using any IAM entity, such as a service
38+
* role or user. These tokens might contain defined scopes that specify permissions such as <code>read:profile</code> or <code>write:data</code>. Through downscoping, you can use the scopes parameter to request tokens with reduced permissions compared to the original client application's permissions or, if applicable, the refresh token's scopes. The access token can be used to fetch short-lived credentials for the assigned
39+
* Amazon Web Services accounts or to access application APIs using <code>bearer</code> authentication.</p>
40+
* <note>
41+
* <p>This API is used with Signature Version 4. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html">Amazon Web Services Signature
42+
* Version 4 for API Requests</a>.</p>
43+
* </note>
4044
* @example
4145
* Use a bare-bones client and the command you need to make an API call.
4246
* ```javascript

clients/client-sso-oidc/src/commands/RegisterClientCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ export interface RegisterClientCommandOutput extends RegisterClientResponse, __M
9696
* @throws {@link InvalidScopeException} (client fault)
9797
* <p>Indicates that the scope provided in the request is invalid.</p>
9898
*
99+
* @throws {@link SlowDownException} (client fault)
100+
* <p>Indicates that the client is making the request too frequently and is more than the
101+
* service can handle. </p>
102+
*
99103
* @throws {@link UnsupportedGrantTypeException} (client fault)
100104
* <p>Indicates that the grant type in the request is not supported by the service.</p>
101105
*

clients/client-sso-oidc/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* <b>API namespaces</b>
99
* </p>
1010
* <p>IAM Identity Center uses the <code>sso</code> and <code>identitystore</code> API namespaces. IAM Identity Center
11-
* OpenID Connect uses the <code>sso-oidc</code> namespace.</p>
11+
* OpenID Connect uses the <code>sso-oauth</code> namespace.</p>
1212
* <p>
1313
* <b>Considerations for using this guide</b>
1414
* </p>

clients/client-sso-oidc/src/models/models_0.ts

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@ import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "
33

44
import { SSOOIDCServiceException as __BaseException } from "./SSOOIDCServiceException";
55

6+
/**
7+
* @public
8+
* @enum
9+
*/
10+
export const AccessDeniedExceptionReason = {
11+
KMS_ACCESS_DENIED: "KMS_AccessDeniedException",
12+
} as const;
13+
14+
/**
15+
* @public
16+
*/
17+
export type AccessDeniedExceptionReason =
18+
(typeof AccessDeniedExceptionReason)[keyof typeof AccessDeniedExceptionReason];
19+
620
/**
721
* <p>You do not have sufficient access to perform this action.</p>
822
* @public
@@ -16,6 +30,12 @@ export class AccessDeniedException extends __BaseException {
1630
*/
1731
error?: string | undefined;
1832

33+
/**
34+
* <p>A string that uniquely identifies a reason for the error.</p>
35+
* @public
36+
*/
37+
reason?: AccessDeniedExceptionReason | undefined;
38+
1939
/**
2040
* <p>Human-readable text providing additional information, used to assist the client developer
2141
* in understanding the error that occurred.</p>
@@ -33,6 +53,7 @@ export class AccessDeniedException extends __BaseException {
3353
});
3454
Object.setPrototypeOf(this, AccessDeniedException.prototype);
3555
this.error = opts.error;
56+
this.reason = opts.reason;
3657
this.error_description = opts.error_description;
3758
}
3859
}
@@ -74,15 +95,16 @@ export class AuthorizationPendingException extends __BaseException {
7495
}
7596

7697
/**
77-
* <p>This structure contains Amazon Web Services-specific parameter extensions for the token endpoint
78-
* responses and includes the identity context.</p>
98+
* <p>This structure contains Amazon Web Services-specific parameter extensions and the <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/trustedidentitypropagation-overview.html">identity context</a>.</p>
7999
* @public
80100
*/
81101
export interface AwsAdditionalDetails {
82102
/**
83-
* <p>STS context assertion that carries a user identifier to the Amazon Web Services service that it calls
84-
* and can be used to obtain an identity-enhanced IAM role session. This value corresponds to
85-
* the <code>sts:identity_context</code> claim in the ID token.</p>
103+
* <p>The trusted context assertion is signed and encrypted by STS. It provides access to
104+
* <code>sts:identity_context</code> claim in the <code>idToken</code> without JWT
105+
* parsing</p>
106+
* <p>Identity context comprises information that Amazon Web Services services use to make authorization
107+
* decisions when they receive requests.</p>
86108
* @public
87109
*/
88110
identityContext?: string | undefined;
@@ -144,9 +166,7 @@ export interface CreateTokenRequest {
144166
refreshToken?: string | undefined;
145167

146168
/**
147-
* <p>The list of scopes for which authorization is requested. The access token that is issued
148-
* is limited to the scopes that are granted. If this value is not specified, IAM Identity Center authorizes
149-
* all scopes that are configured for the client during the call to <a>RegisterClient</a>.</p>
169+
* <p>The list of scopes for which authorization is requested. This parameter has no effect; the access token will always include all scopes configured during client registration.</p>
150170
* @public
151171
*/
152172
scope?: string[] | undefined;
@@ -354,6 +374,23 @@ export class InvalidGrantException extends __BaseException {
354374
}
355375
}
356376

377+
/**
378+
* @public
379+
* @enum
380+
*/
381+
export const InvalidRequestExceptionReason = {
382+
KMS_DISABLED_KEY: "KMS_DisabledException",
383+
KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException",
384+
KMS_INVALID_STATE: "KMS_InvalidStateException",
385+
KMS_KEY_NOT_FOUND: "KMS_NotFoundException",
386+
} as const;
387+
388+
/**
389+
* @public
390+
*/
391+
export type InvalidRequestExceptionReason =
392+
(typeof InvalidRequestExceptionReason)[keyof typeof InvalidRequestExceptionReason];
393+
357394
/**
358395
* <p>Indicates that something is wrong with the input to the request. For example, a required
359396
* parameter might be missing or out of range.</p>
@@ -369,6 +406,12 @@ export class InvalidRequestException extends __BaseException {
369406
*/
370407
error?: string | undefined;
371408

409+
/**
410+
* <p>A string that uniquely identifies a reason for the error.</p>
411+
* @public
412+
*/
413+
reason?: InvalidRequestExceptionReason | undefined;
414+
372415
/**
373416
* <p>Human-readable text providing additional information, used to assist the client developer
374417
* in understanding the error that occurred.</p>
@@ -386,6 +429,7 @@ export class InvalidRequestException extends __BaseException {
386429
});
387430
Object.setPrototypeOf(this, InvalidRequestException.prototype);
388431
this.error = opts.error;
432+
this.reason = opts.reason;
389433
this.error_description = opts.error_description;
390434
}
391435
}
@@ -698,10 +742,8 @@ export interface CreateTokenWithIAMResponse {
698742
scope?: string[] | undefined;
699743

700744
/**
701-
* <p>A structure containing information from the <code>idToken</code>. Only the
702-
* <code>identityContext</code> is in it, which is a value extracted from the
703-
* <code>idToken</code>. This provides direct access to identity information without requiring
704-
* JWT parsing.</p>
745+
* <p>A structure containing information from IAM Identity Center managed user and group
746+
* information.</p>
705747
* @public
706748
*/
707749
awsAdditionalDetails?: AwsAdditionalDetails | undefined;

clients/client-sso-oidc/src/protocols/Aws_restJson1.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ const de_AccessDeniedExceptionRes = async (
343343
const doc = take(data, {
344344
error: __expectString,
345345
error_description: __expectString,
346+
reason: __expectString,
346347
});
347348
Object.assign(contents, doc);
348349
const exception = new AccessDeniedException({
@@ -511,6 +512,7 @@ const de_InvalidRequestExceptionRes = async (
511512
const doc = take(data, {
512513
error: __expectString,
513514
error_description: __expectString,
515+
reason: __expectString,
514516
});
515517
Object.assign(contents, doc);
516518
const exception = new InvalidRequestException({

0 commit comments

Comments
 (0)