Skip to content

Conversation

@Avery-Dunn
Copy link
Contributor

Deprecates the extraQueryParameters API according to KR 3310905, similar to what was done in MSAL.NET: AzureAD/microsoft-authentication-library-for-dotnet#5536

This API was meant for niche scenarios which the library did not explicitly cover, and not really meant for production. It can affect the contents and validity of tokens but were not used in our caching scheme which led to bad caching behavior: if the extra query parameters changed between requests we could return tokens that were not valid for the latest set of parameters.

Therefore we are deprecating the current API and, if there is a need for it, may add a new API in the future to perform similar behavior in a more robust way.

@Avery-Dunn Avery-Dunn requested a review from a team as a code owner October 29, 2025 21:16
@Avery-Dunn Avery-Dunn requested a review from Copilot November 4, 2025 16:38
Copy link
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 pull request deprecates the extraQueryParameters() method and its builder counterparts across all parameter classes in the MSAL4J SDK. The deprecation indicates that this feature is not recommended for production scenarios and will be removed in a future release, potentially to be replaced by a new API.

  • Adds @Deprecated annotations to methods and builder methods
  • Adds consistent deprecation messages across all affected classes
  • Updates the interface IAcquireTokenParameters where the method is declared

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
IAcquireTokenParameters.java Deprecates the extraQueryParameters() method in the interface
UserNamePasswordParameters.java Deprecates getter and builder methods for extra query parameters
SilentParameters.java Deprecates getter and builder methods for extra query parameters
RefreshTokenParameters.java Deprecates getter and builder methods for extra query parameters
OnBehalfOfParameters.java Deprecates getter and builder methods for extra query parameters
InteractiveRequestParameters.java Deprecates getter and builder methods for extra query parameters
IntegratedWindowsAuthenticationParameters.java Deprecates getter and builder methods for extra query parameters
DeviceCodeFlowParameters.java Deprecates getter and builder methods for extra query parameters
ClientCredentialParameters.java Deprecates getter and builder methods for extra query parameters
AuthorizationRequestUrlParameters.java Deprecates getter and builder methods for extra query parameters
AuthorizationCodeParameters.java Deprecates getter and builder methods for extra query parameters

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

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.

3 participants