Configuring Email Templates for Access Token Expiration (2024)

Software AG Products10.11 | Using CentraSite | Runtime Governance | Access Token Management | Managing Access Tokens through CentraSite Business UI | Configuring Email Templates | Configuring Email Templates for Access Token Expiration

Configuring Email Templates for Access Token Expiration

Notifications informing about the upcoming API key and OAuth 2.0 token expirations, and the newly generated access tokens are sent to the API Consumer.

CentraSite supports the following types of notifications for the access token expiration:

Configuring Email Templates for Access Token Expiration (1)Access token has expired - a critical event type message.

Configuring Email Templates for Access Token Expiration (2)Access token expires soon - a warning type message. It is generated n days before the token expiration date and displayed every day before the token actually expires.

Configuring Email Templates for Access Token Expiration (3)To configure email templates for access token expiration

1. Open the customization file, centrasite.xml, in a rich text editor.

You can find the centrasite.xml file on <CentraSiteInstall_Directory>\cast\cswebapps\BusinessUI\custom\conf.

2. Locate the property ExpiryNotificationSettings.

The notification settings for the API key and OAuth 2.0 token expiration would look like the following:

<ExpiryNotificationSettings>
<ExpiredNotification
subject="Access key has expired!"
template="APIKeyExpiredNotification.html" />
<AdvanceNotification
subject="Access key about to expire!"
template="APIKeyExpirationNotification.html" />
<SchedulerExecutionFrequency>12h</SchedulerExecutionFrequency>
<AdvanceNotificationInterval>5d</AdvanceNotificationInterval>
</ExpiryNotificationSettings>

3. Uncomment the section API KEY EXPIRATION CONFIGURATION to enable the access token expiration notifications.

4. Use the property, ExpiredNotification, to set the subject and body of the notification message for the API Consumers whose access token has expired.

5. Use the property, AdvanceNotification, to set the subject and body of the notification message for the API Consumers whose access tokens are due to expire.

6. Use the property, SchedulerExecutionFrequency, to specify how frequently to check for the expiration status of access tokens. Enter the time interval in the following format: years (y), months (m), days (d), hours (h), minutes (min).

7. Use the property, AdvanceNotificationInterval, to specify how many days should the consumers be notified before the access token expiration (in days). The consumers receive a notification message as configured in the AdvanceNotification property. Enter the time interval in the following format: years (y) months (m) days (d) hours (h) minutes (min).

8. Save and close the file.

Important:
If you have set up a Software AG Runtime cluster with load balancing, locate the CENTRASITE ACCESS URL CONFIGURATION element, and ensure that the lb_or_reverse_proxy_url attribute in the following property points to the load balancer's IP/Port.

<CentraSite url="http://localhost:53307/CentraSite/CentraSite"
lb_or_reverse_proxy_url="http://localhost:53307"/>

9. Restart Software AG Runtime.

Configuring Email Templates for Access Token Expiration (2024)

FAQs

How to set access token expiration time? ›

Configure access token lifetime
  1. Go to Dashboard > Applications > APIs and select the name of the API to view.
  2. Locate the Token Expiration field under Token Settings.
  3. Enter the desired lifetime (in seconds) for access tokens issued for this API. Default value is 86,400 seconds (24 hours). ...
  4. Select Save Changes.

What is the best practice for refresh token expiration? ›

Best practice

Set the expiration time for refresh tokens in such a way that it is valid for a little longer period than the access tokens. For example, if you set 30 minutes for access token then set (at least) 24 hours for the refresh token.

What is the HTTP code for access token expired? ›

If you attempt to use an expired token, you'll receive a "401 Unauthorized HTTP" response. When this happens, you'll need to refresh the access token. You shouldn't request a new token for every API call made, as each token is good for an hour and should be reused.

What is the lifespan of access token? ›

Access tokens: varies, depending on the client application requesting the token. For example, continuous access evaluation (CAE) capable clients that negotiate CAE-aware sessions will see a long lived token lifetime (up to 28 hours). ID tokens, SAML2 tokens: 1 hour.

How do you calculate token expiration time? ›

To verify that your expiration time is correct, you can look at the exp and iat claim of your access token. Then you can perform the following calculation: Token expiration (in seconds) = exp (Expiration time in seconds) - iat (Issued at in seconds)

How do I increase my Google access token expiration time? ›

