@aws-sdk/client-signin 3.1156.0 → 3.1158.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 (38) hide show
  1. package/README.md +8 -2
  2. package/dist-cjs/index.js +120 -3
  3. package/dist-es/Signin.js +2 -0
  4. package/dist-es/auth/httpAuthSchemeProvider.js +6 -0
  5. package/dist-es/commands/CreateOAuth2TokenWithTokenExchangeCommand.js +4 -0
  6. package/dist-es/commands/index.js +1 -0
  7. package/dist-es/models/enums.js +7 -0
  8. package/dist-es/models/errors.js +46 -0
  9. package/dist-es/schemas/schemas_0.js +48 -3
  10. package/dist-types/Signin.d.ts +8 -2
  11. package/dist-types/SigninClient.d.ts +4 -4
  12. package/dist-types/commands/CreateOAuth2TokenCommand.d.ts +5 -59
  13. package/dist-types/commands/CreateOAuth2TokenWithIAMCommand.d.ts +5 -33
  14. package/dist-types/commands/CreateOAuth2TokenWithTokenExchangeCommand.d.ts +96 -0
  15. package/dist-types/commands/DeleteConsoleAuthorizationConfigurationCommand.d.ts +4 -31
  16. package/dist-types/commands/DeleteResourcePermissionStatementCommand.d.ts +4 -31
  17. package/dist-types/commands/GetConsoleAuthorizationConfigurationCommand.d.ts +4 -31
  18. package/dist-types/commands/GetResourcePolicyCommand.d.ts +3 -25
  19. package/dist-types/commands/IntrospectOAuth2TokenWithIAMCommand.d.ts +6 -40
  20. package/dist-types/commands/ListResourcePermissionStatementsCommand.d.ts +4 -31
  21. package/dist-types/commands/PutConsoleAuthorizationConfigurationCommand.d.ts +4 -31
  22. package/dist-types/commands/PutResourcePermissionStatementCommand.d.ts +4 -31
  23. package/dist-types/commands/RevokeOAuth2TokenWithIAMCommand.d.ts +5 -38
  24. package/dist-types/commands/index.d.ts +1 -0
  25. package/dist-types/index.d.ts +1 -2
  26. package/dist-types/models/enums.d.ts +16 -9
  27. package/dist-types/models/errors.d.ts +63 -39
  28. package/dist-types/models/models_0.d.ts +113 -68
  29. package/dist-types/schemas/schemas_0.d.ts +6 -0
  30. package/dist-types/ts3.4/Signin.d.ts +17 -0
  31. package/dist-types/ts3.4/SigninClient.d.ts +6 -0
  32. package/dist-types/ts3.4/commands/CreateOAuth2TokenWithTokenExchangeCommand.d.ts +42 -0
  33. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  34. package/dist-types/ts3.4/models/enums.d.ts +7 -0
  35. package/dist-types/ts3.4/models/errors.d.ts +22 -0
  36. package/dist-types/ts3.4/models/models_0.d.ts +13 -0
  37. package/dist-types/ts3.4/schemas/schemas_0.d.ts +6 -0
  38. package/package.json +6 -6
