Skip to content

CLOUD-3364 - Parse refresh token to determine expire date#38

Merged
ChristianHersevoort merged 1 commit into
masterfrom
feature/refresh-token-introspection
Nov 21, 2025
Merged

CLOUD-3364 - Parse refresh token to determine expire date#38
ChristianHersevoort merged 1 commit into
masterfrom
feature/refresh-token-introspection

Conversation

@ChristianHersevoort

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the refresh token handling by parsing the JWT refresh token to extract its actual expiration date instead of using the access token's expiration time as a proxy. The implementation includes a fallback mechanism to maintain backwards compatibility when the refresh token cannot be parsed.

Key Changes:

  • Adds JWT parsing capability to extract the refresh token's expiration date from its claims
  • Implements a new determineRefreshTokenExpireDate() function with fallback logic
  • Adds the github.com/golang-jwt/jwt/v5 dependency for JWT parsing

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
pkg/aws_keyhub/keyhub.go Adds JWT parsing logic to extract refresh token expiration from the token's "exp" claim, with fallback to the previous behavior if parsing fails
go.mod Adds the golang-jwt/jwt/v5 dependency (incorrectly placed in indirect dependencies)
go.sum Adds checksums for the new JWT library dependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod Outdated
@ChristianHersevoort ChristianHersevoort force-pushed the feature/refresh-token-introspection branch 2 times, most recently from 5c41d39 to 108901a Compare November 21, 2025 09:09
@ChristianHersevoort ChristianHersevoort changed the title Parse refresh token to determine refreshToken expire date Parse refresh token to determine expire date Nov 21, 2025

@erwinvandenbeld erwinvandenbeld left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graag ticket er bij

@ChristianHersevoort ChristianHersevoort force-pushed the feature/refresh-token-introspection branch from 108901a to 57ccc50 Compare November 21, 2025 09:40
@ChristianHersevoort ChristianHersevoort changed the title Parse refresh token to determine expire date CLOUD-3364 - Parse refresh token to determine expire date Nov 21, 2025
@ChristianHersevoort ChristianHersevoort merged commit 0ab9622 into master Nov 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants