AzureAD / microsoft-authentication-library-for-java

Microsoft Authentication Library (MSAL) for Java http://aka.ms/aadv2
MIT License
288 stars 144 forks source link

Refresh tokens when request contains claims #811

Closed Avery-Dunn closed 3 months ago

Avery-Dunn commented 7 months ago

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.

bgavrilMS commented 3 months ago

Any updates on this @Avery-Dunn ?