microsoft-authentication-library-for-java icon indicating copy to clipboard operation
microsoft-authentication-library-for-java copied to clipboard

Remove usage of com.nimbusds.oauth2 from grant-related classes

Open Avery-Dunn opened this issue 7 months ago • 0 comments

This PR removes the com.nimbusds.oauth2 dependency from various classes that deal with different grant types, as per https://github.com/AzureAD/microsoft-authentication-library-for-java/issues/909

The dependency was mainly used by these classes to create maps of different parameters needed for each OAuth grant type, so the changes are mostly the same for each file:

  • Remove com.nimbusds.oauth2.sdk.AuthorizationGrant and various similar imports
  • Replace usages of Nimbus's AuthorizationGrant subclasses with our existing OAuthAuthorizationGrant class
  • Replace Nimbus's AuthorizationGrant.toParameters() method with our own Map<String, List<String>> creation
  • Add a new GrantConstants file for standardized OAuth parameter names and values
  • Refactor older code and remove unused code

Avery-Dunn avatar Mar 27 '25 00:03 Avery-Dunn