diff --git a/sdk/identity/identity/CHANGELOG.md b/sdk/identity/identity/CHANGELOG.md index 91f5ac8e1510..8023b36fe503 100644 --- a/sdk/identity/identity/CHANGELOG.md +++ b/sdk/identity/identity/CHANGELOG.md @@ -37,10 +37,9 @@ async function main() { #### New credentials -Identity v2 includes three new credential types: +Identity v2 includes two new credential types: - `AzurePowerShellCredential`, which re-uses any account previously authenticated with the `Az.Account` PowerShell module. -- `AzureApplicationCredential`, which is a simplified `DefaultAzureCredential` that only includes `EnvironmentCredential` and `ManagedIdentityCredential`. - `OnBehalfOfCredential`, which enables the [On-Behalf-Of authentication flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow). #### New features in all credentials @@ -109,7 +108,7 @@ Azure Service Fabric support hasn't been added on the initial version 2 of Ident #### Breaking Changes from 2.0.0-beta.6 -- Renamed the `ApplicationCredential` to `AzureApplicationCredential`. +- Stopped exporting the `ApplicationCredential` from the package. This will be re-introduced in the future. - Removed the `CredentialPersistenceOptions` from `DefaultAzureCredential` and `EnvironmentCredential`. - Merged the configuration and the options bag on the `OnBehalfOfCredential` into a single options bag. - `AuthenticationRequiredError` (introduced in 2.0.0-beta.1) now has its parameters into a single options bag. diff --git a/sdk/identity/identity/review/identity.api.md b/sdk/identity/identity/review/identity.api.md index 52145796d357..87bb5fbee2a6 100644 --- a/sdk/identity/identity/review/identity.api.md +++ b/sdk/identity/identity/review/identity.api.md @@ -62,16 +62,6 @@ export class AuthorizationCodeCredential implements TokenCredential { getToken(scopes: string | string[], options?: GetTokenOptions): Promise; } -// @public -export class AzureApplicationCredential extends ChainedTokenCredential { - constructor(options?: AzureApplicationCredentialOptions); -} - -// @public -export interface AzureApplicationCredentialOptions extends TokenCredentialOptions, CredentialPersistenceOptions { - managedIdentityClientId?: string; -} - // @public export enum AzureAuthorityHosts { AzureChina = "https://login.chinacloudapi.cn", diff --git a/sdk/identity/identity/src/index.ts b/sdk/identity/identity/src/index.ts index 643edee90d88..a0d59fc683b9 100644 --- a/sdk/identity/identity/src/index.ts +++ b/sdk/identity/identity/src/index.ts @@ -63,10 +63,6 @@ export { UsernamePasswordCredentialOptions } from "./credentials/usernamePasswor export { AuthorizationCodeCredential } from "./credentials/authorizationCodeCredential"; export { AzurePowerShellCredential } from "./credentials/azurePowerShellCredential"; export { AzurePowerShellCredentialOptions } from "./credentials/azurePowerShellCredentialOptions"; -export { - AzureApplicationCredential, - AzureApplicationCredentialOptions -} from "./credentials/azureApplicationCredential"; export { VisualStudioCodeCredential, diff --git a/sdk/identity/identity/test/internal/node/azureApplicationCredential.spec.ts b/sdk/identity/identity/test/internal/node/azureApplicationCredential.spec.ts index 4ee0220d33e6..faadac9f2dc1 100644 --- a/sdk/identity/identity/test/internal/node/azureApplicationCredential.spec.ts +++ b/sdk/identity/identity/test/internal/node/azureApplicationCredential.spec.ts @@ -3,7 +3,7 @@ import { assert } from "chai"; import { RestError } from "@azure/core-rest-pipeline"; -import { AzureApplicationCredential } from "../../../src"; +import { AzureApplicationCredential } from "../../../src/credentials/azureApplicationCredential"; import { prepareIdentityTests } from "../../httpRequests"; import { createResponse, diff --git a/sdk/identity/identity/test/public/node/azureApplicationCredential.spec.ts b/sdk/identity/identity/test/public/node/azureApplicationCredential.spec.ts index 53aebe1663d7..338a6c5aca34 100644 --- a/sdk/identity/identity/test/public/node/azureApplicationCredential.spec.ts +++ b/sdk/identity/identity/test/public/node/azureApplicationCredential.spec.ts @@ -2,12 +2,20 @@ // Licensed under the MIT license. import { assert } from "chai"; -import { AzureApplicationCredential } from "../../../src"; import { MsalTestCleanup, msalNodeTestSetup, testTracing } from "../../msalTestUtils"; import { getError } from "../../authTestUtils"; import { Context } from "mocha"; +import { AccessToken, GetTokenOptions, TokenCredential } from "@azure/core-auth"; -describe("AzureApplicationCredential", function() { +// TODO: Use the real one once we decide to re-enable this on the public API. +class AzureApplicationCredential implements TokenCredential { + getToken(_scope: string | string[], _getTokenOptions?: GetTokenOptions): Promise { + throw new Error("Not implemented"); + } +} + +// TODO: Re-enable this when possible. +describe.skip("AzureApplicationCredential", function() { let cleanup: MsalTestCleanup; const environmentVariableNames = ["AZURE_TENANT_ID", "AZURE_CLIENT_ID", "AZURE_CLIENT_SECRET"]; const cachedValues: Record = {};