From 883aba8f83cbd3e97d445e43adcb0d20d4ff6b24 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Mon, 8 Feb 2021 17:26:30 -0800 Subject: [PATCH] Use TokenCredential from core-auth than identity (#13677) Use `TokenCredential` from `core-auth` instead of `identity` package so that the latter need not be pulled into dependencies list from devDependencies in #13670 --- .../ai-form-recognizer/review/ai-form-recognizer.api.md | 2 +- .../ai-form-recognizer/src/formRecognizerClient.ts | 3 +-- .../ai-form-recognizer/src/formTrainingClient.ts | 3 +-- .../ai-metrics-advisor/review/ai-metrics-advisor.api.md | 2 +- .../ai-metrics-advisor/src/createClientPipeline.ts | 2 +- .../src/metricsAdvisorAdministrationClient.ts | 2 +- .../ai-metrics-advisor/src/metricsAdvisorClient.ts | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sdk/formrecognizer/ai-form-recognizer/review/ai-form-recognizer.api.md b/sdk/formrecognizer/ai-form-recognizer/review/ai-form-recognizer.api.md index ce6ca4eed0b2..d63e53a9ee87 100644 --- a/sdk/formrecognizer/ai-form-recognizer/review/ai-form-recognizer.api.md +++ b/sdk/formrecognizer/ai-form-recognizer/review/ai-form-recognizer.api.md @@ -13,7 +13,7 @@ import { PipelineOptions } from '@azure/core-http'; import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; import { RestResponse } from '@azure/core-http'; -import { TokenCredential } from '@azure/identity'; +import { TokenCredential } from '@azure/core-auth'; // @public export interface AccountProperties { diff --git a/sdk/formrecognizer/ai-form-recognizer/src/formRecognizerClient.ts b/sdk/formrecognizer/ai-form-recognizer/src/formRecognizerClient.ts index c220b3d22477..c33054b54e27 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/formRecognizerClient.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/formRecognizerClient.ts @@ -9,8 +9,7 @@ import { operationOptionsToRequestOptionsBase, OperationOptions } from "@azure/core-http"; -import { TokenCredential } from "@azure/identity"; -import { KeyCredential } from "@azure/core-auth"; +import { TokenCredential, KeyCredential } from "@azure/core-auth"; import { SDK_VERSION, DEFAULT_COGNITIVE_SCOPE, diff --git a/sdk/formrecognizer/ai-form-recognizer/src/formTrainingClient.ts b/sdk/formrecognizer/ai-form-recognizer/src/formTrainingClient.ts index f1a7526fd503..5a838acbec65 100644 --- a/sdk/formrecognizer/ai-form-recognizer/src/formTrainingClient.ts +++ b/sdk/formrecognizer/ai-form-recognizer/src/formTrainingClient.ts @@ -11,8 +11,7 @@ import { operationOptionsToRequestOptionsBase, RestResponse } from "@azure/core-http"; -import { TokenCredential } from "@azure/identity"; -import { KeyCredential } from "@azure/core-auth"; +import { TokenCredential, KeyCredential } from "@azure/core-auth"; import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import "@azure/core-paging"; import { diff --git a/sdk/metricsadvisor/ai-metrics-advisor/review/ai-metrics-advisor.api.md b/sdk/metricsadvisor/ai-metrics-advisor/review/ai-metrics-advisor.api.md index f9ec7f3a8487..aca5454cf681 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/review/ai-metrics-advisor.api.md +++ b/sdk/metricsadvisor/ai-metrics-advisor/review/ai-metrics-advisor.api.md @@ -9,7 +9,7 @@ import { OperationOptions } from '@azure/core-http'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PipelineOptions } from '@azure/core-http'; import { RestResponse } from '@azure/core-http'; -import { TokenCredential } from '@azure/identity'; +import { TokenCredential } from '@azure/core-auth'; // @public export interface AlertConfigurationsPageResponse extends Array { diff --git a/sdk/metricsadvisor/ai-metrics-advisor/src/createClientPipeline.ts b/sdk/metricsadvisor/ai-metrics-advisor/src/createClientPipeline.ts index c339c953a117..b379382319ea 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/src/createClientPipeline.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/src/createClientPipeline.ts @@ -9,7 +9,7 @@ import { isTokenCredential } from "@azure/core-http"; -import { TokenCredential } from "@azure/identity"; +import { TokenCredential } from "@azure/core-auth"; import { LIB_INFO, diff --git a/sdk/metricsadvisor/ai-metrics-advisor/src/metricsAdvisorAdministrationClient.ts b/sdk/metricsadvisor/ai-metrics-advisor/src/metricsAdvisorAdministrationClient.ts index 9e72ece153e2..ecdfee7663fd 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/src/metricsAdvisorAdministrationClient.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/src/metricsAdvisorAdministrationClient.ts @@ -10,7 +10,7 @@ import { OperationOptions, RestResponse } from "@azure/core-http"; -import { TokenCredential } from "@azure/identity"; +import { TokenCredential } from "@azure/core-auth"; import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import "@azure/core-paging"; diff --git a/sdk/metricsadvisor/ai-metrics-advisor/src/metricsAdvisorClient.ts b/sdk/metricsadvisor/ai-metrics-advisor/src/metricsAdvisorClient.ts index b982d1cf9a36..35cdcc2da76d 100644 --- a/sdk/metricsadvisor/ai-metrics-advisor/src/metricsAdvisorClient.ts +++ b/sdk/metricsadvisor/ai-metrics-advisor/src/metricsAdvisorClient.ts @@ -11,7 +11,7 @@ import { } from "@azure/core-http"; import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; import "@azure/core-paging"; -import { TokenCredential } from "@azure/identity"; +import { TokenCredential } from "@azure/core-auth"; import { GeneratedClient } from "./generated/generatedClient"; import { createSpan } from "./tracing"; import { MetricsAdvisorKeyCredential } from "./metricsAdvisorKeyCredentialPolicy";