Skip to content

Commit 3e72627

Browse files
committed
Add token validity parameters to product.yaml
Make this configurable but with short default values
1 parent eac56d6 commit 3e72627

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

products/client/product.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ Parameters:
1212
AllowedAuthScopes:
1313
Type: CommaDelimitedList
1414
Description: The allowed OAuth scopes
15+
AccessTokenValidity:
16+
Type: Number
17+
Description: The time in minutes that the access token is valid
18+
Default: 10
19+
IdTokenValidity:
20+
Type: Number
21+
Description: The time in minutes that the ID token is valid
22+
Default: 10
23+
RefreshTokenValidityDays:
24+
Type: Number
25+
Description: The time in days that the refresh token is valid
26+
Default: 1
1527

1628
Resources:
1729
CognitoUserPoolClient:
@@ -26,9 +38,9 @@ Resources:
2638
IdToken: minutes
2739
AccessToken: minutes
2840
RefreshToken: days
29-
AccessTokenValidity: 10
30-
IdTokenValidity: 10
31-
RefreshTokenValidity: 1
41+
AccessTokenValidity: !Ref AccessTokenValidity
42+
IdTokenValidity: !Ref IdTokenValidity
43+
RefreshTokenValidity: !Ref RefreshTokenValidityDays
3244
AllowedOAuthFlowsUserPoolClient: true
3345
AllowedOAuthFlows:
3446
- client_credentials

0 commit comments

Comments
 (0)