Skip to content

Remove usage of com.nimbusds.oauth2's Token classes #928

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

Merged
merged 2 commits into from
Apr 4, 2025

Conversation

Avery-Dunn
Copy link
Collaborator

@Avery-Dunn Avery-Dunn commented Apr 1, 2025

This PR removes usage of several com.nimbusds.oauth2 classes, as per #909

com.nimbusds.oauth2's OIDCTokens, OIDCTokenResponse, AccessToken, and RefreshToken were removed, as well as various smaller util classes that were used with them.

To replace them, this PR does the following:

  • Refactor MSAL Java's existing HttpResponse class to cover the behavior of Nimbus's HTTPResponse, and refactor it to use com.azure.json for JSON instead of com.nimbusds.oauth2
  • Refactor TokenResponse to deal with tokens as simple Strings, rather than use Nimbus's various token-related classes
  • Refactor TokenRequestExecutor to use MSAL Java's HttpResponse instead of Nimbus's HTTPResponse
  • Adjust unit test's HTTP mocking to handle the above changes

Note: this PR builds off the changes made in #927, so that must be merged in first

@Avery-Dunn Avery-Dunn requested a review from a team as a code owner April 1, 2025 20:53
@Avery-Dunn Avery-Dunn merged commit 962405a into avdunn/nimbus-http Apr 4, 2025
1 check passed
@Avery-Dunn Avery-Dunn deleted the avdunn/nimbus-tokens branch June 3, 2025 17:05
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