Skip to content

[core-http] Reintroduce ServiceClientCredentials as an accepted credential type#4773

Merged
daviwil merged 5 commits intoAzure:masterfrom
daviwil:add-back-serviceclientcredentials
Aug 16, 2019
Merged

[core-http] Reintroduce ServiceClientCredentials as an accepted credential type#4773
daviwil merged 5 commits intoAzure:masterfrom
daviwil:add-back-serviceclientcredentials

Conversation

@daviwil
Copy link
Contributor

@daviwil daviwil commented Aug 15, 2019

This change reintroduces the ServiceClientCredentials interface as an accepted credential type for ServiceClient classes. This is necessary because libraries like @azure/app-configuration and the various Cognitive Services libraries need to use their own custom (non-AAD) authentication schemes. Without this change, users of those libraries would have to construct their own RequestPolicy pipeline just so that the signingPolicy can be used.

Since this affects a bunch of libraries I went ahead and bumped the core dependency versions of our various libraries so that everything is up to date (@chradek, this will affect your tracing PR).

@daviwil
Copy link
Contributor Author

daviwil commented Aug 15, 2019

Also added a fix that removes some unneeded methods in core-http's AbortSignalLike interface so that it doesn't conflict with @azure/abort-controller's interface.

export interface AbortSignalLike {
readonly aborted: boolean;
dispatchEvent: (event: Event) => boolean;
onabort: ((this: AbortSignalLike, ev: Event) => any) | null;
Copy link
Contributor

@ramya-rao-a ramya-rao-a Aug 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we still defining AbortSignalLike incore-http instead of using it from abort-controller?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it mainly to avoid potentially sidespread changes for the interface import but it seems quite minimal. I've updated the PR to re-export AbortSignalLike from @azure/abort-controller.

@daviwil daviwil merged commit 8c22d1c into Azure:master Aug 16, 2019
@daviwil daviwil deleted the add-back-serviceclientcredentials branch August 16, 2019 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants