Skip to content

Commit f53e68f

Browse files
author
awstools
committed
feat(client-sso-admin): Improves support for configuring RefreshToken and TokenExchange grants on applications.
1 parent fe08f6f commit f53e68f

File tree

6 files changed

+116
-23
lines changed

6 files changed

+116
-23
lines changed

clients/client-sso-admin/src/commands/GetApplicationGrantCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ export interface GetApplicationGrantCommandOutput extends GetApplicationGrantRes
6767
* // },
6868
* // ],
6969
* // },
70+
* // RefreshToken: {},
71+
* // TokenExchange: {},
7072
* // },
7173
* // };
7274
*

clients/client-sso-admin/src/commands/ListApplicationGrantsCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ export interface ListApplicationGrantsCommandOutput extends ListApplicationGrant
7070
* // },
7171
* // ],
7272
* // },
73+
* // RefreshToken: {},
74+
* // TokenExchange: {},
7375
* // },
7476
* // },
7577
* // ],

clients/client-sso-admin/src/commands/PutApplicationGrantCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ export interface PutApplicationGrantCommandOutput extends __MetadataBearer {}
6363
* },
6464
* ],
6565
* },
66+
* RefreshToken: {},
67+
* TokenExchange: {},
6668
* },
6769
* };
6870
* const command = new PutApplicationGrantCommand(input);

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