Access token lifetime

generateAccessToken method to create the token. This method enables you to choose the lifetime of the token, with a maximum lifetime of 12 hours. If you want to extend the token lifetime beyond the default, you must create an organization policy that enables the iam.

What is the difference between access token expiration and refresh token expiration? ›

Refresh tokens have a longer lifetime than access tokens. The default lifetime for the refresh tokens is 24 hours for single page apps and 90 days for all other scenarios. Refresh tokens replace themselves with a fresh token upon every use.

How to handle an expired access token? ›

The refresh token is a second token that can be used to replace an expired access token with a fresh one, without the need to perform the dance again. Unfortunately, there is no enforced standard that the SDK can use to automatically detect a token expiration scenario and obtain a new one.

When should you not use refresh token? ›

If a refresh token is compromised (someone else got their hands on it or, even worse -- steals it), the individual would not only gain access to the resources provided by the API but also the amount of time the access has been granted would be more. Now that's a dreadful scenario for developers and users alike.

How do you refresh an access token request? ›

To refresh your access token and an ID token, you send a token request with a grant_type of refresh_token . Be sure to include the openid scope when you want to refresh the ID token. If the refresh token is valid, then you get back a new access token, a new ID token, and the refresh token.

What happens when a personal access token expires? ›

When a token has expired or has been revoked, it can no longer be used to authenticate Git and API requests. It is not possible to restore an expired or revoked token, you or the application will need to create a new token.

How do I refresh my access token ID token? ›

You can refresh access and ID tokens using the /token endpoint with the grant_type set to refresh_token . Before calling this endpoint, obtain the refresh token from the SDK and ensure that you've included offline_access as a scope in the SDK configurations.

How do I keep my access token alive? ›

Keeping access tokens fresh and valid
  1. Use refresh tokens. Refresh tokens can be used by developers to obtain a newly-issed access token. ...
  2. Implement a separate process to keep tokens fresh. ...
  3. Avoid race conditions. ...
  4. Consider using JWT auth.
Jan 31, 2024

How to set OAuth token expiration time? ›

Use the Dashboard
  1. Go to Dashboard > Applications.
  2. Select the application you want to configure.
  3. Go to the Settings tab.
  4. Under Refresh Token Expiration, enable Absolute Expiration. ...
  5. Enter Absolute Lifetime in seconds. ...
  6. Enable Inactivity Expiration. ...
  7. Enter Inactivity Lifetime in seconds. ...
  8. Click Save Changes.

How do I change my Azure token expiration time? ›

You can configure token lifetimes in the Azure portal. Go to the Azure portal. In "Azure Active Directory" > "Security" > "Authentication methods" > "Authentication methods blade" > "Token Lifetime Policies". you can configure the lifetime of access tokens, refresh tokens, and ID tokens.

How do I get expiry time from refresh token? ›

Unfortunately, there is no option to find the expiration time for the refresh token, because it is depending on authorization server and the type of client application, and it is not communicated to the client. In the Microsoft identity platform, the default lifetime for refresh tokens is 90 days.

How to set JWT token expiration time in seconds? ›

Steps to Implement JWT Token with Expiry
  1. Step 1: Create a node project. ...
  2. Step 2: Install the “jsonwebtoken” Package. ...
  3. Step 3: Creating JWT token with a definite expire time. ...
  4. Step 4: Verify the token in terms of expiry duration.
Jun 10, 2024

Can we set expiration period for a personal access token which is used for authentication? ›

When you create a personal access token, we recommend that you set an expiration for your token. Upon reaching your token's expiration date, the token is automatically revoked.

Top Articles
Chipotle's board has approved a 50-for-1 stock split. Here's what that means
The Problems of Philosophy, by Bertrand Russell
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Kieth Sipes

Last Updated:

Views: 5819

Rating: 4.7 / 5 (47 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Kieth Sipes

Birthday: 2001-04-14

Address: Suite 492 62479 Champlin Loop, South Catrice, MS 57271

Phone: +9663362133320

Job: District Sales Analyst

Hobby: Digital arts, Dance, Ghost hunting, Worldbuilding, Kayaking, Table tennis, 3D printing

Introduction: My name is Kieth Sipes, I am a zany, rich, courageous, powerful, faithful, jolly, excited person who loves writing and wants to share my knowledge and understanding with you.