Skip to content

Conversation

@tanya732
Copy link
Contributor

@tanya732 tanya732 commented Aug 19, 2025

Changes

Support for TokenProvider in Builder:

Added a new static method: newBuilder(String domain, TokenProvider tokenProvider), allowing the creation of a ManagementAPI.Builder using a TokenProvider instead of a raw API token.
Updated the Builder class to accept either an API token (wrapped in a SimpleTokenProvider) or a TokenProvider directly.
The builder now stores a TokenProvider instead of a raw API token.
The build() method now uses the provided TokenProvider directly, instead of always wrapping an API token.

API Token Handling:
The constructor Builder(String domain, String apiToken) now delegates to Builder(String domain, TokenProvider tokenProvider) by wrapping the token in a SimpleTokenProvider.

Credits

Thanks @krrrr38 for raising #729.

References

Please include relevant links supporting this change such as a:

  • support ticket
  • community post
  • StackOverflow post
  • support forum thread

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@tanya732 tanya732 marked this pull request as ready for review August 19, 2025 11:53
@tanya732 tanya732 requested a review from a team as a code owner August 19, 2025 11:53
@tanya732 tanya732 merged commit 78edccb into master Aug 20, 2025
6 checks passed
@tanya732 tanya732 deleted the customize-management-api-token-provider branch August 20, 2025 06:11
@tanya732 tanya732 mentioned this pull request 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.

4 participants