ClientOAuthProvider.Scopes have priority again (#1236) #1238
+45
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I adjusted the priority of scope determination. Scopes specified via
ClientOAuthOptions.Scopeshave priority over scopes from PRM.Motivation and Context
When the client specifies Scopes via the ClientOAuthOptions, these scopes are used before the scopes of the PRM, just as the xml comment states
For example this is needed if a client only supports a subset of PRM scopes or wants to add the
offline_accessscope.How Has This Been Tested?
I added test method.
Breaking Changes
No. Unless they unexpectedly rely on
ClientOAuthOptions.Scopesnot having an effect in the presence of PRM scopes.Types of changes
Checklist
Additional context
This addresses #1236