Skip to content

Enable ForceTokenRenewal of OIDC User Access Token#290

Merged
pgermishuys merged 1 commit intomainfrom
pg/force_refresh
Oct 29, 2025
Merged

Enable ForceTokenRenewal of OIDC User Access Token#290
pgermishuys merged 1 commit intomainfrom
pg/force_refresh

Conversation

@pgermishuys
Copy link
Copy Markdown
Contributor

@pgermishuys pgermishuys commented Oct 29, 2025

What issue does this PR address?

We want to allow the ability to force the refresh of a token via the OIDC User Access Token Retriever.

Note:

  • We set the initial token to be expired as we want to exercise the Token Endpoint for retrieving the Access Token. The expired token forces the token to be retrieved from the token endpoint.

@pgermishuys pgermishuys self-assigned this Oct 29, 2025
@pgermishuys pgermishuys added the area/foss/atm Issues related to Access Token Management label Oct 29, 2025
@pgermishuys pgermishuys marked this pull request as ready for review October 29, 2025 07:00
@pgermishuys pgermishuys requested review from a team and Copilot October 29, 2025 07:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 replaces the User Client Access Token Retriever with the User Access Token Handler to allow forcing token refresh via the OIDC Client Access Token Retriever. The changes set initial tokens to be expired to exercise the Token Endpoint for retrieving access tokens.

Key changes:

  • Modified test infrastructure to use expired tokens and User Access Token Handler
  • Added support for forced token renewal through request parameters
  • Updated service registration from client-based to user-based access token management

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
TestAccessTokens.cs Sets token expiration to -1 second to force token refresh
FakeAuthenticationService.cs Refactored to use async methods and improved code formatting
OidcUserFixture.cs Switched from AddClientAccessTokenHttpClient to AddUserAccessTokenHttpClient
AccessTokenHandlerTests.cs Added test for force token renewal functionality
OpenIdConnectUserAccessTokenRetriever.cs Added ForceTokenRenewal parameter support

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

@pgermishuys pgermishuys changed the title Use User Access Token Handler instead of User Client Access Token Retriever Use User Access Token Handler instead of User Access Token Retriever Oct 29, 2025
@pgermishuys pgermishuys changed the title Use User Access Token Handler instead of User Access Token Retriever Use User Access Token Handler instead of Client Access Token Retriever Oct 29, 2025
@pgermishuys pgermishuys changed the title Use User Access Token Handler instead of Client Access Token Retriever Enable ForceTokenRenewal of OIDC User Access Token Oct 29, 2025
@pgermishuys pgermishuys merged commit 377e151 into main Oct 29, 2025
3 checks passed
@pgermishuys pgermishuys deleted the pg/force_refresh branch October 29, 2025 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/foss/atm Issues related to Access Token Management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants