The first commit in this PR refactors the logic for determining when a refresh should be performed, since it had gotten complex as different scenarios and edge cases were introduced over the years. That refactor should not affect the existing refresh behavior.
The second commit adds the existence of the claims parameter as reason to refresh, as per https://github.com/AzureAD/microsoft-authentication-library-for-java/issues/794. With this change app developers will no longer need to explicitly use the forceRefresh() API when dealing with tokens that have claims/client capabilities/etc.
The first commit in this PR refactors the logic for determining when a refresh should be performed, since it had gotten complex as different scenarios and edge cases were introduced over the years. That refactor should not affect the existing refresh behavior.
The second commit adds the existence of the claims parameter as reason to refresh, as per https://github.com/AzureAD/microsoft-authentication-library-for-java/issues/794. With this change app developers will no longer need to explicitly use the forceRefresh() API when dealing with tokens that have claims/client capabilities/etc.