Skip to content

API Changes, deprecating all methods not using TokenParameters #1595

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 49 commits into from
Mar 22, 2022

Conversation

fadidurah
Copy link
Contributor

@fadidurah fadidurah commented Feb 16, 2022

What
Deprecating methods in PublicClientApplication SingleAccountPublicClientApplication and MultipleAccountPublicClientApplication that are not using TokenParameter subclasses or the new SignInParameters class. Reference this Design PR: https://identitydivision.visualstudio.com/DevEx/_git/AuthLibrariesApiReview/pullrequest/4872

Why
This change stemmed from a smaller bug regarding SCOPES being passed in as a string array https://identitydivision.visualstudio.com/Engineering/_boards/board/t/Auth%20Client%20-%20Android/Backlog%20items/?workitem=1104317. Team decided that a better solution would be to standardize the use of the TokenParameter Subclasses to increase consistency, avoid using different object types for the same conceptual scope, and reduce the number of methods that our API is exposing to developers.

How
Deprecate methods not using TokenParameter subclasses or the new SignInParameters class. This is the first in a two-step plan, where the deprecation is included in the next major release, and followed by deletion of these deprecating methods in the following major release.

Testing
Since existing behavior is only deprecated, existing testing is kept as is. For new methods, new versions of the existing tests were created to test out the same behaviors while using TokenParameter methods.

@fadidurah fadidurah changed the title API Changes, deprecating all methods not using TokenParameters. WIP API Changes, deprecating all methods not using TokenParameters Feb 22, 2022
@fadidurah
Copy link
Contributor Author

Please take a look at this common PR: AzureAD/microsoft-authentication-library-common-for-android#1682

Above PR is a dependency for this one, need to add fields to PublicApiId,java

Copy link
Contributor

@shoatman shoatman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fadi - Please build a new version of MSAL with your changes and try and upgrade the existing sample app to ensure that we haven't missed/broken anything with this fix. We may want to get Teams to try and create a build with these changes as well.... in fact I think we should plan on it.

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2022

Codecov Report

Merging #1595 (b586176) into dev (e30a876) will increase coverage by 0.26%.
The diff coverage is 90.00%.

@@             Coverage Diff              @@
##                dev    #1595      +/-   ##
============================================
+ Coverage     49.10%   49.36%   +0.26%     
- Complexity      358      370      +12     
============================================
  Files            58       59       +1     
  Lines          2615     2686      +71     
  Branches        319      324       +5     
============================================
+ Hits           1284     1326      +42     
- Misses         1190     1216      +26     
- Partials        141      144       +3     
Impacted Files Coverage Δ
...client/MultipleAccountPublicClientApplication.java 45.89% <66.66%> (+0.89%) ⬆️
...om/microsoft/identity/client/SignInParameters.java 71.42% <71.42%> (ø)
...osoft/identity/client/PublicClientApplication.java 43.38% <92.59%> (-1.31%) ⬇️
...y/client/SingleAccountPublicClientApplication.java 73.56% <94.87%> (+2.69%) ⬆️
...tity/client/internal/CommandParametersAdapter.java 76.88% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f7fc3a...b586176. Read the comment docs.

Copy link
Contributor

@iamgusain iamgusain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some minor comments

Copy link
Contributor Author

@fadidurah fadidurah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed Amit's Comments

@fadidurah fadidurah merged commit 88f3079 into dev Mar 22, 2022
@fadidurah fadidurah deleted the fadi/api-changes branch May 3, 2022 04:13
@negoe
Copy link
Contributor

negoe commented Jul 28, 2022

This is the first in a two-step plan, where the deprecation is included in the next major release, and followed by deletion of these deprecating methods in the following release.

@fadidurah Can we please clarify in the sentence that deletion will be in next 'major' version release instead of following release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants