microsoft-authentication-library-for-java
microsoft-authentication-library-for-java copied to clipboard
Remove usage of com.nimbusds.oauth2 from grant-related classes
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.AuthorizationGrantand various similar imports - Replace usages of Nimbus's
AuthorizationGrantsubclasses with our existingOAuthAuthorizationGrantclass - Replace Nimbus's
AuthorizationGrant.toParameters()method with our ownMap<String, List<String>>creation - Add a new
GrantConstantsfile for standardized OAuth parameter names and values - Refactor older code and remove unused code