Skip to content

Conversation

kay-horst
Copy link

Changes

Added possibility to create a com.auth0.client.mgmt.ManagementAPI instance with an implementation of com.auth0.client.mgmt.TokenProvider instead of just a fixed token string. This allows for e.g. transparent implementation of token refreshing without having to explicitly call ManagementAPI.setApiToken(...), which can be done by providing an appropriateTokenProvider implementation, which checks the expiry of the token and fetches a new one, if necessary.

References

Address issue #669.

Testing

  • This change adds test coverage
  • This change has been tested on JDK17 and JDK21.

Checklist

@kay-horst kay-horst requested a review from a team as a code owner March 25, 2025 13:29
@kay-horst kay-horst force-pushed the feature/669__allow_to_use_custom_token_provider branch from 0159221 to a43b22a Compare March 27, 2025 08:05
@kay-horst kay-horst force-pushed the feature/669__allow_to_use_custom_token_provider branch from a43b22a to d87e39c Compare April 7, 2025 11:31
@tanya732
Copy link
Contributor

tanya732 commented Aug 1, 2025

Hi @kay-horst

Thank you for raising the PR !!

The API Diff check failed due to binary compatibility changes between versions. Specifically, it detected changes to the public API surface that break compatibility with earlier versions.

I think adding a new constructor with flexibility of token provider customization is better approach. However, we need to ensure these changes remain backward-compatible to avoid breaking changes.

Thank you

@tanya732
Copy link
Contributor

Hi @kay-horst

The changes have been successfully released and can be found here

Thank you for your contribution!

Closing this as a solution has been found.
Please feel free to ping me here in case of any queries. Thanks!

@tanya732 tanya732 closed this Aug 22, 2025
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.

2 participants