Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OidcClient expiresIn property #43417

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sberyozkin
Copy link
Member

@sberyozkin sberyozkin commented Sep 20, 2024

Fixes #41067.

Salesforce does not return an access token expires_in property, so the access token is used indefinitely, unless it is revoked manually using the OidcClient revoke token method or a custom filter is used to force the token refresh, by checking manually the custom expiration time.

This PR adds a configuration property to make it much easier to deal with.
Users set quarkus.oidc-client.access-token-expires-in=some-duration, this property is checked only when the token grant response does not include an expiration time, and the built-in OIDC client code takes care of the rest.

The test only confirms that the access token expires at property is available, even with the token grant response returning no such property, there are a few tests there which already check the actual token refresh when the token expires.

Copy link

🎊 PR Preview 78ff380 has been successfully built and deployed to https://quarkus-pr-main-43417-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 20, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 153d3e6.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 20, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 153d3e6.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OIDC client set expire time for access token as configuration item
1 participant