AzureAD / microsoft-authentication-library-for-java

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

Provide a datapoint that shows that the token comes from the cache #697

Open bgavrilMS opened 1 year ago

bgavrilMS commented 1 year ago

MSAL.NET has an additional datapoint in AuthenticationResult.AuthenticationResultMetadata.TokenSource (which may not be the best naming, but the team wanted an object to be able to add more properties there) which can be one of "IdP", "Cache", "Broker".

This will help app developers understand where the token comes from.

Proposal for MSAL Java - put this in AuthenticationResult object directly. It's ok to have just 2 values for now - IdP and Cache. We can add Broker later.

CC @rayluo as this should also be done in MSAL PY.