AzureAD / microsoft-authentication-library-for-java

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

Refactor instance/region discovery #763

Closed Avery-Dunn closed 11 months ago

Avery-Dunn commented 11 months ago

During the discussions about https://github.com/AzureAD/microsoft-authentication-library-for-java/pull/762 it was pointed out that over the years the code flow for instance and region discovery has gotten messy and inefficient.

This PR attempts to refactor the logic around it to make the code flow clearer and avoid making unnecessary/repetitive method calls.