@@ -58,14 +58,7 @@ declare const PutResourcePermissionStatementCommand_base: {
58
58
  * @see {@link SigninClientResolvedConfig | config} for SigninClient's `config` shape.
59
59
  *
60
60
  * @throws {@link AccessDeniedException} (client fault)
61
- * Error thrown for access denied scenarios with flexible HTTP status mapping
62
- *
63
- * Runtime HTTP Status Code Mapping:
64
- * - HTTP 401 (Unauthorized): TOKEN_EXPIRED, AUTHCODE_EXPIRED
65
- * - HTTP 403 (Forbidden): USER_CREDENTIALS_CHANGED, INSUFFICIENT_PERMISSIONS
66
- *
67
- * The specific HTTP status code is determined at runtime based on the error enum value.
68
- * Consumers should use the error field to determine the specific access denial reason.
61
+ * You do not have sufficient access to perform this action.
69
62
  *
70
63
  * @throws {@link ConflictException} (client fault)
71
64
  * Error thrown when request conflicts with current state
@@ -75,11 +68,7 @@ declare const PutResourcePermissionStatementCommand_base: {
75
68
  * Used when the request conflicts with the current state of the resource
76
69
  *
77
70
  * @throws {@link InternalServerException} (server fault)
78
- * Error thrown when an internal server error occurs
79
- *
80
- * HTTP Status Code: 500 Internal Server Error
81
- *
82
- * Used for unexpected server-side errors that prevent request processing.
71
+ * The request failed because of an internal server error.
83
72
  *
84
73
  * @throws {@link ServiceQuotaExceededException} (client fault)
85
74
  * Error thrown when service quota is exceeded
@@ -89,26 +78,10 @@ declare const PutResourcePermissionStatementCommand_base: {
89
78
  * Used when the request would cause a service quota to be exceeded
90
79
  *
91
80
  * @throws {@link TooManyRequestsError} (client fault)
92
- * Error thrown when rate limit is exceeded
93
- *
94
- * HTTP Status Code: 429 Too Many Requests
95
- *
96
- * Possible OAuth2ErrorCode values:
97
- * - INVALID_REQUEST: Rate limiting, too many requests, abuse prevention
98
- *
99
- * Possible causes:
100
- * - Too many token requests from the same client
101
- * - Rate limiting based on client_id or IP address
102
- * - Abuse prevention mechanisms triggered
103
- * - Service protection against excessive token generation
81
+ * The request failed because you exceeded the request rate limit for this operation.
104
82
  *
105
83
  * @throws {@link ValidationException} (client fault)
106
- * Error thrown when request validation fails
107
- *
108
- * HTTP Status Code: 400 Bad Request
109
- *
110
- * Used for request validation errors such as malformed parameters,
111
- * missing required fields, or invalid parameter values.
84
+ * The request failed because it contains a malformed, missing, or invalid parameter.
112
85
  *
113
86
  * @throws {@link SigninServiceException}
114
87
  * <p>Base exception class for all service exceptions from Signin service.</p>
@@ -24,13 +24,7 @@ declare const RevokeOAuth2TokenWithIAMCommand_base: {
24
24
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
25
  };
26
26
  /**
27
- * Grants permission to revoke an OAuth 2.0 refresh token and its associated refresh tokens
28
- *
29
- * Revokes a refresh_token issued by AWS Sign-In, invalidating the entire token
30
- * chain so that the refresh_token can no longer be used to mint new access_tokens.
31
- *
32
- * Idempotency: revoking an already-revoked, expired, or otherwise invalid token
33
- * still returns 200 OK with an empty body. Only the refresh_token type is accepted.
27
+ * Revokes an OAuth 2.0 refresh token and its associated token chain.
34
28
  * @example
35
29
  * Use a bare-bones client and the command you need to make an API call.
36
30
  * ```javascript
@@ -55,43 +49,16 @@ declare const RevokeOAuth2TokenWithIAMCommand_base: {
55
49
  * @see {@link SigninClientResolvedConfig | config} for SigninClient's `config` shape.
56
50
  *
57
51
  * @throws {@link AccessDeniedException} (client fault)
58
- * Error thrown for access denied scenarios with flexible HTTP status mapping
59
- *
60
- * Runtime HTTP Status Code Mapping:
61
- * - HTTP 401 (Unauthorized): TOKEN_EXPIRED, AUTHCODE_EXPIRED
62
- * - HTTP 403 (Forbidden): USER_CREDENTIALS_CHANGED, INSUFFICIENT_PERMISSIONS
63
- *
64
- * The specific HTTP status code is determined at runtime based on the error enum value.
65
- * Consumers should use the error field to determine the specific access denial reason.
52
+ * You do not have sufficient access to perform this action.
66
53
  *
67
54
  * @throws {@link InternalServerException} (server fault)
68
- * Error thrown when an internal server error occurs
69
- *
70
- * HTTP Status Code: 500 Internal Server Error
71
- *
72
- * Used for unexpected server-side errors that prevent request processing.
55
+ * The request failed because of an internal server error.
73
56
  *
74
57
  * @throws {@link TooManyRequestsError} (client fault)
75
- * Error thrown when rate limit is exceeded
76
- *
77
- * HTTP Status Code: 429 Too Many Requests
78
- *
79
- * Possible OAuth2ErrorCode values:
80
- * - INVALID_REQUEST: Rate limiting, too many requests, abuse prevention
81
- *
82
- * Possible causes:
83
- * - Too many token requests from the same client
84
- * - Rate limiting based on client_id or IP address
85
- * - Abuse prevention mechanisms triggered
86
- * - Service protection against excessive token generation
58
+ * The request failed because you exceeded the request rate limit for this operation.
87
59
  *
88
60
  * @throws {@link ValidationException} (client fault)
89
- * Error thrown when request validation fails
90
- *
91
- * HTTP Status Code: 400 Bad Request
92
- *
93
- * Used for request validation errors such as malformed parameters,
94
- * missing required fields, or invalid parameter values.
61
+ * The request failed because it contains a malformed, missing, or invalid parameter.
95
62
  *
96
63
  * @throws {@link SigninServiceException}
97
64
  * <p>Base exception class for all service exceptions from Signin service.</p>
@@ -1,5 +1,6 @@
1
1
  export * from "./CreateOAuth2TokenCommand";
2
2
  export * from "./CreateOAuth2TokenWithIAMCommand";
3
+ export * from "./CreateOAuth2TokenWithTokenExchangeCommand";
3
4
  export * from "./DeleteConsoleAuthorizationConfigurationCommand";
4
5
  export * from "./DeleteResourcePermissionStatementCommand";
5
6
  export * from "./GetConsoleAuthorizationConfigurationCommand";
@@ -1,6 +1,5 @@
1
1
  /**
2
- * AWS Sign-In manages authentication for AWS services. This service provides
3
- * secure authentication flows for accessing AWS resources from the console and developer tools.
2
+ * AWS Sign-In manages authentication for AWS services. It implements OAuth 2.0, providing secure token exchange and refresh capabilities.
4
3
  *
5
4
  * @packageDocumentation
6
5
  */
@@ -4,39 +4,46 @@
4
4
  */
5
5
  export declare const OAuth2ErrorCode: {
6
6
  /**
7
- * Authorization code has expired
7
+ * Authorization code has expired.
8
8
  */
9
9
  readonly AUTHCODE_EXPIRED: "AUTHCODE_EXPIRED";
10
10
  /**
11
- * Request conflicts with current state of the resource
11
+ * Request conflicts with the current state of the resource.
12
12
  */
13
13
  readonly CONFLICT: "CONFLICT";
14
14
  /**
15
- * Insufficient permissions to perform this operation
15
+ * Insufficient permissions to perform this operation.
16
16
  */
17
17
  readonly INSUFFICIENT_PERMISSIONS: "INSUFFICIENT_PERMISSIONS";
18
18
  /**
19
- * The request is missing a required parameter, includes an invalid parameter value, or is otherwise malformed
19
+ * The request is missing a required parameter, includes an invalid parameter value, or is otherwise malformed.
20
20
  */
21
21
  readonly INVALID_REQUEST: "INVALID_REQUEST";
22
+ readonly OAUTH_INVALID_GRANT: "invalid_grant";
23
+ readonly OAUTH_INVALID_REQUEST: "invalid_request";
24
+ readonly OAUTH_INVALID_SCOPE: "invalid_scope";
25
+ readonly OAUTH_INVALID_TARGET: "invalid_target";
26
+ readonly OAUTH_RATE_EXCEEDED: "rate_exceeded";
27
+ readonly OAUTH_SERVICE_UNAVAILABLE: "service_unavailable";
28
+ readonly OAUTH_UNSUPPORTED_GRANT_TYPE: "unsupported_grant_type";
22
29
  /**
23
- * Requested resource was not found
30
+ * Requested resource was not found.
24
31
  */
25
32
  readonly RESOURCE_NOT_FOUND: "RESOURCE_NOT_FOUND";
26
33
  /**
27
- * Internal server error occurred
34
+ * Internal server error occurred.
28
35
  */
29
36
  readonly SERVER_ERROR: "server_error";
30
37
  /**
31
- * Request would cause a service quota to be exceeded
38
+ * Request would cause a service quota to be exceeded.
32
39
  */
33
40
  readonly SERVICE_QUOTA_EXCEEDED: "SERVICE_QUOTA_EXCEEDED";
34
41
  /**
35
- * Token has expired and needs to be refreshed
42
+ * Token has expired.
36
43
  */
37
44
  readonly TOKEN_EXPIRED: "TOKEN_EXPIRED";
38
45
  /**
39
- * User credentials have been changed
46
+ * User credentials have been changed.
40
47
  */
41
48
  readonly USER_CREDENTIALS_CHANGED: "USER_CREDENTIALS_CHANGED";
42
49
  };
@@ -2,14 +2,7 @@ import type { ExceptionOptionType as __ExceptionOptionType } from "@smithy/core/
2
2
  import type { OAuth2ErrorCode } from "./enums";
3
3
  import { SigninServiceException as __BaseException } from "./SigninServiceException";
4
4
  /**
5
- * Error thrown for access denied scenarios with flexible HTTP status mapping
6
- *
7
- * Runtime HTTP Status Code Mapping:
8
- * - HTTP 401 (Unauthorized): TOKEN_EXPIRED, AUTHCODE_EXPIRED
9
- * - HTTP 403 (Forbidden): USER_CREDENTIALS_CHANGED, INSUFFICIENT_PERMISSIONS
10
- *
11
- * The specific HTTP status code is determined at runtime based on the error enum value.
12
- * Consumers should use the error field to determine the specific access denial reason.
5
+ * You do not have sufficient access to perform this action.
13
6
  * @public
14
7
  */
15
8
  export declare class AccessDeniedException extends __BaseException {
@@ -17,8 +10,7 @@ export declare class AccessDeniedException extends __BaseException {
17
10
  readonly name: "AccessDeniedException";
18
11
  readonly $fault: "client";
19
12
  /**
20
- * OAuth 2.0 error code indicating the specific type of access denial
21
- * Can be TOKEN_EXPIRED, AUTHCODE_EXPIRED, USER_CREDENTIALS_CHANGED, or INSUFFICIENT_PERMISSIONS
13
+ * One of TOKEN_EXPIRED, AUTHCODE_EXPIRED, USER_CREDENTIALS_CHANGED, or INSUFFICIENT_PERMISSIONS.
22
14
  * @public
23
15
  */
24
16
  error: OAuth2ErrorCode | undefined;
@@ -51,11 +43,7 @@ export declare class ConflictException extends __BaseException {
51
43
  constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>);
52
44
  }
53
45
  /**
54
- * Error thrown when an internal server error occurs
55
- *
56
- * HTTP Status Code: 500 Internal Server Error
57
- *
58
- * Used for unexpected server-side errors that prevent request processing.
46
+ * The request failed because of an internal server error.
59
47
  * @public
60
48
  */
61
49
  export declare class InternalServerException extends __BaseException {
@@ -63,8 +51,7 @@ export declare class InternalServerException extends __BaseException {
63
51
  readonly name: "InternalServerException";
64
52
  readonly $fault: "server";
65
53
  /**
66
- * OAuth 2.0 error code indicating server error
67
- * Will be SERVER_ERROR for internal server errors
54
+ * Will be server_error.
68
55
  * @public
69
56
  */
70
57
  error: OAuth2ErrorCode | undefined;
@@ -74,18 +61,7 @@ export declare class InternalServerException extends __BaseException {
74
61
  constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
75
62
  }
76
63
  /**
77
- * Error thrown when rate limit is exceeded
78
- *
79
- * HTTP Status Code: 429 Too Many Requests
80
- *
81
- * Possible OAuth2ErrorCode values:
82
- * - INVALID_REQUEST: Rate limiting, too many requests, abuse prevention
83
- *
84
- * Possible causes:
85
- * - Too many token requests from the same client
86
- * - Rate limiting based on client_id or IP address
87
- * - Abuse prevention mechanisms triggered
88
- * - Service protection against excessive token generation
64
+ * The request failed because you exceeded the request rate limit for this operation.
89
65
  * @public
90
66
  */
91
67
  export declare class TooManyRequestsError extends __BaseException {
@@ -93,8 +69,7 @@ export declare class TooManyRequestsError extends __BaseException {
93
69
  readonly name: "TooManyRequestsError";
94
70
  readonly $fault: "client";
95
71
  /**
96
- * OAuth 2.0 error code indicating the specific type of error
97
- * Will be INVALID_REQUEST for rate limiting scenarios
72
+ * Will be rate_exceeded.
98
73
  * @public
99
74
  */
100
75
  error: OAuth2ErrorCode | undefined;
@@ -104,12 +79,7 @@ export declare class TooManyRequestsError extends __BaseException {
104
79
  constructor(opts: __ExceptionOptionType<TooManyRequestsError, __BaseException>);
105
80
  }
106
81
  /**
107
- * Error thrown when request validation fails
108
- *
109
- * HTTP Status Code: 400 Bad Request
110
- *
111
- * Used for request validation errors such as malformed parameters,
112
- * missing required fields, or invalid parameter values.
82
+ * The request failed because it contains a malformed, missing, or invalid parameter.
113
83
  * @public
114
84
  */
115
85
  export declare class ValidationException extends __BaseException {
@@ -117,8 +87,7 @@ export declare class ValidationException extends __BaseException {
117
87
  readonly name: "ValidationException";
118
88
  readonly $fault: "client";
119
89
  /**
120
- * OAuth 2.0 error code indicating validation failure
121
- * Will be INVALID_REQUEST for validation errors
90
+ * The specific code depends on which validation failed.
122
91
  * @public
123
92
  */
124
93
  error: OAuth2ErrorCode | undefined;
@@ -127,6 +96,61 @@ export declare class ValidationException extends __BaseException {
127
96
  */
128
97
  constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
129
98
  }
99
+ /**
100
+ * The request failed because the provided grant is invalid or expired.
101
+ * @public
102
+ */
103
+ export declare class InvalidGrantException extends __BaseException {
104
+ static readonly shapeId: string;
105
+ readonly name: "InvalidGrantException";
106
+ readonly $fault: "client";
107
+ /**
108
+ * Will be invalid_grant.
109
+ * @public
110
+ */
111
+ error: OAuth2ErrorCode | undefined;
112
+ /**
113
+ * @internal
114
+ */
115
+ constructor(opts: __ExceptionOptionType<InvalidGrantException, __BaseException>);
116
+ }
117
+ /**
118
+ * The request failed because the requested scope is invalid or exceeds the scope that can be granted.
119
+ * @public
120
+ */
121
+ export declare class InvalidScopeException extends __BaseException {
122
+ static readonly shapeId: string;
123
+ readonly name: "InvalidScopeException";
124
+ readonly $fault: "client";
125
+ /**
126
+ * Will be invalid_scope.
127
+ * @public
128
+ */
129
+ error: OAuth2ErrorCode | undefined;
130
+ /**
131
+ * @internal
132
+ */
133
+ constructor(opts: __ExceptionOptionType<InvalidScopeException, __BaseException>);
134
+ }
135
+ /**
136
+ * The request failed because a dependency is temporarily unavailable. You can retry the request.
137
+ * @public
138
+ */
139
+ export declare class ServiceUnavailableException extends __BaseException {
140
+ static readonly shapeId: string;
141
+ readonly name: "ServiceUnavailableException";
142
+ readonly $fault: "server";
143
+ $retryable: {};
144
+ /**
145
+ * Will be service_unavailable.
146
+ * @public
147
+ */
148
+ error: OAuth2ErrorCode | undefined;
149
+ /**
150
+ * @internal
151
+ */
152
+ constructor(opts: __ExceptionOptionType<ServiceUnavailableException, __BaseException>);
153
+ }
130
154
  /**
131
155
  * Error thrown when requested resource is not found
132
156
  *