For Authlete 2.x documentation, see 2.x version.
Overview
In Authlete 3.0, token durations can be configured at multiple levels, including the Service level and the Client level. These durations can be set statically at these levels or configured dynamically based on specific scopes. For more details on dynamic configuration, refer to the Token Duration Per Scope documentation. This short article explains how to set token durations for access tokens, refresh tokens and ID tokens at the client level.Configuring Token Duration for a Client
To configure the token duration for access tokens or refresh tokens, follow these steps:Access Token Duration
- Log in to the Authlete Management Console.
- Navigate to Client Settings > Tokens and Claims > Access Token.
- In the General section, locate the Enter Duration field.
- Set the desired duration for access tokens in seconds (as shown in the screenshot below).
- Click Save Changes to apply the configuration.
Refresh Token Duration
- Log in to the Authlete Management Console.
- Navigate to Client Settings > Tokens and Claims > Refresh Token.
- In the General section, locate the Enter Duration field.
- Set the desired duration for refresh tokens in seconds (as shown in the screenshot below).
- Click Save Changes to apply the configuration.
ID Token Duration
- Log in to the Authlete Management Console.
- Navigate to Client Settings > Tokens and Claims > ID Token.
- In the ID Token Duration section, locate the Enter Duration field.
- Set the desired duration for ID tokens in seconds (as shown in the screenshot below).
- Click Save Changes to apply the configuration.
Example
Assume there is a service and two clients registered with it. The values of the access token duration are configured as follows:| Entity | Access Token Duration (seconds) |
|---|---|
| Service | 86,400 |
| Client 1 | (not set) |
| Client 2 | 3,000 |