[FEATURE REQ] Need add request in TokenCredential.getToken
Is your feature request related to a problem? Please describe.
In Fluent Java, we use host to determine which token we would get from server. Thus, we can't just use scopes as the only parameter for TokenCredential. I think the HttpRequest could be added in TokenRequestContext or in the parameter of TokenCredential.getToken.
Describe the solution you'd like Solution as above.
Describe alternatives you've considered
Additional context
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- [x] Description Added
- [x] Expected solution specified
Assigning to @g2vinay and @jianghaolu to review.
@g2vinay is this still an unresolved issue?
The Identity sdk uses MSAL underneath, which only accepts scopes, it would not be appropriate to parse the scopes from an HttpRequest at the Identity SDK level as that should be done at the higher level where TokenCredential is being used.
The recommended approach would be to parse the scopes according to the host on your end and then pass that to TokenRequestConrext in the getToken API call. You can see an example here