Lines changed: 63 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -986,12 +986,12 @@ export interface GetApplicationGrantRequest {
986986

987987
/**
988988
* @public
989-
* <p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>
989+
* <p>A structure that defines configuration settings for an application that supports the OAuth 2.0 Authorization Code Grant.</p>
990990
*/
991991
export interface AuthorizationCodeGrant {
992992
/**
993993
* @public
994-
* <p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>
994+
* <p>A list of URIs that are valid locations to redirect a user's browser after the user is authorized.</p>
995995
*/
996996
RedirectUris?: string[];
997997
}
@@ -1018,43 +1018,88 @@ export interface AuthorizedTokenIssuer {
10181018

10191019
/**
10201020
* @public
1021-
* <p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>
1021+
* <p>A structure that defines configuration settings for an application that supports the JWT Bearer Token Authorization Grant.</p>
10221022
*/
10231023
export interface JwtBearerGrant {
10241024
/**
10251025
* @public
1026-
* <p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>
1026+
* <p>A list of allowed token issuers trusted by the Identity Center instances for this application.</p>
10271027
*/
10281028
AuthorizedTokenIssuers?: AuthorizedTokenIssuer[];
10291029
}
10301030

10311031
/**
10321032
* @public
1033-
* <p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>
1033+
* <p>A structure that defines configuration settings for an application that supports the OAuth 2.0 Refresh Token Grant.</p>
10341034
*/
1035-
export type Grant = Grant.AuthorizationCodeMember | Grant.JwtBearerMember | Grant.$UnknownMember;
1035+
export interface RefreshTokenGrant {}
1036+
1037+
/**
1038+
* @public
1039+
* <p>A structure that defines configuration settings for an application that supports the OAuth 2.0 Token Exchange Grant.</p>
1040+
*/
1041+
export interface TokenExchangeGrant {}
1042+
1043+
/**
1044+
* @public
1045+
* <p>The Grant union represents the set of possible configuration options for the selected grant type. Exactly one member of the union must be specified, and must match the grant type selected.</p>
1046+
*/
1047+
export type Grant =
1048+
| Grant.AuthorizationCodeMember
1049+
| Grant.JwtBearerMember
1050+
| Grant.RefreshTokenMember
1051+
| Grant.TokenExchangeMember
1052+
| Grant.$UnknownMember;
10361053

10371054
/**
10381055
* @public
10391056
*/
10401057
export namespace Grant {
10411058
/**
10421059
* @public
1043-
* <p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>
1060+
* <p>Configuration options for the <code>authorization_code</code> grant type.</p>
10441061
*/
10451062
export interface AuthorizationCodeMember {
10461063
AuthorizationCode: AuthorizationCodeGrant;
10471064
JwtBearer?: never;
1065+
RefreshToken?: never;
1066+
TokenExchange?: never;
10481067
$unknown?: never;
10491068
}
10501069

10511070
/**
10521071
* @public
1053-
* <p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>
1072+
* <p>Configuration options for the <code>urn:ietf:params:oauth:grant-type:jwt-bearer</code> grant type.</p>
10541073
*/
10551074
export interface JwtBearerMember {
10561075
AuthorizationCode?: never;
10571076
JwtBearer: JwtBearerGrant;
1077+
RefreshToken?: never;
1078+
TokenExchange?: never;
1079+
$unknown?: never;
1080+
}
1081+
1082+
/**
1083+
* @public
1084+
* <p>Configuration options for the <code>refresh_token</code> grant type.</p>
1085+
*/
1086+
export interface RefreshTokenMember {
1087+
AuthorizationCode?: never;
1088+
JwtBearer?: never;
1089+
RefreshToken: RefreshTokenGrant;
1090+
TokenExchange?: never;
1091+
$unknown?: never;
1092+
}
1093+
1094+
/**
1095+
* @public
1096+
* <p>Configuration options for the <code>urn:ietf:params:oauth:grant-type:token-exchange</code> grant type.</p>
1097+
*/
1098+
export interface TokenExchangeMember {
1099+
AuthorizationCode?: never;
1100+
JwtBearer?: never;
1101+
RefreshToken?: never;
1102+
TokenExchange: TokenExchangeGrant;
10581103
$unknown?: never;
10591104
}
10601105

@@ -1064,18 +1109,24 @@ export namespace Grant {
10641109
export interface $UnknownMember {
10651110
AuthorizationCode?: never;
10661111
JwtBearer?: never;
1112+
RefreshToken?: never;
1113+
TokenExchange?: never;
10671114
$unknown: [string, any];
10681115
}
10691116

10701117
export interface Visitor<T> {
10711118
AuthorizationCode: (value: AuthorizationCodeGrant) => T;
10721119
JwtBearer: (value: JwtBearerGrant) => T;
1120+
RefreshToken: (value: RefreshTokenGrant) => T;
1121+
TokenExchange: (value: TokenExchangeGrant) => T;
10731122
_: (name: string, value: any) => T;
10741123
}
10751124

10761125
export const visit = <T>(value: Grant, visitor: Visitor<T>): T => {
10771126
if (value.AuthorizationCode !== undefined) return visitor.AuthorizationCode(value.AuthorizationCode);
10781127
if (value.JwtBearer !== undefined) return visitor.JwtBearer(value.JwtBearer);
1128+
if (value.RefreshToken !== undefined) return visitor.RefreshToken(value.RefreshToken);
1129+
if (value.TokenExchange !== undefined) return visitor.TokenExchange(value.TokenExchange);
10791130
return visitor._(value.$unknown[0], value.$unknown[1]);
10801131
};
10811132
}
@@ -1114,18 +1165,18 @@ export interface ListApplicationGrantsRequest {
11141165

11151166
/**
11161167
* @public
1117-
* <p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>
1168+
* <p>A structure that defines a single grant and its configuration.</p>
11181169
*/
11191170
export interface GrantItem {
11201171
/**
11211172
* @public
1122-
* <p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>
1173+
* <p>The type of the selected grant.</p>
11231174
*/
11241175
GrantType: GrantType | undefined;
11251176

11261177
/**
11271178
* @public
1128-
* <p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>
1179+
* <p>The configuration structure for the selected grant.</p>
11291180
*/
11301181
Grant: Grant | undefined;
11311182
}
@@ -4102,7 +4153,7 @@ export interface UntagResourceResponse {}
41024153

41034154
/**
41044155
* @public
4105-
* <p/>
4156+
* <p>A structure that describes the options for the access portal associated with an application that can be updated.</p>
41064157
*/
41074158
export interface UpdateApplicationPortalOptions {
41084159
/**

clients/client-sso-admin/src/protocols/Aws_json1_1.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,12 +390,14 @@ import {
390390
PutApplicationGrantRequest,
391391
PutInlinePolicyToPermissionSetRequest,
392392
PutPermissionsBoundaryToPermissionSetRequest,
393+
RefreshTokenGrant,
393394
ResourceNotFoundException,
394395
ServiceQuotaExceededException,
395396
SignInOptions,
396397
Tag,
397398
TagResourceRequest,
398399
ThrottlingException,
400+
TokenExchangeGrant,
399401
TrustedTokenIssuerConfiguration,
400402
TrustedTokenIssuerUpdateConfiguration,
401403
UntagResourceRequest,
@@ -6036,6 +6038,8 @@ const se_PutApplicationAuthenticationMethodRequest = (
60366038

60376039
// se_RedirectUris omitted.
60386040

6041+
// se_RefreshTokenGrant omitted.
6042+
60396043
// se_ScopeTargets omitted.
60406044

60416045
// se_SignInOptions omitted.
@@ -6048,6 +6052,8 @@ const se_PutApplicationAuthenticationMethodRequest = (
60486052

60496053
// se_TagResourceRequest omitted.
60506054

6055+
// se_TokenExchangeGrant omitted.
6056+
60516057
// se_TokenIssuerAudiences omitted.
60526058

60536059
// se_TrustedTokenIssuerConfiguration omitted.
@@ -6633,6 +6639,8 @@ const de_ProvisionPermissionSetResponse = (output: any, context: __SerdeContext)
66336639

66346640
// de_RedirectUris omitted.
66356641

6642+
// de_RefreshTokenGrant omitted.
6643+
66366644
// de_ResourceNotFoundException omitted.
66376645

66386646
// de_ResourceServerConfig omitted.
@@ -6659,6 +6667,8 @@ const de_ProvisionPermissionSetResponse = (output: any, context: __SerdeContext)
66596667

66606668
// de_ThrottlingException omitted.
66616669

6670+
// de_TokenExchangeGrant omitted.
6671+
66626672
// de_TokenIssuerAudiences omitted.
66636673

66646674
// de_TrustedTokenIssuerConfiguration omitted.

codegen/sdk-codegen/aws-models/sso-admin.json

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -834,12 +834,12 @@
834834
"RedirectUris": {
835835
"target": "com.amazonaws.ssoadmin#RedirectUris",
836836
"traits": {
837-
"smithy.api#documentation": "<p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>"
837+
"smithy.api#documentation": "<p>A list of URIs that are valid locations to redirect a user's browser after the user is authorized.</p>"
838838
}
839839
}
840840
},
841841
"traits": {
842-
"smithy.api#documentation": "<p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>"
842+
"smithy.api#documentation": "<p>A structure that defines configuration settings for an application that supports the OAuth 2.0 Authorization Code Grant.</p>"
843843
}
844844
},
845845
"com.amazonaws.ssoadmin#AuthorizedTokenIssuer": {
@@ -3628,18 +3628,30 @@
36283628
"AuthorizationCode": {
36293629
"target": "com.amazonaws.ssoadmin#AuthorizationCodeGrant",
36303630
"traits": {
3631-
"smithy.api#documentation": "<p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>"
3631+
"smithy.api#documentation": "<p>Configuration options for the <code>authorization_code</code> grant type.</p>"
36323632
}
36333633
},
36343634
"JwtBearer": {
36353635
"target": "com.amazonaws.ssoadmin#JwtBearerGrant",
36363636
"traits": {
3637-
"smithy.api#documentation": "<p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>"
3637+
"smithy.api#documentation": "<p>Configuration options for the <code>urn:ietf:params:oauth:grant-type:jwt-bearer</code> grant type.</p>"
3638+
}
3639+
},
3640+
"RefreshToken": {
3641+
"target": "com.amazonaws.ssoadmin#RefreshTokenGrant",
3642+
"traits": {
3643+
"smithy.api#documentation": "<p>Configuration options for the <code>refresh_token</code> grant type.</p>"
3644+
}
3645+
},
3646+
"TokenExchange": {
3647+
"target": "com.amazonaws.ssoadmin#TokenExchangeGrant",
3648+
"traits": {
3649+
"smithy.api#documentation": "<p>Configuration options for the <code>urn:ietf:params:oauth:grant-type:token-exchange</code> grant type.</p>"
36383650
}
36393651
}
36403652
},
36413653
"traits": {
3642-
"smithy.api#documentation": "<p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>"
3654+
"smithy.api#documentation": "<p>The Grant union represents the set of possible configuration options for the selected grant type. Exactly one member of the union must be specified, and must match the grant type selected.</p>"
36433655
}
36443656
},
36453657
"com.amazonaws.ssoadmin#GrantItem": {
@@ -3648,20 +3660,20 @@
36483660
"GrantType": {
36493661
"target": "com.amazonaws.ssoadmin#GrantType",
36503662
"traits": {
3651-
"smithy.api#documentation": "<p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>",
3663+
"smithy.api#documentation": "<p>The type of the selected grant.</p>",
36523664
"smithy.api#required": {}
36533665
}
36543666
},
36553667
"Grant": {
36563668
"target": "com.amazonaws.ssoadmin#Grant",
36573669
"traits": {
3658-
"smithy.api#documentation": "<p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>",
3670+
"smithy.api#documentation": "<p>The configuration structure for the selected grant.</p>",
36593671
"smithy.api#required": {}
36603672
}
36613673
}
36623674
},
36633675
"traits": {
3664-
"smithy.api#documentation": "<p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>"
3676+
"smithy.api#documentation": "<p>A structure that defines a single grant and its configuration.</p>"
36653677
}
36663678
},
36673679
"com.amazonaws.ssoadmin#GrantType": {
@@ -3907,12 +3919,12 @@
39073919
"AuthorizedTokenIssuers": {
39083920
"target": "com.amazonaws.ssoadmin#AuthorizedTokenIssuers",
39093921
"traits": {
3910-
"smithy.api#documentation": "<p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>"
3922+
"smithy.api#documentation": "<p>A list of allowed token issuers trusted by the Identity Center instances for this application.</p>"
39113923
}
39123924
}
39133925
},
39143926
"traits": {
3915-
"smithy.api#documentation": "<p>~~~[ TODO: ADD DESCRIPTION HERE ]~~~</p>"
3927+
"smithy.api#documentation": "<p>A structure that defines configuration settings for an application that supports the JWT Bearer Token Authorization Grant.</p>"
39163928
}
39173929
},
39183930
"com.amazonaws.ssoadmin#ListAccountAssignmentCreationStatus": {
@@ -6582,6 +6594,13 @@
65826594
}
65836595
}
65846596
},
6597+
"com.amazonaws.ssoadmin#RefreshTokenGrant": {
6598+
"type": "structure",
6599+
"members": {},
6600+
"traits": {
6601+
"smithy.api#documentation": "<p>A structure that defines configuration settings for an application that supports the OAuth 2.0 Refresh Token Grant.</p>"
6602+
}
6603+
},
65856604
"com.amazonaws.ssoadmin#RelayState": {
65866605
"type": "string",
65876606
"traits": {
@@ -8121,6 +8140,13 @@
81218140
"smithy.api#pattern": "^[-a-zA-Z0-9+=/_]*$"
81228141
}
81238142
},
8143+
"com.amazonaws.ssoadmin#TokenExchangeGrant": {
8144+
"type": "structure",
8145+
"members": {},
8146+
"traits": {
8147+
"smithy.api#documentation": "<p>A structure that defines configuration settings for an application that supports the OAuth 2.0 Token Exchange Grant.</p>"
8148+
}
8149+
},
81248150
"com.amazonaws.ssoadmin#TokenIssuerAudience": {
81258151
"type": "string",
81268152
"traits": {
@@ -8363,7 +8389,7 @@
83638389
}
83648390
},
83658391
"traits": {
8366-
"smithy.api#documentation": "<p/>"
8392+
"smithy.api#documentation": "<p>A structure that describes the options for the access portal associated with an application that can be updated.</p>"
83678393
}
83688394
},
83698395
"com.amazonaws.ssoadmin#UpdateApplicationRequest": {

0 commit comments

Comments
 (0)