-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core-http] Should TokenCredential.getToken accept a more granular type than RequestOptionsBase? #3535
Comments
Exporting this from @azure/identity doesn't solve the problem. No client libraries should take a dependency on @azure/identity |
I think the solution to this is to have it take it's own type of option bag, something like GetTokenOptions. Then in @azure/identity implementation define a new interface which is both GetTokenOptions and RequestOptionsBase, something like IdentityRequestOptions. Thoughts? |
Is Are we saying
becomes
in and in Azure Identity, all implementations will use
|
Apologies, I didn't fill in the gap as to why the "export from Here are the facts:
But maybe the idea behind this issue is moot: The only code that consumes |
That is not true. Non http client libraries like Event Hubs and Service Hubs will need to run the And these libraries do not care about the |
Good point, I suppose if they implemented some concept of a "policy" it'd be outside of
|
As we discussed offline this should be just the aborter or possibly separate options class which for now just contains the aborter for now. |
This change draws on work done by schaabs in Azure/azure-sdk-for-net#6525 to refactor Azure.Core and Azure.Identity to respond to architecture board feedback. It also makes a couple of TypeScript-specific tweaks that were discussed at the time @azure/identity was introduced. Fixes Azure#3535. Fixes Azure#3529.
…back (#3681) This change draws on work done by schaabs in Azure/azure-sdk-for-net#6525 to refactor Azure.Core and Azure.Identity to respond to architecture board feedback. It also makes a couple of TypeScript-specific tweaks that were discussed at the time @azure/identity was introduced. Fixes #3535. Fixes #3529.
This issue tracks a PR discussion which asks whether we should create a more granular type in
@azure/core-http
thanRequestOptionsBase
to pass toTokenCredential.getToken
.The easiest option is to just re-export this type from
@azure/identity
. Even if we make a more narrowly-scoped type forgetToken
to use, it'd still have to live in@azure/core-http
to be used in theTokenCredential
interface.RequestOptionsBase
is pretty minimal and only refers to one other type (TransferProgressEvent
), so it doesn't bring along any major baggage. The properties that it does contain are fairly useful for the purpose of augmenting HTTP requests that are sent through the pipeline./cc @schaabs @ramya-rao-a @bterlson
The text was updated successfully, but these errors were encountered: