AzureAD / microsoft-authentication-library-common-for-android

Common code used by both the Active Directory Authentication Library (ADAL) and the Microsoft Authentication Library (MSAL)
MIT License
41 stars 36 forks source link

Extract mssts response handler #2471

Closed mohitc1 closed 3 months ago

mohitc1 commented 3 months ago

Changes:

  1. Extract response handling in to separate class from MicrosoftStsOAuth2Strategy. Standard MSSTS response handling done in MicrosoftStsTokenResponseHandler extends AbstractMicrosoftStsTokenResponseHandler.
  2. ~Add a token response handler as a field in MicrosoftStsTokenRequest object. Caller can set response handler (extends AbstractMicrosoftStsTokenResponseHandler) for any customization like handling encryption response. We would use this in PRT response handling in upcoming and broker PRs~
  3. By default MicrosoftStsOAuth2Strategy object would use standard response handler MicrosoftStsTokenResponseHandler.

Added unit tests for these changes.

Corresponding broker changes https://github.com/AzureAD/ad-accounts-for-android/pull/2902