interface TokenValidityUnitsProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Cognito.CfnUserPoolClient.TokenValidityUnitsProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscognito#CfnUserPoolClient_TokenValidityUnitsProperty |
Java | software.amazon.awscdk.services.cognito.CfnUserPoolClient.TokenValidityUnitsProperty |
Python | aws_cdk.aws_cognito.CfnUserPoolClient.TokenValidityUnitsProperty |
TypeScript | aws-cdk-lib » aws_cognito » CfnUserPoolClient » TokenValidityUnitsProperty |
The time units you use when you set the duration of ID, access, and refresh tokens.
The default unit for RefreshToken is days, and the default for ID and access tokens is hours.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cognito as cognito } from 'aws-cdk-lib';
const tokenValidityUnitsProperty: cognito.CfnUserPoolClient.TokenValidityUnitsProperty = {
accessToken: 'accessToken',
idToken: 'idToken',
refreshToken: 'refreshToken',
};
Properties
Name | Type | Description |
---|---|---|
access | string | A time unit for the value that you set in the AccessTokenValidity parameter. |
id | string | A time unit for the value that you set in the IdTokenValidity parameter. |
refresh | string | A time unit for the value that you set in the RefreshTokenValidity parameter. |
accessToken?
Type:
string
(optional)
A time unit for the value that you set in the AccessTokenValidity
parameter.
The default AccessTokenValidity
time unit is hours
. AccessTokenValidity
duration can range from five minutes to one day.
idToken?
Type:
string
(optional)
A time unit for the value that you set in the IdTokenValidity
parameter.
The default IdTokenValidity
time unit is hours
. IdTokenValidity
duration can range from five minutes to one day.
refreshToken?
Type:
string
(optional)
A time unit for the value that you set in the RefreshTokenValidity
parameter.
The default RefreshTokenValidity
time unit is days
. RefreshTokenValidity
duration can range from 60 minutes to 10 years.