From dc5eed56889a4d8a4f52d81569a816bbc3afcc5a Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Wed, 17 Jul 2024 15:45:40 -0400 Subject: [PATCH 01/15] Implemented functionality to skip the cache for MI when claims are provided --- .../src/client/ManagedIdentityApplication.ts | 6 +++- .../request/ManagedIdentityRequestParams.ts | 4 ++- .../ManagedIdentitySources/Imds.spec.ts | 32 +++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/lib/msal-node/src/client/ManagedIdentityApplication.ts b/lib/msal-node/src/client/ManagedIdentityApplication.ts index a14ef67ec2..a357799c4d 100644 --- a/lib/msal-node/src/client/ManagedIdentityApplication.ts +++ b/lib/msal-node/src/client/ManagedIdentityApplication.ts @@ -130,6 +130,7 @@ export class ManagedIdentityApplication { } const managedIdentityRequest: ManagedIdentityRequest = { + claims: managedIdentityRequestParams.claims, forceRefresh: managedIdentityRequestParams.forceRefresh, resource: managedIdentityRequestParams.resource.replace( "/.default", @@ -142,7 +143,10 @@ export class ManagedIdentityApplication { correlationId: this.cryptoProvider.createNewGuid(), }; - if (managedIdentityRequest.forceRefresh) { + if ( + managedIdentityRequest.claims || + managedIdentityRequest.forceRefresh + ) { // make a network call to the managed identity source return this.managedIdentityClient.sendManagedIdentityTokenRequest( managedIdentityRequest, diff --git a/lib/msal-node/src/request/ManagedIdentityRequestParams.ts b/lib/msal-node/src/request/ManagedIdentityRequestParams.ts index 66865adbac..c94e92bbb6 100644 --- a/lib/msal-node/src/request/ManagedIdentityRequestParams.ts +++ b/lib/msal-node/src/request/ManagedIdentityRequestParams.ts @@ -5,10 +5,12 @@ /** * ManagedIdentityRequest + * - claims - a stringified claims request which will be added to all /authorize and /token calls * - forceRefresh - forces managed identity requests to skip the cache and make network calls if true - * - resource - resource requested to access the protected API. It should be of the form "{ResourceIdUri}" or {ResourceIdUri/.default}. For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default + * - resource - resource requested to access the protected API. It should be of the form "{ResourceIdUri}" or {ResourceIdUri/.default}. For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default */ export type ManagedIdentityRequestParams = { + claims?: string; forceRefresh?: boolean; resource: string; }; diff --git a/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts b/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts index b3b1e3d315..c414585564 100644 --- a/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts +++ b/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts @@ -548,6 +548,38 @@ describe("Acquires a token successfully via an IMDS Managed Identity", () => { ); }); + test("ignores a cached token when claims are provided", async () => { + let networkManagedIdentityResult: AuthenticationResult = + await systemAssignedManagedIdentityApplication.acquireToken({ + resource: MANAGED_IDENTITY_RESOURCE, + }); + expect(networkManagedIdentityResult.fromCache).toBe(false); + + expect(networkManagedIdentityResult.accessToken).toEqual( + DEFAULT_SYSTEM_ASSIGNED_MANAGED_IDENTITY_AUTHENTICATION_RESULT.accessToken + ); + + const cachedManagedIdentityResult: AuthenticationResult = + await systemAssignedManagedIdentityApplication.acquireToken({ + resource: MANAGED_IDENTITY_RESOURCE, + }); + expect(cachedManagedIdentityResult.fromCache).toBe(true); + expect(cachedManagedIdentityResult.accessToken).toEqual( + DEFAULT_SYSTEM_ASSIGNED_MANAGED_IDENTITY_AUTHENTICATION_RESULT.accessToken + ); + + networkManagedIdentityResult = + await systemAssignedManagedIdentityApplication.acquireToken({ + claims: "fake_claims", + resource: MANAGED_IDENTITY_RESOURCE, + }); + expect(networkManagedIdentityResult.fromCache).toBe(false); + + expect(networkManagedIdentityResult.accessToken).toEqual( + DEFAULT_SYSTEM_ASSIGNED_MANAGED_IDENTITY_AUTHENTICATION_RESULT.accessToken + ); + }); + test("ignores a cached token when forceRefresh is set to true", async () => { let networkManagedIdentityResult: AuthenticationResult = await systemAssignedManagedIdentityApplication.acquireToken({ From e2b3281b77ad3b65325a02874ec1d737265b693d Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Wed, 17 Jul 2024 15:46:28 -0400 Subject: [PATCH 02/15] Change files --- ...ure-msal-node-61f7f536-1cf8-4eef-ac92-89902d8e6963.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@azure-msal-node-61f7f536-1cf8-4eef-ac92-89902d8e6963.json diff --git a/change/@azure-msal-node-61f7f536-1cf8-4eef-ac92-89902d8e6963.json b/change/@azure-msal-node-61f7f536-1cf8-4eef-ac92-89902d8e6963.json new file mode 100644 index 0000000000..e1ef0e2efa --- /dev/null +++ b/change/@azure-msal-node-61f7f536-1cf8-4eef-ac92-89902d8e6963.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Implemented functionality to skip the cache for MI when claims are provided", + "packageName": "@azure/msal-node", + "email": "rginsburg@microsoft.com", + "dependentChangeType": "patch" +} From 0308ae4c7ab358ac07e70c1ceb8e9b6cbfb2bdee Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Wed, 17 Jul 2024 15:51:57 -0400 Subject: [PATCH 03/15] beachball + apiExtractor --- .../@azure-msal-node-61f7f536-1cf8-4eef-ac92-89902d8e6963.json | 2 +- lib/msal-node/apiReview/msal-node.api.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/change/@azure-msal-node-61f7f536-1cf8-4eef-ac92-89902d8e6963.json b/change/@azure-msal-node-61f7f536-1cf8-4eef-ac92-89902d8e6963.json index e1ef0e2efa..88e793cdce 100644 --- a/change/@azure-msal-node-61f7f536-1cf8-4eef-ac92-89902d8e6963.json +++ b/change/@azure-msal-node-61f7f536-1cf8-4eef-ac92-89902d8e6963.json @@ -1,6 +1,6 @@ { "type": "minor", - "comment": "Implemented functionality to skip the cache for MI when claims are provided", + "comment": "Implemented functionality to skip the cache for MI when claims are provided #7207", "packageName": "@azure/msal-node", "email": "rginsburg@microsoft.com", "dependentChangeType": "patch" diff --git a/lib/msal-node/apiReview/msal-node.api.md b/lib/msal-node/apiReview/msal-node.api.md index 3ad5d455df..b7b8b77fe9 100644 --- a/lib/msal-node/apiReview/msal-node.api.md +++ b/lib/msal-node/apiReview/msal-node.api.md @@ -449,6 +449,7 @@ export type ManagedIdentityIdParams = { // // @public export type ManagedIdentityRequestParams = { + claims?: string; forceRefresh?: boolean; resource: string; }; From 271094e8e50e2efbd8eb25684de8fdc1c4460884 Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Wed, 17 Jul 2024 17:23:05 -0400 Subject: [PATCH 04/15] Change files --- ...e-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json diff --git a/change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json b/change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json new file mode 100644 index 0000000000..8c04e8d283 --- /dev/null +++ b/change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Implemented functionality to skip the cache for MI when claims are provided", + "packageName": "@azure/msal-common", + "email": "rginsburg@microsoft.com", + "dependentChangeType": "patch" +} From 695efecdacd072eabd69f72499d6259999a386cf Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Wed, 17 Jul 2024 17:26:49 -0400 Subject: [PATCH 05/15] Added claims to the MI endpoint --- ...-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json | 2 +- lib/msal-common/apiReview/msal-common.api.md | 17 +++++++++++++++++ lib/msal-common/src/index.ts | 1 + .../BaseManagedIdentitySource.ts | 8 ++++++++ .../ManagedIdentitySources/Imds.spec.ts | 19 ++++++++++++++++++- 5 files changed, 45 insertions(+), 2 deletions(-) diff --git a/change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json b/change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json index 8c04e8d283..5edbf1fb0d 100644 --- a/change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json +++ b/change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json @@ -1,6 +1,6 @@ { "type": "minor", - "comment": "Implemented functionality to skip the cache for MI when claims are provided", + "comment": "Implemented functionality to skip the cache for MI when claims are provided #7207", "packageName": "@azure/msal-common", "email": "rginsburg@microsoft.com", "dependentChangeType": "patch" diff --git a/lib/msal-common/apiReview/msal-common.api.md b/lib/msal-common/apiReview/msal-common.api.md index 40b071fd43..99ca29e97c 100644 --- a/lib/msal-common/apiReview/msal-common.api.md +++ b/lib/msal-common/apiReview/msal-common.api.md @@ -3461,6 +3461,23 @@ export type RequestThumbprint = { shrOptions?: ShrOptions; }; +// Warning: (ae-missing-release-tag) "RequestValidator" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export class RequestValidator { + // (undocumented) + static validateClaims(claims: string): void; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + static validateCodeChallengeMethod(codeChallengeMethod: string): void; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + static validateCodeChallengeParams(codeChallenge: string, codeChallengeMethod: string): void; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + static validatePrompt(prompt: string): void; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + static validateRedirectUri(redirectUri: string): void; +} + // Warning: (ae-missing-release-tag) "RESPONSE_MODE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) diff --git a/lib/msal-common/src/index.ts b/lib/msal-common/src/index.ts index 526fbd6d93..d77fda83da 100644 --- a/lib/msal-common/src/index.ts +++ b/lib/msal-common/src/index.ts @@ -140,6 +140,7 @@ export { NativeRequest } from "./request/NativeRequest"; export { NativeSignOutRequest } from "./request/NativeSignOutRequest"; export { RequestParameterBuilder } from "./request/RequestParameterBuilder"; export { StoreInCache } from "./request/StoreInCache"; +export { RequestValidator } from "./request/RequestValidator"; export { ClientAssertion, ClientAssertionConfig, diff --git a/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts b/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts index f19de8d635..14566eed4c 100644 --- a/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +++ b/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts @@ -19,6 +19,8 @@ import { createClientAuthError, AuthenticationResult, UrlString, + RequestValidator, + AADServerParamKeys, } from "@azure/msal-common"; import { ManagedIdentityId } from "../../config/ManagedIdentityId"; import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters"; @@ -138,6 +140,12 @@ export abstract class BaseManagedIdentitySource { const networkRequestOptions: NetworkRequestOptions = { headers }; + if (managedIdentityRequest.claims) { + RequestValidator.validateClaims(managedIdentityRequest.claims); + networkRequest.bodyParameters[AADServerParamKeys.CLAIMS] = + encodeURIComponent(managedIdentityRequest.claims); + } + if (Object.keys(networkRequest.bodyParameters).length) { networkRequestOptions.body = networkRequest.computeParametersBodyString(); diff --git a/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts b/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts index c414585564..4fa71aee78 100644 --- a/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts +++ b/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts @@ -14,6 +14,7 @@ import { MANAGED_IDENTITY_RESOURCE_ID, MANAGED_IDENTITY_RESOURCE_ID_2, MANAGED_IDENTITY_TOKEN_RETRIEVAL_ERROR_MESSAGE, + TEST_CONFIG, THREE_SECONDS_IN_MILLI, getCacheKey, } from "../../test_kit/StringConstants"; @@ -31,6 +32,7 @@ import { ManagedIdentitySourceNames, } from "../../../src/utils/Constants"; import { + AADServerParamKeys, AccessTokenEntity, AuthenticationResult, CacheHelpers, @@ -549,6 +551,11 @@ describe("Acquires a token successfully via an IMDS Managed Identity", () => { }); test("ignores a cached token when claims are provided", async () => { + const sendGetRequestAsyncSpy: jest.SpyInstance = jest.spyOn( + networkClient, + "sendGetRequestAsync" + ); + let networkManagedIdentityResult: AuthenticationResult = await systemAssignedManagedIdentityApplication.acquireToken({ resource: MANAGED_IDENTITY_RESOURCE, @@ -570,11 +577,21 @@ describe("Acquires a token successfully via an IMDS Managed Identity", () => { networkManagedIdentityResult = await systemAssignedManagedIdentityApplication.acquireToken({ - claims: "fake_claims", + claims: TEST_CONFIG.CLAIMS, resource: MANAGED_IDENTITY_RESOURCE, }); expect(networkManagedIdentityResult.fromCache).toBe(false); + console.log(sendGetRequestAsyncSpy); + + expect( + sendGetRequestAsyncSpy.mock.lastCall[1].body.includes( + `${AADServerParamKeys.CLAIMS}=${encodeURIComponent( + TEST_CONFIG.CLAIMS + )}` + ) + ).toBe(true); + expect(networkManagedIdentityResult.accessToken).toEqual( DEFAULT_SYSTEM_ASSIGNED_MANAGED_IDENTITY_AUTHENTICATION_RESULT.accessToken ); From 35cd7bc99d7c79347c01bf4ad538abbe7bdd3f0c Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Wed, 17 Jul 2024 17:28:08 -0400 Subject: [PATCH 06/15] removed comment --- lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts b/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts index 4fa71aee78..e8a2233d51 100644 --- a/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts +++ b/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts @@ -582,8 +582,6 @@ describe("Acquires a token successfully via an IMDS Managed Identity", () => { }); expect(networkManagedIdentityResult.fromCache).toBe(false); - console.log(sendGetRequestAsyncSpy); - expect( sendGetRequestAsyncSpy.mock.lastCall[1].body.includes( `${AADServerParamKeys.CLAIMS}=${encodeURIComponent( From 3eaf74dfad65636bfe215efced1a7e18ab509724 Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Mon, 29 Jul 2024 14:57:09 -0400 Subject: [PATCH 07/15] Added claims to clientAssertionCallback --- lib/msal-common/apiReview/msal-common.api.md | 3 ++- lib/msal-common/src/account/ClientCredentials.ts | 1 + lib/msal-common/src/utils/ClientAssertionUtils.ts | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/msal-common/apiReview/msal-common.api.md b/lib/msal-common/apiReview/msal-common.api.md index fe8f543ac5..633803a0b7 100644 --- a/lib/msal-common/apiReview/msal-common.api.md +++ b/lib/msal-common/apiReview/msal-common.api.md @@ -1072,6 +1072,7 @@ export type ClientAssertionCallback = (config: ClientAssertionConfig) => Promise export type ClientAssertionConfig = { clientId: string; tokenEndpoint?: string; + claims?: string; }; declare namespace ClientAssertionUtils { @@ -1995,7 +1996,7 @@ function generateCredentialKey(credentialEntity: CredentialEntity): string; // Warning: (ae-missing-release-tag) "getClientAssertion" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export function getClientAssertion(clientAssertion: string | ClientAssertionCallback, clientId: string, tokenEndpoint?: string): Promise; +export function getClientAssertion(clientAssertion: string | ClientAssertionCallback, clientId: string, tokenEndpoint?: string, claims?: string): Promise; // Warning: (ae-missing-release-tag) "getDeserializedResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // diff --git a/lib/msal-common/src/account/ClientCredentials.ts b/lib/msal-common/src/account/ClientCredentials.ts index 6c148cf4f0..d5f79b9ba3 100644 --- a/lib/msal-common/src/account/ClientCredentials.ts +++ b/lib/msal-common/src/account/ClientCredentials.ts @@ -6,6 +6,7 @@ export type ClientAssertionConfig = { clientId: string; tokenEndpoint?: string; + claims?: string; }; export type ClientAssertionCallback = ( diff --git a/lib/msal-common/src/utils/ClientAssertionUtils.ts b/lib/msal-common/src/utils/ClientAssertionUtils.ts index cb9c68c618..8be2ad5466 100644 --- a/lib/msal-common/src/utils/ClientAssertionUtils.ts +++ b/lib/msal-common/src/utils/ClientAssertionUtils.ts @@ -11,7 +11,8 @@ import { export async function getClientAssertion( clientAssertion: string | ClientAssertionCallback, clientId: string, - tokenEndpoint?: string + tokenEndpoint?: string, + claims?: string ): Promise { if (typeof clientAssertion === "string") { return clientAssertion; @@ -19,6 +20,7 @@ export async function getClientAssertion( const config: ClientAssertionConfig = { clientId: clientId, tokenEndpoint: tokenEndpoint, + claims: claims, }; return clientAssertion(config); } From 622869d20e4c4af7f540adb5f3daf228040a938a Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Tue, 30 Jul 2024 15:17:08 -0400 Subject: [PATCH 08/15] Deprecated client assertion strings --- lib/msal-common/apiReview/msal-common.api.md | 4 +++- lib/msal-common/src/account/ClientCredentials.ts | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/msal-common/apiReview/msal-common.api.md b/lib/msal-common/apiReview/msal-common.api.md index 633803a0b7..50d9be7ac1 100644 --- a/lib/msal-common/apiReview/msal-common.api.md +++ b/lib/msal-common/apiReview/msal-common.api.md @@ -1057,7 +1057,7 @@ const CLIENT_SECRET = "client_secret"; // // @public export type ClientAssertion = { - assertion: string | ClientAssertionCallback; + assertion: assertionString | assertionCallback; assertionType: string; }; @@ -4224,6 +4224,8 @@ const X_MS_LIB_CAPABILITY = "x-ms-lib-capability"; // Warnings were encountered during analysis: // +// src/account/ClientCredentials.ts:25:5 - (ae-forgotten-export) The symbol "assertionString" needs to be exported by the entry point index.d.ts +// src/account/ClientCredentials.ts:25:5 - (ae-forgotten-export) The symbol "assertionCallback" needs to be exported by the entry point index.d.ts // src/authority/Authority.ts:135:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // src/authority/Authority.ts:136:8 - (tsdoc-undefined-tag) The TSDoc tag "@private" is not defined in this configuration // src/authority/Authority.ts:138:5 - (ae-unresolved-link) The @link reference could not be resolved: The reference is ambiguous because "AuthorityType" has more than one declaration; you need to add a TSDoc member reference selector diff --git a/lib/msal-common/src/account/ClientCredentials.ts b/lib/msal-common/src/account/ClientCredentials.ts index d5f79b9ba3..6f23ebbbf9 100644 --- a/lib/msal-common/src/account/ClientCredentials.ts +++ b/lib/msal-common/src/account/ClientCredentials.ts @@ -13,11 +13,16 @@ export type ClientAssertionCallback = ( config: ClientAssertionConfig ) => Promise; +/** + * @deprecated Provide a callback instead of a string + */ +type assertionString = string; +type assertionCallback = ClientAssertionCallback; /** * Client Assertion credential for Confidential Clients */ export type ClientAssertion = { - assertion: string | ClientAssertionCallback; + assertion: assertionString | assertionCallback; assertionType: string; }; From 9abe98adef8eee62ef2ec292eb03116b43d30a78 Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Thu, 22 Aug 2024 14:03:32 -0400 Subject: [PATCH 09/15] Undid clientAssertion string deprecation --- lib/msal-common/apiReview/msal-common.api.md | 6 ++---- lib/msal-common/src/account/ClientCredentials.ts | 7 +------ lib/msal-node/apiReview/msal-node.api.md | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/msal-common/apiReview/msal-common.api.md b/lib/msal-common/apiReview/msal-common.api.md index fbd399f827..426a65940a 100644 --- a/lib/msal-common/apiReview/msal-common.api.md +++ b/lib/msal-common/apiReview/msal-common.api.md @@ -1057,7 +1057,7 @@ const CLIENT_SECRET = "client_secret"; // // @public export type ClientAssertion = { - assertion: assertionString | assertionCallback; + assertion: string | ClientAssertionCallback; assertionType: string; }; @@ -4165,7 +4165,7 @@ export type ValidCredentialType = IdTokenEntity | AccessTokenEntity | RefreshTok // Warning: (ae-missing-release-tag) "version" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const version = "14.14.0"; +export const version = "14.14.1"; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -4226,8 +4226,6 @@ const X_MS_LIB_CAPABILITY = "x-ms-lib-capability"; // Warnings were encountered during analysis: // -// src/account/ClientCredentials.ts:25:5 - (ae-forgotten-export) The symbol "assertionString" needs to be exported by the entry point index.d.ts -// src/account/ClientCredentials.ts:25:5 - (ae-forgotten-export) The symbol "assertionCallback" needs to be exported by the entry point index.d.ts // src/authority/Authority.ts:135:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // src/authority/Authority.ts:136:8 - (tsdoc-undefined-tag) The TSDoc tag "@private" is not defined in this configuration // src/authority/Authority.ts:138:5 - (ae-unresolved-link) The @link reference could not be resolved: The reference is ambiguous because "AuthorityType" has more than one declaration; you need to add a TSDoc member reference selector diff --git a/lib/msal-common/src/account/ClientCredentials.ts b/lib/msal-common/src/account/ClientCredentials.ts index 6f23ebbbf9..d5f79b9ba3 100644 --- a/lib/msal-common/src/account/ClientCredentials.ts +++ b/lib/msal-common/src/account/ClientCredentials.ts @@ -13,16 +13,11 @@ export type ClientAssertionCallback = ( config: ClientAssertionConfig ) => Promise; -/** - * @deprecated Provide a callback instead of a string - */ -type assertionString = string; -type assertionCallback = ClientAssertionCallback; /** * Client Assertion credential for Confidential Clients */ export type ClientAssertion = { - assertion: assertionString | assertionCallback; + assertion: string | ClientAssertionCallback; assertionType: string; }; diff --git a/lib/msal-node/apiReview/msal-node.api.md b/lib/msal-node/apiReview/msal-node.api.md index 46b62a0a22..c8b024bd61 100644 --- a/lib/msal-node/apiReview/msal-node.api.md +++ b/lib/msal-node/apiReview/msal-node.api.md @@ -733,7 +733,7 @@ export { ValidCacheType } // Warning: (ae-missing-release-tag) "version" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const version = "2.12.0"; +export const version = "2.13.0"; // Warnings were encountered during analysis: // From 414a4569aa321a44c682c4dd90521bebf986b4c4 Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Thu, 22 Aug 2024 14:13:55 -0400 Subject: [PATCH 10/15] Added JSDocs to RequestValidator.ts --- lib/msal-common/apiReview/msal-common.api.md | 8 -------- lib/msal-common/src/request/RequestValidator.ts | 15 ++++++++++----- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/msal-common/apiReview/msal-common.api.md b/lib/msal-common/apiReview/msal-common.api.md index 426a65940a..9c19bb0d9a 100644 --- a/lib/msal-common/apiReview/msal-common.api.md +++ b/lib/msal-common/apiReview/msal-common.api.md @@ -3465,20 +3465,12 @@ export type RequestThumbprint = { shrOptions?: ShrOptions; }; -// Warning: (ae-missing-release-tag) "RequestValidator" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class RequestValidator { - // (undocumented) static validateClaims(claims: string): void; - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static validateCodeChallengeMethod(codeChallengeMethod: string): void; - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static validateCodeChallengeParams(codeChallenge: string, codeChallengeMethod: string): void; - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static validatePrompt(prompt: string): void; - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static validateRedirectUri(redirectUri: string): void; } diff --git a/lib/msal-common/src/request/RequestValidator.ts b/lib/msal-common/src/request/RequestValidator.ts index 011eece4bd..f8dfe62485 100644 --- a/lib/msal-common/src/request/RequestValidator.ts +++ b/lib/msal-common/src/request/RequestValidator.ts @@ -10,12 +10,13 @@ import { import { PromptValue, CodeChallengeMethodValues } from "../utils/Constants"; /** + * @public * Validates server consumable params from the "request" objects */ export class RequestValidator { /** * Utility to check if the `redirectUri` in the request is a non-null value - * @param redirectUri + * @param redirectUri - a string redirect URI */ static validateRedirectUri(redirectUri: string): void { if (!redirectUri) { @@ -27,7 +28,7 @@ export class RequestValidator { /** * Utility to validate prompt sent by the user in the request - * @param prompt + * @param prompt - a string prompt sent by the user in the request */ static validatePrompt(prompt: string): void { const promptValues = []; @@ -43,6 +44,10 @@ export class RequestValidator { } } + /** + * Utility to check if the claims provided by the user can be parsed + * @param claims - string claims provided by the user, in the request + */ static validateClaims(claims: string): void { try { JSON.parse(claims); @@ -55,8 +60,8 @@ export class RequestValidator { /** * Utility to validate code_challenge and code_challenge_method - * @param codeChallenge - * @param codeChallengeMethod + * @param codeChallenge - a string code challenge of the code verifier + * @param codeChallengeMethod - a code challenge method that PKCE supports */ static validateCodeChallengeParams( codeChallenge: string, @@ -73,7 +78,7 @@ export class RequestValidator { /** * Utility to validate code_challenge_method - * @param codeChallengeMethod + * @param codeChallengeMethod- a code challenge method that PKCE supports */ static validateCodeChallengeMethod(codeChallengeMethod: string): void { if ( From 51938d7b759deb07c2b7bf5106c8b4a61a7db28e Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Thu, 29 Aug 2024 17:14:36 -0400 Subject: [PATCH 11/15] Implemented Feedback --- lib/msal-common/apiReview/msal-common.api.md | 9 --------- lib/msal-common/src/index.ts | 1 - lib/msal-common/src/request/RequestValidator.ts | 15 +++++---------- .../BaseManagedIdentitySource.ts | 2 -- 4 files changed, 5 insertions(+), 22 deletions(-) diff --git a/lib/msal-common/apiReview/msal-common.api.md b/lib/msal-common/apiReview/msal-common.api.md index 9c19bb0d9a..8def58a521 100644 --- a/lib/msal-common/apiReview/msal-common.api.md +++ b/lib/msal-common/apiReview/msal-common.api.md @@ -3465,15 +3465,6 @@ export type RequestThumbprint = { shrOptions?: ShrOptions; }; -// @public -export class RequestValidator { - static validateClaims(claims: string): void; - static validateCodeChallengeMethod(codeChallengeMethod: string): void; - static validateCodeChallengeParams(codeChallenge: string, codeChallengeMethod: string): void; - static validatePrompt(prompt: string): void; - static validateRedirectUri(redirectUri: string): void; -} - // Warning: (ae-missing-release-tag) "RESPONSE_MODE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) diff --git a/lib/msal-common/src/index.ts b/lib/msal-common/src/index.ts index d77fda83da..526fbd6d93 100644 --- a/lib/msal-common/src/index.ts +++ b/lib/msal-common/src/index.ts @@ -140,7 +140,6 @@ export { NativeRequest } from "./request/NativeRequest"; export { NativeSignOutRequest } from "./request/NativeSignOutRequest"; export { RequestParameterBuilder } from "./request/RequestParameterBuilder"; export { StoreInCache } from "./request/StoreInCache"; -export { RequestValidator } from "./request/RequestValidator"; export { ClientAssertion, ClientAssertionConfig, diff --git a/lib/msal-common/src/request/RequestValidator.ts b/lib/msal-common/src/request/RequestValidator.ts index f8dfe62485..011eece4bd 100644 --- a/lib/msal-common/src/request/RequestValidator.ts +++ b/lib/msal-common/src/request/RequestValidator.ts @@ -10,13 +10,12 @@ import { import { PromptValue, CodeChallengeMethodValues } from "../utils/Constants"; /** - * @public * Validates server consumable params from the "request" objects */ export class RequestValidator { /** * Utility to check if the `redirectUri` in the request is a non-null value - * @param redirectUri - a string redirect URI + * @param redirectUri */ static validateRedirectUri(redirectUri: string): void { if (!redirectUri) { @@ -28,7 +27,7 @@ export class RequestValidator { /** * Utility to validate prompt sent by the user in the request - * @param prompt - a string prompt sent by the user in the request + * @param prompt */ static validatePrompt(prompt: string): void { const promptValues = []; @@ -44,10 +43,6 @@ export class RequestValidator { } } - /** - * Utility to check if the claims provided by the user can be parsed - * @param claims - string claims provided by the user, in the request - */ static validateClaims(claims: string): void { try { JSON.parse(claims); @@ -60,8 +55,8 @@ export class RequestValidator { /** * Utility to validate code_challenge and code_challenge_method - * @param codeChallenge - a string code challenge of the code verifier - * @param codeChallengeMethod - a code challenge method that PKCE supports + * @param codeChallenge + * @param codeChallengeMethod */ static validateCodeChallengeParams( codeChallenge: string, @@ -78,7 +73,7 @@ export class RequestValidator { /** * Utility to validate code_challenge_method - * @param codeChallengeMethod- a code challenge method that PKCE supports + * @param codeChallengeMethod */ static validateCodeChallengeMethod(codeChallengeMethod: string): void { if ( diff --git a/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts b/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts index 14566eed4c..4ab8348f1c 100644 --- a/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +++ b/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts @@ -19,7 +19,6 @@ import { createClientAuthError, AuthenticationResult, UrlString, - RequestValidator, AADServerParamKeys, } from "@azure/msal-common"; import { ManagedIdentityId } from "../../config/ManagedIdentityId"; @@ -141,7 +140,6 @@ export abstract class BaseManagedIdentitySource { const networkRequestOptions: NetworkRequestOptions = { headers }; if (managedIdentityRequest.claims) { - RequestValidator.validateClaims(managedIdentityRequest.claims); networkRequest.bodyParameters[AADServerParamKeys.CLAIMS] = encodeURIComponent(managedIdentityRequest.claims); } From fc82433d08b869a714471fbbeec0a793c2e2c1d9 Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Thu, 29 Aug 2024 17:20:01 -0400 Subject: [PATCH 12/15] undid changes to api files --- lib/msal-common/apiReview/msal-common.api.md | 970 +++++-------------- lib/msal-node/apiReview/msal-node.api.md | 631 ++++-------- 2 files changed, 430 insertions(+), 1171 deletions(-) diff --git a/lib/msal-common/apiReview/msal-common.api.md b/lib/msal-common/apiReview/msal-common.api.md index 89ab6ff52f..818f0d4d51 100644 --- a/lib/msal-common/apiReview/msal-common.api.md +++ b/lib/msal-common/apiReview/msal-common.api.md @@ -3,6 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts + /// // Warning: (ae-missing-release-tag) "AADAuthorityConstants" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -16,8 +17,7 @@ export const AADAuthorityConstants: { }; // @public (undocumented) -export type AADAuthorityConstants = - (typeof AADAuthorityConstants)[keyof typeof AADAuthorityConstants]; +export type AADAuthorityConstants = (typeof AADAuthorityConstants)[keyof typeof AADAuthorityConstants]; declare namespace AADServerParamKeys { export { @@ -73,10 +73,10 @@ declare namespace AADServerParamKeys { SID, LOGIN_HINT, DOMAIN_HINT, - X_CLIENT_EXTRA_SKU, - }; + X_CLIENT_EXTRA_SKU + } } -export { AADServerParamKeys }; +export { AADServerParamKeys } // Warning: (ae-missing-release-tag) "ACCESS_TOKEN" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -120,11 +120,7 @@ export type AccountCache = Record; export class AccountEntity { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static accountInfoIsEqual( - accountA: AccountInfo | null, - accountB: AccountInfo | null, - compareClaims?: boolean - ): boolean; + static accountInfoIsEqual(accountA: AccountInfo | null, accountB: AccountInfo | null, compareClaims?: boolean): boolean; // (undocumented) authorityType: string; // (undocumented) @@ -132,28 +128,20 @@ export class AccountEntity { // (undocumented) cloudGraphHostName?: string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static createAccount( - accountDetails: { - homeAccountId: string; - idTokenClaims?: TokenClaims; - clientInfo?: string; - cloudGraphHostName?: string; - msGraphHost?: string; - environment?: string; - nativeAccountId?: string; - tenantProfiles?: Array; - }, - authority: Authority, - base64Decode?: (input: string) => string - ): AccountEntity; - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static createFromAccountInfo( - accountInfo: AccountInfo, - cloudGraphHostName?: string, - msGraphHost?: string - ): AccountEntity; + static createAccount(accountDetails: { + homeAccountId: string; + idTokenClaims?: TokenClaims; + clientInfo?: string; + cloudGraphHostName?: string; + msGraphHost?: string; + environment?: string; + nativeAccountId?: string; + tenantProfiles?: Array; + }, authority: Authority, base64Decode?: (input: string) => string): AccountEntity; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + static createFromAccountInfo(accountInfo: AccountInfo, cloudGraphHostName?: string, msGraphHost?: string): AccountEntity; // (undocumented) environment: string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -168,13 +156,7 @@ export class AccountEntity { generateAccountKey(): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static generateHomeAccountId( - serverClientInfo: string, - authType: AuthorityType, - logger: Logger, - cryptoObj: ICrypto, - idTokenClaims?: TokenClaims - ): string; + static generateHomeAccountId(serverClientInfo: string, authType: AuthorityType, logger: Logger, cryptoObj: ICrypto, idTokenClaims?: TokenClaims): string; getAccountInfo(): AccountInfo; // (undocumented) homeAccountId: string; @@ -208,10 +190,7 @@ export class AccountEntity { // Warning: (ae-missing-release-tag) "AccountFilter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export type AccountFilter = Omit< - Partial, - "idToken" | "idTokenClaims" -> & { +export type AccountFilter = Omit, "idToken" | "idTokenClaims"> & { realm?: string; loginHint?: string; sid?: string; @@ -230,13 +209,7 @@ export type AccountInfo = { name?: string; idToken?: string; idTokenClaims?: TokenClaims & { - [key: string]: - | string - | number - | string[] - | object - | undefined - | unknown; + [key: string]: string | number | string[] | object | undefined | unknown; }; nativeAccountId?: string; authorityType?: string; @@ -339,8 +312,7 @@ export const AuthenticationScheme: { }; // @public (undocumented) -export type AuthenticationScheme = - (typeof AuthenticationScheme)[keyof typeof AuthenticationScheme]; +export type AuthenticationScheme = (typeof AuthenticationScheme)[keyof typeof AuthenticationScheme]; // Warning: (ae-missing-release-tag) "AuthError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -356,9 +328,12 @@ export class AuthError extends Error { } declare namespace AuthErrorCodes { - export { unexpectedError, postRequestFailed }; + export { + unexpectedError, + postRequestFailed + } } -export { AuthErrorCodes }; +export { AuthErrorCodes } // Warning: (ae-missing-release-tag) "AuthErrorMessage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -389,26 +364,13 @@ export type AuthOptions = { // // @internal export class Authority { - constructor( - authority: string, - networkInterface: INetworkModule, - cacheManager: ICacheManager, - authorityOptions: AuthorityOptions, - logger: Logger, - correlationId: string, - performanceClient?: IPerformanceClient, - managedIdentity?: boolean - ); + constructor(authority: string, networkInterface: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, logger: Logger, correlationId: string, performanceClient?: IPerformanceClient, managedIdentity?: boolean); // (undocumented) get authorityType(): AuthorityType; get authorizationEndpoint(): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static buildRegionalAuthorityString( - host: string, - region: string, - queryString?: string - ): string; + static buildRegionalAuthorityString(host: string, region: string, queryString?: string): string; // Warning: (ae-forgotten-export) The symbol "ICacheManager" needs to be exported by the entry point index.d.ts // // (undocumented) @@ -421,9 +383,7 @@ export class Authority { protected correlationId: string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (ae-forgotten-export) The symbol "CloudDiscoveryMetadata" needs to be exported by the entry point index.d.ts - static createCloudDiscoveryMetadataFromHost( - host: string - ): CloudDiscoveryMetadata; + static createCloudDiscoveryMetadataFromHost(host: string): CloudDiscoveryMetadata; protected get defaultOpenIdConfigurationEndpoint(): string; // (undocumented) get deviceCodeEndpoint(): string; @@ -431,10 +391,7 @@ export class Authority { get endSessionEndpoint(): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static generateAuthority( - authorityString: string, - azureCloudOptions?: AzureCloudOptions - ): string; + static generateAuthority(authorityString: string, azureCloudOptions?: AzureCloudOptions): string; getPreferredCache(): string; get hostnameAndPort(): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -457,10 +414,7 @@ export class Authority { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (ae-forgotten-export) The symbol "OpenIdConfigResponse" needs to be exported by the entry point index.d.ts - static replaceWithRegionalInformation( - metadata: OpenIdConfigResponse, - azureRegion: string - ): OpenIdConfigResponse; + static replaceWithRegionalInformation(metadata: OpenIdConfigResponse, azureRegion: string): OpenIdConfigResponse; resolveEndpointsAsync(): Promise; get selfSignedJwtAudience(): string; get tenant(): string; @@ -470,9 +424,11 @@ export class Authority { } declare namespace AuthorityFactory { - export { createDiscoveredInstance }; + export { + createDiscoveredInstance + } } -export { AuthorityFactory }; +export { AuthorityFactory } // Warning: (ae-internal-missing-underscore) The name "AuthorityMetadataEntity" should be prefixed with an underscore because the declaration is marked as @internal // @@ -534,25 +490,16 @@ const authorityUriInsecure = "authority_uri_insecure"; // // @internal export class AuthorizationCodeClient extends BaseClient { - constructor( - configuration: ClientConfiguration, - performanceClient?: IPerformanceClient - ); + constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); // Warning: (tsdoc-code-span-missing-delimiter) The code span is missing its closing backtick // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - acquireToken( - request: CommonAuthorizationCodeRequest, - authCodePayload?: AuthorizationCodePayload - ): Promise; + acquireToken(request: CommonAuthorizationCodeRequest, authCodePayload?: AuthorizationCodePayload): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen getAuthCodeUrl(request: CommonAuthorizationUrlRequest): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen getLogoutUri(logoutRequest: CommonEndSessionRequest): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - handleFragmentResponse( - serverParams: ServerAuthorizationCodeResponse, - cachedState: string - ): AuthorizationCodePayload; + handleFragmentResponse(serverParams: ServerAuthorizationCodeResponse, cachedState: string): AuthorizationCodePayload; // (undocumented) protected includeRedirectUri: boolean; } @@ -560,8 +507,7 @@ export class AuthorizationCodeClient extends BaseClient { // Warning: (ae-missing-release-tag) "authorizationCodeMissingFromServerResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -const authorizationCodeMissingFromServerResponse = - "authorization_code_missing_from_server_response"; +const authorizationCodeMissingFromServerResponse = "authorization_code_missing_from_server_response"; // Warning: (ae-missing-release-tag) "AuthorizationCodePayload" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -583,9 +529,13 @@ export type AuthorizationCodePayload = { const authTimeNotFound = "auth_time_not_found"; declare namespace AuthToken { - export { extractTokenClaims, getJWSPayload, checkMaxAge }; + export { + extractTokenClaims, + getJWSPayload, + checkMaxAge + } } -export { AuthToken }; +export { AuthToken } // Warning: (ae-missing-release-tag) "AzureCloudInstance" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-missing-release-tag) "AzureCloudInstance" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -601,8 +551,7 @@ export const AzureCloudInstance: { }; // @public (undocumented) -export type AzureCloudInstance = - (typeof AzureCloudInstance)[keyof typeof AzureCloudInstance]; +export type AzureCloudInstance = (typeof AzureCloudInstance)[keyof typeof AzureCloudInstance]; // Warning: (ae-missing-release-tag) "AzureCloudOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -659,10 +608,7 @@ export type BaseAuthRequest = { // // @internal export abstract class BaseClient { - protected constructor( - configuration: ClientConfiguration, - performanceClient?: IPerformanceClient - ); + protected constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); // (undocumented) authority: Authority; // (undocumented) @@ -673,23 +619,14 @@ export abstract class BaseClient { protected config: CommonClientConfiguration; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen createTokenQueryParameters(request: BaseAuthRequest): string; - protected createTokenRequestHeaders( - ccsCred?: CcsCredential - ): Record; + protected createTokenRequestHeaders(ccsCred?: CcsCredential): Record; // (undocumented) protected cryptoUtils: ICrypto; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - protected executePostToTokenEndpoint( - tokenEndpoint: string, - queryString: string, - headers: Record, - thumbprint: RequestThumbprint, - correlationId: string, - queuedEvent?: string - ): Promise>; + protected executePostToTokenEndpoint(tokenEndpoint: string, queryString: string, headers: Record, thumbprint: RequestThumbprint, correlationId: string, queuedEvent?: string): Promise>; // (undocumented) logger: Logger; // (undocumented) @@ -701,10 +638,7 @@ export abstract class BaseClient { // (undocumented) protected serverTelemetryManager: ServerTelemetryManager | null; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - updateAuthority( - cloudInstanceHostname: string, - correlationId: string - ): Promise; + updateAuthority(cloudInstanceHostname: string, correlationId: string): Promise; } // Warning: (ae-missing-release-tag) "bindingKeyNotRemoved" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -718,54 +652,30 @@ const bindingKeyNotRemoved = "binding_key_not_removed"; // Warning: (ae-missing-release-tag) "buildAccountToCache" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export function buildAccountToCache( - cacheStorage: CacheManager, - authority: Authority, - homeAccountId: string, - base64Decode: (input: string) => string, - idTokenClaims?: TokenClaims, - clientInfo?: string, - environment?: string, - claimsTenantId?: string | null, - authCodePayload?: AuthorizationCodePayload, - nativeAccountId?: string, - logger?: Logger -): AccountEntity; +export function buildAccountToCache(cacheStorage: CacheManager, authority: Authority, homeAccountId: string, base64Decode: (input: string) => string, idTokenClaims?: TokenClaims, clientInfo?: string, environment?: string, claimsTenantId?: string | null, authCodePayload?: AuthorizationCodePayload, nativeAccountId?: string, logger?: Logger): AccountEntity; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (ae-missing-release-tag) "buildClientInfo" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export function buildClientInfo( - rawClientInfo: string, - base64Decode: (input: string) => string -): ClientInfo; +export function buildClientInfo(rawClientInfo: string, base64Decode: (input: string) => string): ClientInfo; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (ae-missing-release-tag) "buildClientInfoFromHomeAccountId" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export function buildClientInfoFromHomeAccountId( - homeAccountId: string -): ClientInfo; +export function buildClientInfoFromHomeAccountId(homeAccountId: string): ClientInfo; // Warning: (ae-missing-release-tag) "buildStaticAuthorityOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export function buildStaticAuthorityOptions( - authOptions: Partial -): StaticAuthorityOptions; +export function buildStaticAuthorityOptions(authOptions: Partial): StaticAuthorityOptions; // Warning: (ae-missing-release-tag) "buildTenantProfile" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export function buildTenantProfile( - homeAccountId: string, - localAccountId: string, - tenantId: string, - idTokenClaims?: TokenClaims -): TenantProfile; +export function buildTenantProfile(homeAccountId: string, localAccountId: string, tenantId: string, idTokenClaims?: TokenClaims): TenantProfile; // Warning: (ae-missing-release-tag) "CacheAccountType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-missing-release-tag) "CacheAccountType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -779,8 +689,7 @@ export const CacheAccountType: { }; // @public (undocumented) -export type CacheAccountType = - (typeof CacheAccountType)[keyof typeof CacheAccountType]; +export type CacheAccountType = (typeof CacheAccountType)[keyof typeof CacheAccountType]; // Warning: (ae-missing-release-tag) "CacheError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -792,9 +701,12 @@ export class CacheError extends Error { } declare namespace CacheErrorCodes { - export { cacheQuotaExceededErrorCode, cacheUnknownErrorCode }; + export { + cacheQuotaExceededErrorCode, + cacheUnknownErrorCode + } } -export { CacheErrorCodes }; +export { CacheErrorCodes } declare namespace CacheHelpers { export { @@ -814,38 +726,26 @@ declare namespace CacheHelpers { generateAuthorityMetadataExpiresAt, updateAuthorityEndpointMetadata, updateCloudDiscoveryMetadata, - isAuthorityMetadataExpired, - }; + isAuthorityMetadataExpired + } } -export { CacheHelpers }; +export { CacheHelpers } // Warning: (ae-internal-missing-underscore) The name "CacheManager" should be prefixed with an underscore because the declaration is marked as @internal // // @internal export abstract class CacheManager implements ICacheManager { - constructor( - clientId: string, - cryptoImpl: ICrypto, - logger: Logger, - staticAuthorityOptions?: StaticAuthorityOptions - ); + constructor(clientId: string, cryptoImpl: ICrypto, logger: Logger, staticAuthorityOptions?: StaticAuthorityOptions); // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - accessTokenKeyMatchesFilter( - inputKey: string, - filter: CredentialFilter, - keyMustContainAllScopes: boolean - ): boolean; + accessTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter, keyMustContainAllScopes: boolean): boolean; abstract clear(): Promise; // (undocumented) protected clientId: string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - credentialMatchesFilter( - entity: ValidCredentialType, - filter: CredentialFilter - ): boolean; + credentialMatchesFilter(entity: ValidCredentialType, filter: CredentialFilter): boolean; // (undocumented) protected cryptoImpl: ICrypto; generateAuthorityMetadataCacheKey(authority: string): string; @@ -859,25 +759,13 @@ export abstract class CacheManager implements ICacheManager { // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' - getAccessToken( - account: AccountInfo, - request: BaseAuthRequest, - tokenKeys?: TokenKeys, - targetRealm?: string, - performanceClient?: IPerformanceClient, - correlationId?: string - ): AccessTokenEntity | null; - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - abstract getAccessTokenCredential( - accessTokenKey: string - ): AccessTokenEntity | null; + getAccessToken(account: AccountInfo, request: BaseAuthRequest, tokenKeys?: TokenKeys, targetRealm?: string, performanceClient?: IPerformanceClient, correlationId?: string): AccessTokenEntity | null; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + abstract getAccessTokenCredential(accessTokenKey: string): AccessTokenEntity | null; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen getAccessTokensByFilter(filter: CredentialFilter): AccessTokenEntity[]; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - abstract getAccount( - accountKey: string, - logger?: Logger - ): AccountEntity | null; + abstract getAccount(accountKey: string, logger?: Logger): AccountEntity | null; getAccountInfoFilteredBy(accountFilter: AccountFilter): AccountInfo | null; abstract getAccountKeys(): string[]; getAccountsFilteredBy(accountFilter: AccountFilter): AccountEntity[]; @@ -906,20 +794,11 @@ export abstract class CacheManager implements ICacheManager { // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' - getIdToken( - account: AccountInfo, - tokenKeys?: TokenKeys, - targetRealm?: string, - performanceClient?: IPerformanceClient, - correlationId?: string - ): IdTokenEntity | null; + getIdToken(account: AccountInfo, tokenKeys?: TokenKeys, targetRealm?: string, performanceClient?: IPerformanceClient, correlationId?: string): IdTokenEntity | null; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen abstract getIdTokenCredential(idTokenKey: string): IdTokenEntity | null; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - getIdTokensByFilter( - filter: CredentialFilter, - tokenKeys?: TokenKeys - ): Map; + getIdTokensByFilter(filter: CredentialFilter, tokenKeys?: TokenKeys): Map; abstract getKeys(): string[]; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' @@ -931,40 +810,21 @@ export abstract class CacheManager implements ICacheManager { // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' - getRefreshToken( - account: AccountInfo, - familyRT: boolean, - tokenKeys?: TokenKeys, - performanceClient?: IPerformanceClient, - correlationId?: string - ): RefreshTokenEntity | null; - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - abstract getRefreshTokenCredential( - refreshTokenKey: string - ): RefreshTokenEntity | null; - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - abstract getServerTelemetry( - serverTelemetryKey: string - ): ServerTelemetryEntity | null; - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - abstract getThrottlingCache( - throttlingCacheKey: string - ): ThrottlingEntity | null; + getRefreshToken(account: AccountInfo, familyRT: boolean, tokenKeys?: TokenKeys, performanceClient?: IPerformanceClient, correlationId?: string): RefreshTokenEntity | null; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + abstract getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + abstract getServerTelemetry(serverTelemetryKey: string): ServerTelemetryEntity | null; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + abstract getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null; abstract getTokenKeys(): TokenKeys; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - idTokenKeyMatchesFilter( - inputKey: string, - filter: CredentialFilter - ): boolean; + idTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - isAccountKey( - key: string, - homeAccountId?: string, - tenantId?: string - ): boolean; + isAccountKey(key: string, homeAccountId?: string, tenantId?: string): boolean; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen isAppMetadataFOCI(environment: string): boolean; @@ -977,10 +837,7 @@ export abstract class CacheManager implements ICacheManager { readAppMetadataFromCache(environment: string): AppMetadataEntity | null; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - refreshTokenKeyMatchesFilter( - inputKey: string, - filter: CredentialFilter - ): boolean; + refreshTokenKeyMatchesFilter(inputKey: string, filter: CredentialFilter): boolean; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen removeAccessToken(key: string): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -1002,11 +859,7 @@ export abstract class CacheManager implements ICacheManager { // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' - saveCacheRecord( - cacheRecord: CacheRecord, - storeInCache?: StoreInCache, - correlationId?: string - ): Promise; + saveCacheRecord(cacheRecord: CacheRecord, storeInCache?: StoreInCache, correlationId?: string): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen abstract setAccessTokenCredential(accessToken: AccessTokenEntity): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -1015,41 +868,25 @@ export abstract class CacheManager implements ICacheManager { abstract setAppMetadata(appMetadata: AppMetadataEntity): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - abstract setAuthorityMetadata( - key: string, - value: AuthorityMetadataEntity - ): void; + abstract setAuthorityMetadata(key: string, value: AuthorityMetadataEntity): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen abstract setIdTokenCredential(idToken: IdTokenEntity): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen abstract setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - abstract setServerTelemetry( - serverTelemetryKey: string, - serverTelemetry: ServerTelemetryEntity - ): void; + abstract setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - abstract setThrottlingCache( - throttlingCacheKey: string, - throttlingCache: ThrottlingEntity - ): void; + abstract setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static toObject(obj: T, json: object): T; - abstract updateCredentialCacheKey( - currentCacheKey: string, - credential: ValidCredentialType - ): string; + abstract updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - protected updateOutdatedCachedAccount( - accountKey: string, - accountEntity: AccountEntity | null, - logger?: Logger - ): AccountEntity | null; + protected updateOutdatedCachedAccount(accountKey: string, accountEntity: AccountEntity | null, logger?: Logger): AccountEntity | null; } // Warning: (ae-missing-release-tag) "CacheOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -1157,8 +994,7 @@ export const CcsCredentialType: { }; // @public (undocumented) -export type CcsCredentialType = - (typeof CcsCredentialType)[keyof typeof CcsCredentialType]; +export type CcsCredentialType = (typeof CcsCredentialType)[keyof typeof CcsCredentialType]; // Warning: (ae-missing-release-tag) "checkMaxAge" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -1180,8 +1016,7 @@ export const ClaimsRequestKeys: { }; // @public (undocumented) -export type ClaimsRequestKeys = - (typeof ClaimsRequestKeys)[keyof typeof ClaimsRequestKeys]; +export type ClaimsRequestKeys = (typeof ClaimsRequestKeys)[keyof typeof ClaimsRequestKeys]; // Warning: (ae-missing-release-tag) "claimsRequestParsingError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -1229,9 +1064,7 @@ export type ClientAssertion = { // Warning: (ae-missing-release-tag) "ClientAssertionCallback" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export type ClientAssertionCallback = ( - config: ClientAssertionConfig -) => Promise; +export type ClientAssertionCallback = (config: ClientAssertionConfig) => Promise; // Warning: (ae-missing-release-tag) "ClientAssertionConfig" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -1239,13 +1072,14 @@ export type ClientAssertionCallback = ( export type ClientAssertionConfig = { clientId: string; tokenEndpoint?: string; - claims?: string; }; declare namespace ClientAssertionUtils { - export { getClientAssertion }; + export { + getClientAssertion + } } -export { ClientAssertionUtils }; +export { ClientAssertionUtils } // Warning: (ae-missing-release-tag) "ClientAuthError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -1299,10 +1133,10 @@ declare namespace ClientAuthErrorCodes { userCanceled, missingTenantIdError, methodNotImplemented, - nestedAppAuthBridgeDisabled, - }; + nestedAppAuthBridgeDisabled + } } -export { ClientAuthErrorCodes }; +export { ClientAuthErrorCodes } // Warning: (ae-missing-release-tag) "ClientAuthErrorMessage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -1531,10 +1365,10 @@ declare namespace ClientConfigurationErrorCodes { invalidAuthenticationHeader, cannotSetOIDCOptions, cannotAllowNativeBroker, - authorityMismatch, - }; + authorityMismatch + } } -export { ClientConfigurationErrorCodes }; +export { ClientConfigurationErrorCodes } // Warning: (ae-missing-release-tag) "ClientConfigurationErrorMessage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -1721,10 +1555,7 @@ export type CommonClientCredentialRequest = BaseAuthRequest & { // Warning: (ae-missing-release-tag) "CommonDeviceCodeRequest" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export type CommonDeviceCodeRequest = Omit< - BaseAuthRequest, - "tokenQueryParameters" -> & { +export type CommonDeviceCodeRequest = Omit & { deviceCodeCallback: (response: DeviceCodeResponse) => void; cancel?: boolean; timeout?: number; @@ -1845,61 +1676,29 @@ export const Constants: { // Warning: (ae-missing-release-tag) "createAccessTokenEntity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -function createAccessTokenEntity( - homeAccountId: string, - environment: string, - accessToken: string, - clientId: string, - tenantId: string, - scopes: string, - expiresOn: number, - extExpiresOn: number, - base64Decode: (input: string) => string, - refreshOn?: number, - tokenType?: AuthenticationScheme, - userAssertionHash?: string, - keyId?: string, - requestedClaims?: string, - requestedClaimsHash?: string -): AccessTokenEntity; +function createAccessTokenEntity(homeAccountId: string, environment: string, accessToken: string, clientId: string, tenantId: string, scopes: string, expiresOn: number, extExpiresOn: number, base64Decode: (input: string) => string, refreshOn?: number, tokenType?: AuthenticationScheme, userAssertionHash?: string, keyId?: string, requestedClaims?: string, requestedClaimsHash?: string): AccessTokenEntity; // Warning: (ae-missing-release-tag) "createAuthError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export function createAuthError( - code: string, - additionalMessage?: string -): AuthError; +export function createAuthError(code: string, additionalMessage?: string): AuthError; // Warning: (ae-missing-release-tag) "createClientAuthError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export function createClientAuthError( - errorCode: string, - additionalMessage?: string -): ClientAuthError; +export function createClientAuthError(errorCode: string, additionalMessage?: string): ClientAuthError; // Warning: (ae-missing-release-tag) "createClientConfigurationError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export function createClientConfigurationError( - errorCode: string -): ClientConfigurationError; +export function createClientConfigurationError(errorCode: string): ClientConfigurationError; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // // @internal -function createDiscoveredInstance( - authorityUri: string, - networkClient: INetworkModule, - cacheManager: ICacheManager, - authorityOptions: AuthorityOptions, - logger: Logger, - correlationId: string, - performanceClient?: IPerformanceClient -): Promise; +function createDiscoveredInstance(authorityUri: string, networkClient: INetworkModule, cacheManager: ICacheManager, authorityOptions: AuthorityOptions, logger: Logger, correlationId: string, performanceClient?: IPerformanceClient): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -1908,20 +1707,12 @@ function createDiscoveredInstance( // Warning: (ae-missing-release-tag) "createIdTokenEntity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -function createIdTokenEntity( - homeAccountId: string, - environment: string, - idToken: string, - clientId: string, - tenantId: string -): IdTokenEntity; +function createIdTokenEntity(homeAccountId: string, environment: string, idToken: string, clientId: string, tenantId: string): IdTokenEntity; // Warning: (ae-missing-release-tag) "createInteractionRequiredAuthError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export function createInteractionRequiredAuthError( - errorCode: string -): InteractionRequiredAuthError; +export function createInteractionRequiredAuthError(errorCode: string): InteractionRequiredAuthError; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -1930,15 +1721,7 @@ export function createInteractionRequiredAuthError( // Warning: (ae-missing-release-tag) "createRefreshTokenEntity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -function createRefreshTokenEntity( - homeAccountId: string, - environment: string, - refreshToken: string, - clientId: string, - familyId?: string, - userAssertionHash?: string, - expiresOn?: number -): RefreshTokenEntity; +function createRefreshTokenEntity(homeAccountId: string, environment: string, refreshToken: string, clientId: string, familyId?: string, userAssertionHash?: string, expiresOn?: number): RefreshTokenEntity; // Warning: (ae-missing-release-tag) "CredentialEntity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -1999,8 +1782,7 @@ export const CredentialType: { }; // @public (undocumented) -export type CredentialType = - (typeof CredentialType)[keyof typeof CredentialType]; +export type CredentialType = (typeof CredentialType)[keyof typeof CredentialType]; // Warning: (ae-missing-release-tag) "DEFAULT_CRYPTO_IMPLEMENTATION" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -2163,17 +1945,7 @@ const EXPIRES_IN = "expires_in"; // Warning: (ae-missing-release-tag) "ExternalTokenResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export type ExternalTokenResponse = Pick< - ServerAuthorizationTokenResponse, - | "token_type" - | "scope" - | "expires_in" - | "ext_expires_in" - | "id_token" - | "refresh_token" - | "refresh_token_expires_in" - | "foci" -> & { +export type ExternalTokenResponse = Pick & { access_token?: string; client_info?: string; }; @@ -2182,10 +1954,7 @@ export type ExternalTokenResponse = Pick< // Warning: (ae-missing-release-tag) "extractTokenClaims" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -function extractTokenClaims( - encodedToken: string, - base64Decode: (input: string) => string -): TokenClaims; +function extractTokenClaims(encodedToken: string, base64Decode: (input: string) => string): TokenClaims; // Warning: (ae-missing-release-tag) "FOCI" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -2202,10 +1971,7 @@ export function formatAuthorityUri(authorityUri: string): string; // Warning: (ae-missing-release-tag) "generateAppMetadataKey" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -function generateAppMetadataKey({ - environment, - clientId, -}: AppMetadataEntity): string; +function generateAppMetadataKey({ environment, clientId, }: AppMetadataEntity): string; // Warning: (ae-missing-release-tag) "generateAuthorityMetadataExpiresAt" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -2229,19 +1995,12 @@ function generateCredentialKey(credentialEntity: CredentialEntity): string; // Warning: (ae-missing-release-tag) "getClientAssertion" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export function getClientAssertion( - clientAssertion: string | ClientAssertionCallback, - clientId: string, - tokenEndpoint?: string, - claims?: string -): Promise; +export function getClientAssertion(clientAssertion: string | ClientAssertionCallback, clientId: string, tokenEndpoint?: string): Promise; // Warning: (ae-missing-release-tag) "getDeserializedResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -function getDeserializedResponse( - responseString: string -): ServerAuthorizationCodeResponse | null; +function getDeserializedResponse(responseString: string): ServerAuthorizationCodeResponse | null; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (ae-missing-release-tag) "getJWSPayload" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -2253,9 +2012,7 @@ function getJWSPayload(authToken: string): string; // Warning: (ae-missing-release-tag) "getTenantIdFromIdTokenClaims" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export function getTenantIdFromIdTokenClaims( - idTokenClaims?: TokenClaims -): string | null; +export function getTenantIdFromIdTokenClaims(idTokenClaims?: TokenClaims): string | null; // Warning: (ae-missing-release-tag) "GRANT_TYPE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -2334,9 +2091,7 @@ export type HttpStatus = (typeof HttpStatus)[keyof typeof HttpStatus]; // @public export interface IAppTokenProvider { // (undocumented) - ( - appTokenProviderParameters: AppTokenProviderParameters - ): Promise; + (appTokenProviderParameters: AppTokenProviderParameters): Promise; } // Warning: (ae-missing-release-tag) "ICachePlugin" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -2363,20 +2118,13 @@ export interface ICrypto { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen encodeKid(inputKid: string): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - getPublicKeyThumbprint( - request: SignedHttpRequestParameters - ): Promise; + getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen hashString(plainText: string): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen removeTokenBindingKey(kid: string): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - signJwt( - payload: SignedHttpRequest, - kid: string, - shrOptions?: ShrOptions, - correlationId?: string - ): Promise; + signJwt(payload: SignedHttpRequest, kid: string, shrOptions?: ShrOptions, correlationId?: string): Promise; } // Warning: (ae-missing-release-tag) "ID_TOKEN" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -2424,22 +2172,13 @@ export interface ILoggerCallback { // @public (undocumented) export interface INativeBrokerPlugin { // (undocumented) - acquireTokenInteractive( - request: NativeRequest, - windowHandle?: Buffer - ): Promise; + acquireTokenInteractive(request: NativeRequest, windowHandle?: Buffer): Promise; // (undocumented) acquireTokenSilent(request: NativeRequest): Promise; // (undocumented) - getAccountById( - accountId: string, - correlationId: string - ): Promise; + getAccountById(accountId: string, correlationId: string): Promise; // (undocumented) - getAllAccounts( - clientId: string, - correlationId: string - ): Promise; + getAllAccounts(clientId: string, correlationId: string): Promise; // (undocumented) isBrokerAvailable: boolean; // (undocumented) @@ -2456,31 +2195,25 @@ export interface INetworkModule { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - sendGetRequestAsync( - url: string, - options?: NetworkRequestOptions, - timeout?: number - ): Promise>; + sendGetRequestAsync(url: string, options?: NetworkRequestOptions, timeout?: number): Promise>; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - sendPostRequestAsync( - url: string, - options?: NetworkRequestOptions - ): Promise>; + sendPostRequestAsync(url: string, options?: NetworkRequestOptions): Promise>; } // Warning: (ae-missing-release-tag) "InProgressPerformanceEvent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export type InProgressPerformanceEvent = { - end: ( - event?: Partial, - error?: unknown - ) => PerformanceEvent | null; + end: (event?: Partial, error?: unknown) => PerformanceEvent | null; discard: () => void; - add: (fields: { [key: string]: {} | undefined }) => void; - increment: (fields: { [key: string]: number | undefined }) => void; + add: (fields: { + [key: string]: {} | undefined; + }) => void; + increment: (fields: { + [key: string]: number | undefined; + }) => void; event: PerformanceEvent; measurement: IPerformanceMeasurement; }; @@ -2494,16 +2227,7 @@ const interactionRequired = "interaction_required"; // // @public export class InteractionRequiredAuthError extends AuthError { - constructor( - errorCode?: string, - errorMessage?: string, - subError?: string, - timestamp?: string, - traceId?: string, - correlationId?: string, - claims?: string, - errorNo?: string - ); + constructor(errorCode?: string, errorMessage?: string, subError?: string, timestamp?: string, traceId?: string, correlationId?: string, claims?: string, errorNo?: string); claims: string; readonly errorNo?: string; timestamp: string; @@ -2518,10 +2242,10 @@ declare namespace InteractionRequiredAuthErrorCodes { interactionRequired, consentRequired, loginRequired, - badToken, - }; + badToken + } } -export { InteractionRequiredAuthErrorCodes }; +export { InteractionRequiredAuthErrorCodes } // Warning: (ae-missing-release-tag) "InteractionRequiredAuthErrorMessage" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -2609,13 +2333,7 @@ const invalidState = "invalid_state"; // Warning: (ae-internal-missing-underscore) The name "invoke" should be prefixed with an underscore because the declaration is marked as @internal // // @internal -export const invoke: ( - callback: (...args: T) => U, - eventName: string, - logger: Logger, - telemetryClient?: IPerformanceClient, - correlationId?: string -) => (...args: T) => U; +export const invoke: (callback: (...args: T) => U, eventName: string, logger: Logger, telemetryClient?: IPerformanceClient, correlationId?: string) => (...args: T) => U; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -2625,34 +2343,20 @@ export const invoke: ( // Warning: (ae-internal-missing-underscore) The name "invokeAsync" should be prefixed with an underscore because the declaration is marked as @internal // // @internal -export const invokeAsync: ( - callback: (...args: T) => Promise, - eventName: string, - logger: Logger, - telemetryClient?: IPerformanceClient, - correlationId?: string -) => (...args: T) => Promise; +export const invokeAsync: (callback: (...args: T) => Promise, eventName: string, logger: Logger, telemetryClient?: IPerformanceClient, correlationId?: string) => (...args: T) => Promise; // Warning: (ae-missing-release-tag) "IPerformanceClient" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) export interface IPerformanceClient { // (undocumented) - addFields( - fields: { - [key: string]: {} | undefined; - }, - correlationId: string - ): void; + addFields(fields: { + [key: string]: {} | undefined; + }, correlationId: string): void; // (undocumented) addPerformanceCallback(callback: PerformanceCallbackFunction): string; // (undocumented) - addQueueMeasurement( - eventName: string, - correlationId?: string, - queueTime?: number, - manuallyCompleted?: boolean - ): void; + addQueueMeasurement(eventName: string, correlationId?: string, queueTime?: number, manuallyCompleted?: boolean): void; // (undocumented) calculateQueuedTime(preQueueTime: number, currentTime: number): number; // (undocumented) @@ -2664,26 +2368,17 @@ export interface IPerformanceClient { // (undocumented) generateId(): string; // (undocumented) - incrementFields( - fields: { - [key: string]: number | undefined; - }, - correlationId: string - ): void; + incrementFields(fields: { + [key: string]: number | undefined; + }, correlationId: string): void; // (undocumented) removePerformanceCallback(callbackId: string): boolean; // (undocumented) setPreQueueTime(eventName: string, correlationId?: string): void; // (undocumented) - startMeasurement( - measureName: string, - correlationId?: string - ): InProgressPerformanceEvent; + startMeasurement(measureName: string, correlationId?: string): InProgressPerformanceEvent; // @deprecated (undocumented) - startPerformanceMeasurement( - measureName: string, - correlationId: string - ): IPerformanceMeasurement; + startPerformanceMeasurement(measureName: string, correlationId: string): IPerformanceMeasurement; } // Warning: (ae-missing-release-tag) "IPerformanceMeasurement" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -2820,8 +2515,7 @@ export const JsonWebTokenTypes: { }; // @public (undocumented) -export type JsonWebTokenTypes = - (typeof JsonWebTokenTypes)[keyof typeof JsonWebTokenTypes]; +export type JsonWebTokenTypes = (typeof JsonWebTokenTypes)[keyof typeof JsonWebTokenTypes]; // Warning: (ae-missing-release-tag) "keyIdMissing" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -2840,23 +2534,11 @@ export type LibraryStateObject = { // // @public export class Logger { - constructor( - loggerOptions: LoggerOptions, - packageName?: string, - packageVersion?: string - ); - clone( - packageName: string, - packageVersion: string, - correlationId?: string - ): Logger; + constructor(loggerOptions: LoggerOptions, packageName?: string, packageVersion?: string); + clone(packageName: string, packageVersion: string, correlationId?: string): Logger; error(message: string, correlationId?: string): void; errorPii(message: string, correlationId?: string): void; - executeCallback( - level: LogLevel, - message: string, - containsPii: boolean - ): void; + executeCallback(level: LogLevel, message: string, containsPii: boolean): void; info(message: string, correlationId?: string): void; infoPii(message: string, correlationId?: string): void; isPiiLoggingEnabled(): boolean; @@ -2901,7 +2583,7 @@ export enum LogLevel { // (undocumented) Verbose = 3, // (undocumented) - Warning = 1, + Warning = 1 } // Warning: (ae-missing-release-tag) "LOGOUT_HINT" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -3018,11 +2700,7 @@ export class NetworkManager { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - sendPostRequest( - thumbprint: RequestThumbprint, - tokenEndpoint: string, - options: NetworkRequestOptions - ): Promise>; + sendPostRequest(thumbprint: RequestThumbprint, tokenEndpoint: string, options: NetworkRequestOptions): Promise>; } // Warning: (ae-missing-release-tag) "NetworkRequestOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -3130,8 +2808,7 @@ export const PasswordGrantConstants: { }; // @public (undocumented) -export type PasswordGrantConstants = - (typeof PasswordGrantConstants)[keyof typeof PasswordGrantConstants]; +export type PasswordGrantConstants = (typeof PasswordGrantConstants)[keyof typeof PasswordGrantConstants]; // Warning: (ae-missing-release-tag) "PerformanceCallbackFunction" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -3159,26 +2836,14 @@ export abstract class PerformanceClient implements IPerformanceClient { // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' - constructor( - clientId: string, - authority: string, - logger: Logger, - libraryName: string, - libraryVersion: string, - applicationTelemetry: ApplicationTelemetry, - intFields?: Set, - abbreviations?: Map - ); + constructor(clientId: string, authority: string, logger: Logger, libraryName: string, libraryVersion: string, applicationTelemetry: ApplicationTelemetry, intFields?: Set, abbreviations?: Map); // Warning: (tsdoc-undefined-tag) The TSDoc tag "@protected" is not defined in this configuration protected abbreviations: Map; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - addFields( - fields: { - [key: string]: {} | undefined; - }, - correlationId: string - ): void; + addFields(fields: { + [key: string]: {} | undefined; + }, correlationId: string): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag @@ -3191,12 +2856,7 @@ export abstract class PerformanceClient implements IPerformanceClient { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' - addQueueMeasurement( - eventName: string, - correlationId?: string, - queueTime?: number, - manuallyCompleted?: boolean - ): void; + addQueueMeasurement(eventName: string, correlationId?: string, queueTime?: number, manuallyCompleted?: boolean): void; // (undocumented) protected applicationTelemetry: ApplicationTelemetry; // (undocumented) @@ -3231,10 +2891,7 @@ export abstract class PerformanceClient implements IPerformanceClient { // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" - endMeasurement( - event: PerformanceEvent, - error?: unknown - ): PerformanceEvent | null; + endMeasurement(event: PerformanceEvent, error?: unknown): PerformanceEvent | null; // Warning: (tsdoc-undefined-tag) The TSDoc tag "@protected" is not defined in this configuration // Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag @@ -3260,12 +2917,9 @@ export abstract class PerformanceClient implements IPerformanceClient { // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' - incrementFields( - fields: { - [key: string]: number | undefined; - }, - correlationId: string - ): void; + incrementFields(fields: { + [key: string]: number | undefined; + }, correlationId: string): void; // (undocumented) protected intFields: Set; // (undocumented) @@ -3298,10 +2952,7 @@ export abstract class PerformanceClient implements IPerformanceClient { // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' - abstract setPreQueueTime( - eventName: PerformanceEvents, - correlationId?: string - ): void; + abstract setPreQueueTime(eventName: PerformanceEvents, correlationId?: string): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -3309,10 +2960,7 @@ export abstract class PerformanceClient implements IPerformanceClient { // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" - startMeasurement( - measureName: string, - correlationId?: string - ): InProgressPerformanceEvent; + startMeasurement(measureName: string, correlationId?: string): InProgressPerformanceEvent; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -3321,10 +2969,8 @@ export abstract class PerformanceClient implements IPerformanceClient { // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" // // @deprecated - startPerformanceMeasurement( - measureName: string, // eslint-disable-line @typescript-eslint/no-unused-vars - correlationId: string - ): IPerformanceMeasurement; + startPerformanceMeasurement(measureName: string, // eslint-disable-line @typescript-eslint/no-unused-vars + correlationId: string): IPerformanceMeasurement; } // Warning: (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration @@ -3499,8 +3145,7 @@ export const PerformanceEvents: { }; // @public (undocumented) -export type PerformanceEvents = - (typeof PerformanceEvents)[keyof typeof PerformanceEvents]; +export type PerformanceEvents = (typeof PerformanceEvents)[keyof typeof PerformanceEvents]; // Warning: (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag @@ -3517,8 +3162,7 @@ export const PerformanceEventStatus: { }; // @public (undocumented) -export type PerformanceEventStatus = - (typeof PerformanceEventStatus)[keyof typeof PerformanceEventStatus]; +export type PerformanceEventStatus = (typeof PerformanceEventStatus)[keyof typeof PerformanceEventStatus]; // Warning: (ae-missing-release-tag) "PersistentCacheKeys" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // Warning: (ae-missing-release-tag) "PersistentCacheKeys" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -3535,8 +3179,7 @@ export const PersistentCacheKeys: { }; // @public (undocumented) -export type PersistentCacheKeys = - (typeof PersistentCacheKeys)[keyof typeof PersistentCacheKeys]; +export type PersistentCacheKeys = (typeof PersistentCacheKeys)[keyof typeof PersistentCacheKeys]; // Warning: (ae-missing-release-tag) "PkceCodes" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -3558,10 +3201,7 @@ export class PopTokenGenerator { constructor(cryptoUtils: ICrypto, performanceClient?: IPerformanceClient); // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (ae-forgotten-export) The symbol "ReqCnfData" needs to be exported by the entry point index.d.ts - generateCnf( - request: SignedHttpRequestParameters, - logger: Logger - ): Promise; + generateCnf(request: SignedHttpRequestParameters, logger: Logger): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (ae-forgotten-export) The symbol "ReqCnf" needs to be exported by the entry point index.d.ts generateKid(request: SignedHttpRequestParameters): Promise; @@ -3569,19 +3209,10 @@ export class PopTokenGenerator { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - signPayload( - payload: string, - keyId: string, - request: SignedHttpRequestParameters, - claims?: object - ): Promise; + signPayload(payload: string, keyId: string, request: SignedHttpRequestParameters, claims?: object): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - signPopToken( - accessToken: string, - keyId: string, - request: SignedHttpRequestParameters - ): Promise; + signPopToken(accessToken: string, keyId: string, request: SignedHttpRequestParameters): Promise; } // Warning: (ae-missing-release-tag) "POST_LOGOUT_URI" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -3639,23 +3270,13 @@ export type ProtocolMode = (typeof ProtocolMode)[keyof typeof ProtocolMode]; export class ProtocolUtils { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static generateLibraryState( - cryptoObj: ICrypto, - meta?: Record - ): string; + static generateLibraryState(cryptoObj: ICrypto, meta?: Record): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static parseRequestState( - cryptoObj: ICrypto, - state: string - ): RequestStateObject; + static parseRequestState(cryptoObj: ICrypto, state: string): RequestStateObject; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static setRequestState( - cryptoObj: ICrypto, - userState?: string, - meta?: Record - ): string; + static setRequestState(cryptoObj: ICrypto, userState?: string, meta?: Record): string; } // Warning: (ae-missing-release-tag) "QueueMeasurement" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -3696,18 +3317,11 @@ export type RefreshTokenCache = Record; // // @internal export class RefreshTokenClient extends BaseClient { - constructor( - configuration: ClientConfiguration, - performanceClient?: IPerformanceClient - ); - // (undocumented) - acquireToken( - request: CommonRefreshTokenRequest - ): Promise; - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - acquireTokenByRefreshToken( - request: CommonSilentFlowRequest - ): Promise; + constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); + // (undocumented) + acquireToken(request: CommonRefreshTokenRequest): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + acquireTokenByRefreshToken(request: CommonSilentFlowRequest): Promise; } // Warning: (ae-missing-release-tag) "RefreshTokenEntity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -3757,10 +3371,7 @@ export class RequestParameterBuilder { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen addClientAssertionType(clientAssertionType: string): void; // (undocumented) - addClientCapabilitiesToClaims( - claims?: string, - clientCapabilities?: Array - ): string; + addClientCapabilitiesToClaims(claims?: string, clientCapabilities?: Array): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen addClientId(clientId: string): void; addClientInfo(): void; @@ -3768,10 +3379,7 @@ export class RequestParameterBuilder { addClientSecret(clientSecret: string): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - addCodeChallengeParams( - codeChallenge: string, - codeChallengeMethod: string - ): void; + addCodeChallengeParams(codeChallenge: string, codeChallengeMethod: string): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen addCodeVerifier(codeVerifier: string): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -3816,11 +3424,7 @@ export class RequestParameterBuilder { addResponseTypeForTokenAndIdToken(): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - addScopes( - scopes: string[], - addOidcScopes?: boolean, - defaultScopes?: Array - ): void; + addScopes(scopes: string[], addOidcScopes?: boolean, defaultScopes?: Array): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen addServerTelemetry(serverTelemetryManager: ServerTelemetryManager): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen @@ -3873,15 +3477,7 @@ const RESPONSE_TYPE = "response_type"; // // @internal export class ResponseHandler { - constructor( - clientId: string, - cacheStorage: CacheManager, - cryptoObj: ICrypto, - logger: Logger, - serializableCache: ISerializableTokenCache | null, - persistencePlugin: ICachePlugin | null, - performanceClient?: IPerformanceClient - ); + constructor(clientId: string, cacheStorage: CacheManager, cryptoObj: ICrypto, logger: Logger, serializableCache: ISerializableTokenCache | null, persistencePlugin: ICachePlugin | null, performanceClient?: IPerformanceClient); // Warning: (tsdoc-undefined-tag) The TSDoc tag "@AuthenticationResult" is not defined in this configuration // Warning: (tsdoc-undefined-tag) The TSDoc tag "@CacheRecord" is not defined in this configuration // Warning: (tsdoc-undefined-tag) The TSDoc tag "@IdToken" is not defined in this configuration @@ -3889,43 +3485,17 @@ export class ResponseHandler { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static generateAuthenticationResult( - cryptoObj: ICrypto, - authority: Authority, - cacheRecord: CacheRecord, - fromTokenCache: boolean, - request: BaseAuthRequest, - idTokenClaims?: TokenClaims, - requestState?: RequestStateObject, - serverTokenResponse?: ServerAuthorizationTokenResponse, - requestId?: string - ): Promise; + static generateAuthenticationResult(cryptoObj: ICrypto, authority: Authority, cacheRecord: CacheRecord, fromTokenCache: boolean, request: BaseAuthRequest, idTokenClaims?: TokenClaims, requestState?: RequestStateObject, serverTokenResponse?: ServerAuthorizationTokenResponse, requestId?: string): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - handleServerTokenResponse( - serverTokenResponse: ServerAuthorizationTokenResponse, - authority: Authority, - reqTimestamp: number, - request: BaseAuthRequest, - authCodePayload?: AuthorizationCodePayload, - userAssertionHash?: string, - handlingRefreshTokenResponse?: boolean, - forceCacheRefreshTokenResponse?: boolean, - serverRequestId?: string - ): Promise; + handleServerTokenResponse(serverTokenResponse: ServerAuthorizationTokenResponse, authority: Authority, reqTimestamp: number, request: BaseAuthRequest, authCodePayload?: AuthorizationCodePayload, userAssertionHash?: string, handlingRefreshTokenResponse?: boolean, forceCacheRefreshTokenResponse?: boolean, serverRequestId?: string): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - validateServerAuthorizationCodeResponse( - serverResponse: ServerAuthorizationCodeResponse, - requestState: string - ): void; + validateServerAuthorizationCodeResponse(serverResponse: ServerAuthorizationCodeResponse, requestState: string): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - validateTokenResponse( - serverResponse: ServerAuthorizationTokenResponse, - refreshAccessToken?: boolean - ): void; + validateTokenResponse(serverResponse: ServerAuthorizationTokenResponse, refreshAccessToken?: boolean): void; } // Warning: (ae-missing-release-tag) "ResponseMode" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -4051,13 +3621,7 @@ export type ServerDeviceCodeResponse = { // // @public export class ServerError extends AuthError { - constructor( - errorCode?: string, - errorMessage?: string, - subError?: string, - errorNo?: string, - status?: number - ); + constructor(errorCode?: string, errorMessage?: string, subError?: string, errorNo?: string, status?: number); readonly errorNo?: string; readonly status?: number; } @@ -4072,8 +3636,7 @@ export const ServerResponseType: { }; // @public (undocumented) -export type ServerResponseType = - (typeof ServerResponseType)[keyof typeof ServerResponseType]; +export type ServerResponseType = (typeof ServerResponseType)[keyof typeof ServerResponseType]; // Warning: (ae-missing-release-tag) "ServerTelemetryEntity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -4089,10 +3652,7 @@ export type ServerTelemetryEntity = { // // @internal (undocumented) export class ServerTelemetryManager { - constructor( - telemetryRequest: ServerTelemetryRequest, - cacheManager: CacheManager - ); + constructor(telemetryRequest: ServerTelemetryRequest, cacheManager: CacheManager); // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen cacheFailedRequest(error: unknown): void; // (undocumented) @@ -4110,16 +3670,12 @@ export class ServerTelemetryManager { // (undocumented) static makeExtraSkuString(params: SkuParams): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static maxErrorsToSend( - serverTelemetryEntity: ServerTelemetryEntity - ): number; + static maxErrorsToSend(serverTelemetryEntity: ServerTelemetryEntity): number; setCacheOutcome(cacheOutcome: CacheOutcome): void; // (undocumented) setNativeBrokerErrorCode(errorCode: string): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - updateRegionDiscoveryMetadata( - regionDiscoveryMetadata: RegionDiscoveryMetadata - ): void; + updateRegionDiscoveryMetadata(regionDiscoveryMetadata: RegionDiscoveryMetadata): void; } // Warning: (ae-missing-release-tag) "ServerTelemetryRequest" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -4169,14 +3725,7 @@ export type SignedHttpRequest = { // Warning: (ae-missing-release-tag) "SignedHttpRequestParameters" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export type SignedHttpRequestParameters = Pick< - BaseAuthRequest, - | "resourceRequestMethod" - | "resourceRequestUri" - | "shrClaims" - | "shrNonce" - | "shrOptions" -> & { +export type SignedHttpRequestParameters = Pick & { correlationId?: string; }; @@ -4184,18 +3733,11 @@ export type SignedHttpRequestParameters = Pick< // // @internal (undocumented) export class SilentFlowClient extends BaseClient { - constructor( - configuration: ClientConfiguration, - performanceClient?: IPerformanceClient - ); - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - acquireCachedToken( - request: CommonSilentFlowRequest - ): Promise<[AuthenticationResult, CacheOutcome]>; - // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - acquireToken( - request: CommonSilentFlowRequest - ): Promise; + constructor(configuration: ClientConfiguration, performanceClient?: IPerformanceClient); + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + acquireCachedToken(request: CommonSilentFlowRequest): Promise<[AuthenticationResult, CacheOutcome]>; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + acquireToken(request: CommonSilentFlowRequest): Promise; } // Warning: (ae-missing-release-tag) "STATE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -4216,9 +3758,7 @@ const stateNotFound = "state_not_found"; // Warning: (ae-missing-release-tag) "StaticAuthorityOptions" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export type StaticAuthorityOptions = Partial< - Pick -> & { +export type StaticAuthorityOptions = Partial> & { canonicalAuthority?: string; cloudDiscoveryMetadata?: CloudInstanceDiscoveryResponse; }; @@ -4303,10 +3843,7 @@ export class StubPerformanceClient implements IPerformanceClient { // (undocumented) setPreQueueTime(): void; // (undocumented) - startMeasurement( - measureName: string, - correlationId?: string | undefined - ): InProgressPerformanceEvent; + startMeasurement(measureName: string, correlationId?: string | undefined): InProgressPerformanceEvent; // (undocumented) startPerformanceMeasurement(): IPerformanceMeasurement; } @@ -4332,18 +3869,12 @@ export type SystemOptions = { // Warning: (ae-missing-release-tag) "tenantIdMatchesHomeTenant" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export function tenantIdMatchesHomeTenant( - tenantId?: string, - homeAccountId?: string -): boolean; +export function tenantIdMatchesHomeTenant(tenantId?: string, homeAccountId?: string): boolean; // Warning: (ae-missing-release-tag) "TenantProfile" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export type TenantProfile = Pick< - AccountInfo, - "tenantId" | "localAccountId" | "name" -> & { +export type TenantProfile = Pick & { isHomeTenant?: boolean; }; @@ -4380,42 +3911,31 @@ export class ThrottlingUtils { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static calculateThrottleTime(throttleTime: number): number; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static checkResponseForRetryAfter( - response: NetworkResponse - ): boolean; + static checkResponseForRetryAfter(response: NetworkResponse): boolean; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static checkResponseStatus( - response: NetworkResponse - ): boolean; + static checkResponseStatus(response: NetworkResponse): boolean; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static generateThrottlingStorageKey(thumbprint: RequestThumbprint): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static postProcess( - cacheManager: CacheManager, - thumbprint: RequestThumbprint, - response: NetworkResponse - ): void; + static postProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint, response: NetworkResponse): void; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static preProcess( - cacheManager: CacheManager, - thumbprint: RequestThumbprint - ): void; + static preProcess(cacheManager: CacheManager, thumbprint: RequestThumbprint): void; // (undocumented) - static removeThrottle( - cacheManager: CacheManager, - clientId: string, - request: BaseAuthRequest, - homeAccountIdentifier?: string - ): void; + static removeThrottle(cacheManager: CacheManager, clientId: string, request: BaseAuthRequest, homeAccountIdentifier?: string): void; } declare namespace TimeUtils { - export { nowSeconds, isTokenExpired, wasClockTurnedBack, delay }; + export { + nowSeconds, + isTokenExpired, + wasClockTurnedBack, + delay + } } -export { TimeUtils }; +export { TimeUtils } // Warning: (ae-missing-release-tag) "TOKEN_TYPE" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -4473,14 +3993,13 @@ type TokenClaims = { tenant_region_scope?: string; tenant_region_sub_scope?: string; }; -export { TokenClaims as IdTokenClaims }; -export { TokenClaims }; +export { TokenClaims as IdTokenClaims } +export { TokenClaims } // Warning: (ae-missing-release-tag) "tokenClaimsCnfRequiredForSignedJwt" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -const tokenClaimsCnfRequiredForSignedJwt = - "token_claims_cnf_required_for_signedjwt"; +const tokenClaimsCnfRequiredForSignedJwt = "token_claims_cnf_required_for_signedjwt"; // Warning: (ae-missing-release-tag) "TokenKeys" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -4526,34 +4045,21 @@ const untrustedAuthority = "untrusted_authority"; // Warning: (ae-missing-release-tag) "updateAccountTenantProfileData" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public -export function updateAccountTenantProfileData( - baseAccountInfo: AccountInfo, - tenantProfile?: TenantProfile, - idTokenClaims?: TokenClaims, - idTokenSecret?: string -): AccountInfo; +export function updateAccountTenantProfileData(baseAccountInfo: AccountInfo, tenantProfile?: TenantProfile, idTokenClaims?: TokenClaims, idTokenSecret?: string): AccountInfo; // Warning: (ae-incompatible-release-tags) The symbol "updateAuthorityEndpointMetadata" is marked as @public, but its signature references "AuthorityMetadataEntity" which is marked as @internal // Warning: (ae-incompatible-release-tags) The symbol "updateAuthorityEndpointMetadata" is marked as @public, but its signature references "AuthorityMetadataEntity" which is marked as @internal // Warning: (ae-missing-release-tag) "updateAuthorityEndpointMetadata" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -function updateAuthorityEndpointMetadata( - authorityMetadata: AuthorityMetadataEntity, - updatedValues: OpenIdConfigResponse, - fromNetwork: boolean -): void; +function updateAuthorityEndpointMetadata(authorityMetadata: AuthorityMetadataEntity, updatedValues: OpenIdConfigResponse, fromNetwork: boolean): void; // Warning: (ae-incompatible-release-tags) The symbol "updateCloudDiscoveryMetadata" is marked as @public, but its signature references "AuthorityMetadataEntity" which is marked as @internal // Warning: (ae-incompatible-release-tags) The symbol "updateCloudDiscoveryMetadata" is marked as @public, but its signature references "AuthorityMetadataEntity" which is marked as @internal // Warning: (ae-missing-release-tag) "updateCloudDiscoveryMetadata" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -function updateCloudDiscoveryMetadata( - authorityMetadata: AuthorityMetadataEntity, - updatedValues: CloudDiscoveryMetadata, - fromNetwork: boolean -): void; +function updateCloudDiscoveryMetadata(authorityMetadata: AuthorityMetadataEntity, updatedValues: CloudDiscoveryMetadata, fromNetwork: boolean): void; // Warning: (ae-missing-release-tag) "urlEmptyError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -4610,9 +4116,12 @@ export type UrlToHttpRequestOptions = { }; declare namespace UrlUtils { - export { stripLeadingHashOrQuery, getDeserializedResponse }; + export { + stripLeadingHashOrQuery, + getDeserializedResponse + } } -export { UrlUtils }; +export { UrlUtils } // Warning: (ae-missing-release-tag) "userCanceled" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -4627,24 +4136,12 @@ const userTimeoutReached = "user_timeout_reached"; // Warning: (ae-internal-missing-underscore) The name "ValidCacheType" should be prefixed with an underscore because the declaration is marked as @internal // // @internal -export type ValidCacheType = - | AccountEntity - | IdTokenEntity - | AccessTokenEntity - | RefreshTokenEntity - | AppMetadataEntity - | AuthorityMetadataEntity - | ServerTelemetryEntity - | ThrottlingEntity - | string; +export type ValidCacheType = AccountEntity | IdTokenEntity | AccessTokenEntity | RefreshTokenEntity | AppMetadataEntity | AuthorityMetadataEntity | ServerTelemetryEntity | ThrottlingEntity | string; // Warning: (ae-internal-missing-underscore) The name "ValidCredentialType" should be prefixed with an underscore because the declaration is marked as @internal // // @internal -export type ValidCredentialType = - | IdTokenEntity - | AccessTokenEntity - | RefreshTokenEntity; +export type ValidCredentialType = IdTokenEntity | AccessTokenEntity | RefreshTokenEntity; // Warning: (ae-missing-release-tag) "version" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -4881,4 +4378,5 @@ const X_MS_LIB_CAPABILITY = "x-ms-lib-capability"; // src/telemetry/performance/PerformanceEvent.ts:834:21 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag // src/telemetry/performance/PerformanceEvent.ts:834:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" // src/telemetry/performance/PerformanceEvent.ts:834:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration + ``` diff --git a/lib/msal-node/apiReview/msal-node.api.md b/lib/msal-node/apiReview/msal-node.api.md index 98d442f7a5..672117297b 100644 --- a/lib/msal-node/apiReview/msal-node.api.md +++ b/lib/msal-node/apiReview/msal-node.api.md @@ -3,115 +3,104 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts + /// -import { AccessTokenCache } from "@azure/msal-common"; -import { AccessTokenEntity } from "@azure/msal-common"; -import { AccountCache } from "@azure/msal-common"; -import { AccountEntity } from "@azure/msal-common"; -import { AccountInfo } from "@azure/msal-common"; -import { ApplicationTelemetry } from "@azure/msal-common"; -import { AppMetadataCache } from "@azure/msal-common"; -import { AppMetadataEntity } from "@azure/msal-common"; -import { AppTokenProviderParameters } from "@azure/msal-common"; -import { AppTokenProviderResult } from "@azure/msal-common"; -import { AuthenticationResult } from "@azure/msal-common"; -import { AuthError } from "@azure/msal-common"; -import { AuthErrorCodes } from "@azure/msal-common"; -import { AuthErrorMessage } from "@azure/msal-common"; -import { Authority } from "@azure/msal-common"; -import { AuthorityMetadataEntity } from "@azure/msal-common"; -import { AuthorizationCodePayload } from "@azure/msal-common"; -import { AzureCloudInstance } from "@azure/msal-common"; -import { AzureCloudOptions } from "@azure/msal-common"; -import { AzureRegionConfiguration } from "@azure/msal-common"; -import { BaseAuthRequest } from "@azure/msal-common"; -import { BaseClient } from "@azure/msal-common"; -import { CacheManager } from "@azure/msal-common"; -import { CacheOutcome } from "@azure/msal-common"; -import { ClientAssertionCallback } from "@azure/msal-common"; -import { ClientAuthError } from "@azure/msal-common"; -import { ClientAuthErrorCodes } from "@azure/msal-common"; -import { ClientAuthErrorMessage } from "@azure/msal-common"; -import { ClientConfiguration } from "@azure/msal-common"; -import { ClientConfigurationError } from "@azure/msal-common"; -import { ClientConfigurationErrorCodes } from "@azure/msal-common"; -import { ClientConfigurationErrorMessage } from "@azure/msal-common"; -import { CommonAuthorizationCodeRequest } from "@azure/msal-common"; -import { CommonAuthorizationUrlRequest } from "@azure/msal-common"; -import { CommonClientCredentialRequest } from "@azure/msal-common"; -import { CommonDeviceCodeRequest } from "@azure/msal-common"; -import { CommonOnBehalfOfRequest } from "@azure/msal-common"; -import { CommonRefreshTokenRequest } from "@azure/msal-common"; -import { CommonSilentFlowRequest } from "@azure/msal-common"; -import { CommonUsernamePasswordRequest } from "@azure/msal-common"; -import { DeviceCodeResponse } from "@azure/msal-common"; -import http from "http"; -import https from "https"; -import { IAppTokenProvider } from "@azure/msal-common"; -import { ICachePlugin } from "@azure/msal-common"; -import { ICrypto } from "@azure/msal-common"; -import { IdTokenCache } from "@azure/msal-common"; -import { IdTokenClaims } from "@azure/msal-common"; -import { IdTokenEntity } from "@azure/msal-common"; -import { INativeBrokerPlugin } from "@azure/msal-common"; -import { INetworkModule } from "@azure/msal-common"; -import { InteractionRequiredAuthError } from "@azure/msal-common"; -import { InteractionRequiredAuthErrorCodes } from "@azure/msal-common"; -import { InteractionRequiredAuthErrorMessage } from "@azure/msal-common"; -import { ISerializableTokenCache } from "@azure/msal-common"; -import { Logger } from "@azure/msal-common"; -import { LoggerOptions } from "@azure/msal-common"; -import { LogLevel } from "@azure/msal-common"; -import { NetworkRequestOptions } from "@azure/msal-common"; -import { NetworkResponse } from "@azure/msal-common"; -import { PkceCodes } from "@azure/msal-common"; -import { PromptValue } from "@azure/msal-common"; -import { ProtocolMode } from "@azure/msal-common"; -import { RefreshTokenCache } from "@azure/msal-common"; -import { RefreshTokenEntity } from "@azure/msal-common"; -import { ResponseMode } from "@azure/msal-common"; -import { ServerAuthorizationCodeResponse } from "@azure/msal-common"; -import { ServerError } from "@azure/msal-common"; -import { ServerTelemetryEntity } from "@azure/msal-common"; -import { ServerTelemetryManager } from "@azure/msal-common"; -import { StaticAuthorityOptions } from "@azure/msal-common"; -import { ThrottlingEntity } from "@azure/msal-common"; -import { TokenCacheContext } from "@azure/msal-common"; -import { TokenKeys } from "@azure/msal-common"; -import { ValidCacheType } from "@azure/msal-common"; -import { ValidCredentialType } from "@azure/msal-common"; - -export { AccountInfo }; - -export { AppTokenProviderParameters }; - -export { AppTokenProviderResult }; - -export { AuthenticationResult }; - -export { AuthError }; - -export { AuthErrorCodes }; - -export { AuthErrorMessage }; - -export { AuthorizationCodePayload }; - -// @public -export type AuthorizationCodeRequest = Partial< - Omit< - CommonAuthorizationCodeRequest, - | "scopes" - | "redirectUri" - | "code" - | "authenticationScheme" - | "resourceRequestMethod" - | "resourceRequestUri" - | "requestedClaimsHash" - | "storeInCache" - > -> & { +import { AccessTokenCache } from '@azure/msal-common'; +import { AccessTokenEntity } from '@azure/msal-common'; +import { AccountCache } from '@azure/msal-common'; +import { AccountEntity } from '@azure/msal-common'; +import { AccountInfo } from '@azure/msal-common'; +import { ApplicationTelemetry } from '@azure/msal-common'; +import { AppMetadataCache } from '@azure/msal-common'; +import { AppMetadataEntity } from '@azure/msal-common'; +import { AppTokenProviderParameters } from '@azure/msal-common'; +import { AppTokenProviderResult } from '@azure/msal-common'; +import { AuthenticationResult } from '@azure/msal-common'; +import { AuthError } from '@azure/msal-common'; +import { AuthErrorCodes } from '@azure/msal-common'; +import { AuthErrorMessage } from '@azure/msal-common'; +import { Authority } from '@azure/msal-common'; +import { AuthorityMetadataEntity } from '@azure/msal-common'; +import { AuthorizationCodePayload } from '@azure/msal-common'; +import { AzureCloudInstance } from '@azure/msal-common'; +import { AzureCloudOptions } from '@azure/msal-common'; +import { AzureRegionConfiguration } from '@azure/msal-common'; +import { BaseAuthRequest } from '@azure/msal-common'; +import { BaseClient } from '@azure/msal-common'; +import { CacheManager } from '@azure/msal-common'; +import { CacheOutcome } from '@azure/msal-common'; +import { ClientAssertionCallback } from '@azure/msal-common'; +import { ClientAuthError } from '@azure/msal-common'; +import { ClientAuthErrorCodes } from '@azure/msal-common'; +import { ClientAuthErrorMessage } from '@azure/msal-common'; +import { ClientConfiguration } from '@azure/msal-common'; +import { ClientConfigurationError } from '@azure/msal-common'; +import { ClientConfigurationErrorCodes } from '@azure/msal-common'; +import { ClientConfigurationErrorMessage } from '@azure/msal-common'; +import { CommonAuthorizationCodeRequest } from '@azure/msal-common'; +import { CommonAuthorizationUrlRequest } from '@azure/msal-common'; +import { CommonClientCredentialRequest } from '@azure/msal-common'; +import { CommonDeviceCodeRequest } from '@azure/msal-common'; +import { CommonOnBehalfOfRequest } from '@azure/msal-common'; +import { CommonRefreshTokenRequest } from '@azure/msal-common'; +import { CommonSilentFlowRequest } from '@azure/msal-common'; +import { CommonUsernamePasswordRequest } from '@azure/msal-common'; +import { DeviceCodeResponse } from '@azure/msal-common'; +import http from 'http'; +import https from 'https'; +import { IAppTokenProvider } from '@azure/msal-common'; +import { ICachePlugin } from '@azure/msal-common'; +import { ICrypto } from '@azure/msal-common'; +import { IdTokenCache } from '@azure/msal-common'; +import { IdTokenClaims } from '@azure/msal-common'; +import { IdTokenEntity } from '@azure/msal-common'; +import { INativeBrokerPlugin } from '@azure/msal-common'; +import { INetworkModule } from '@azure/msal-common'; +import { InteractionRequiredAuthError } from '@azure/msal-common'; +import { InteractionRequiredAuthErrorCodes } from '@azure/msal-common'; +import { InteractionRequiredAuthErrorMessage } from '@azure/msal-common'; +import { ISerializableTokenCache } from '@azure/msal-common'; +import { Logger } from '@azure/msal-common'; +import { LoggerOptions } from '@azure/msal-common'; +import { LogLevel } from '@azure/msal-common'; +import { NetworkRequestOptions } from '@azure/msal-common'; +import { NetworkResponse } from '@azure/msal-common'; +import { PkceCodes } from '@azure/msal-common'; +import { PromptValue } from '@azure/msal-common'; +import { ProtocolMode } from '@azure/msal-common'; +import { RefreshTokenCache } from '@azure/msal-common'; +import { RefreshTokenEntity } from '@azure/msal-common'; +import { ResponseMode } from '@azure/msal-common'; +import { ServerAuthorizationCodeResponse } from '@azure/msal-common'; +import { ServerError } from '@azure/msal-common'; +import { ServerTelemetryEntity } from '@azure/msal-common'; +import { ServerTelemetryManager } from '@azure/msal-common'; +import { StaticAuthorityOptions } from '@azure/msal-common'; +import { ThrottlingEntity } from '@azure/msal-common'; +import { TokenCacheContext } from '@azure/msal-common'; +import { TokenKeys } from '@azure/msal-common'; +import { ValidCacheType } from '@azure/msal-common'; +import { ValidCredentialType } from '@azure/msal-common'; + +export { AccountInfo } + +export { AppTokenProviderParameters } + +export { AppTokenProviderResult } + +export { AuthenticationResult } + +export { AuthError } + +export { AuthErrorCodes } + +export { AuthErrorMessage } + +export { AuthorizationCodePayload } + +// @public +export type AuthorizationCodeRequest = Partial> & { scopes: Array; redirectUri: string; code: string; @@ -119,25 +108,14 @@ export type AuthorizationCodeRequest = Partial< }; // @public -export type AuthorizationUrlRequest = Partial< - Omit< - CommonAuthorizationUrlRequest, - | "scopes" - | "redirectUri" - | "resourceRequestMethod" - | "resourceRequestUri" - | "authenticationScheme" - | "requestedClaimsHash" - | "storeInCache" - > -> & { +export type AuthorizationUrlRequest = Partial> & { scopes: Array; redirectUri: string; }; -export { AzureCloudInstance }; +export { AzureCloudInstance } -export { AzureCloudOptions }; +export { AzureCloudOptions } // @public export type BrokerOptions = { @@ -148,13 +126,7 @@ export type BrokerOptions = { // Warning: (ae-internal-missing-underscore) The name "buildAppConfiguration" should be prefixed with an underscore because the declaration is marked as @internal // // @internal -export function buildAppConfiguration({ - auth, - broker, - cache, - system, - telemetry, -}: Configuration): NodeConfiguration; +export function buildAppConfiguration({ auth, broker, cache, system, telemetry, }: Configuration): NodeConfiguration; // @public export type CacheKVStore = Record; @@ -168,26 +140,11 @@ export type CacheOptions = { // @public export abstract class ClientApplication { protected constructor(configuration: Configuration); - acquireTokenByCode( - request: AuthorizationCodeRequest, - authCodePayLoad?: AuthorizationCodePayload - ): Promise; - acquireTokenByRefreshToken( - request: RefreshTokenRequest - ): Promise; - acquireTokenByUsernamePassword( - request: UsernamePasswordRequest - ): Promise; - acquireTokenSilent( - request: SilentFlowRequest - ): Promise; - protected buildOauthClientConfiguration( - authority: string, - requestCorrelationId: string, - serverTelemetryManager?: ServerTelemetryManager, - azureRegionConfiguration?: AzureRegionConfiguration, - azureCloudOptions?: AzureCloudOptions - ): Promise; + acquireTokenByCode(request: AuthorizationCodeRequest, authCodePayLoad?: AuthorizationCodePayload): Promise; + acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise; + acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise; + acquireTokenSilent(request: SilentFlowRequest): Promise; + protected buildOauthClientConfiguration(authority: string, requestCorrelationId: string, serverTelemetryManager?: ServerTelemetryManager, azureRegionConfiguration?: AzureRegionConfiguration, azureCloudOptions?: AzureCloudOptions): Promise; clearCache(): void; protected clientAssertion: ClientAssertion; protected clientSecret: string; @@ -195,20 +152,12 @@ export abstract class ClientApplication { // (undocumented) protected readonly cryptoProvider: CryptoProvider; // (undocumented) - protected developerProvidedClientAssertion: - | string - | ClientAssertionCallback; + protected developerProvidedClientAssertion: string | ClientAssertionCallback; getAuthCodeUrl(request: AuthorizationUrlRequest): Promise; getLogger(): Logger; getTokenCache(): TokenCache; - protected initializeBaseRequest( - authRequest: Partial - ): Promise; - protected initializeServerTelemetryManager( - apiId: number, - correlationId: string, - forceRefresh?: boolean - ): ServerTelemetryManager; + protected initializeBaseRequest(authRequest: Partial): Promise; + protected initializeServerTelemetryManager(apiId: number, correlationId: string, forceRefresh?: boolean): ServerTelemetryManager; protected logger: Logger; setLogger(logger: Logger): void; protected storage: NodeStorage; @@ -221,86 +170,46 @@ export abstract class ClientApplication { export class ClientAssertion { static fromAssertion(assertion: string): ClientAssertion; // @deprecated (undocumented) - static fromCertificate( - thumbprint: string, - privateKey: string, - publicCertificate?: string - ): ClientAssertion; - static fromCertificateWithSha256Thumbprint( - thumbprint: string, - privateKey: string, - publicCertificate?: string - ): ClientAssertion; - getJwt( - cryptoProvider: CryptoProvider, - issuer: string, - jwtAudience: string - ): string; + static fromCertificate(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion; + static fromCertificateWithSha256Thumbprint(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion; + getJwt(cryptoProvider: CryptoProvider, issuer: string, jwtAudience: string): string; static parseCertificate(publicCertificate: string): Array; } -export { ClientAssertionCallback }; +export { ClientAssertionCallback } -export { ClientAuthError }; +export { ClientAuthError } -export { ClientAuthErrorCodes }; +export { ClientAuthErrorCodes } -export { ClientAuthErrorMessage }; +export { ClientAuthErrorMessage } -export { ClientConfigurationError }; +export { ClientConfigurationError } -export { ClientConfigurationErrorCodes }; +export { ClientConfigurationErrorCodes } -export { ClientConfigurationErrorMessage }; +export { ClientConfigurationErrorMessage } // Warning: (ae-missing-release-tag) "ClientCredentialClient" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public export class ClientCredentialClient extends BaseClient { - constructor( - configuration: ClientConfiguration, - appTokenProvider?: IAppTokenProvider - ); + constructor(configuration: ClientConfiguration, appTokenProvider?: IAppTokenProvider); // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - acquireToken( - request: CommonClientCredentialRequest - ): Promise; - getCachedAuthenticationResult( - request: CommonClientCredentialRequest, - config: ClientConfiguration | ManagedIdentityConfiguration, - cryptoUtils: ICrypto, - authority: Authority, - cacheManager: CacheManager, - serverTelemetryManager?: ServerTelemetryManager | null - ): Promise<[AuthenticationResult | null, CacheOutcome]>; + acquireToken(request: CommonClientCredentialRequest): Promise; + getCachedAuthenticationResult(request: CommonClientCredentialRequest, config: ClientConfiguration | ManagedIdentityConfiguration, cryptoUtils: ICrypto, authority: Authority, cacheManager: CacheManager, serverTelemetryManager?: ServerTelemetryManager | null): Promise<[AuthenticationResult | null, CacheOutcome]>; } // @public -export type ClientCredentialRequest = Partial< - Omit< - CommonClientCredentialRequest, - | "resourceRequestMethod" - | "resourceRequestUri" - | "requestedClaimsHash" - | "clientAssertion" - | "storeInCache" - > -> & { +export type ClientCredentialRequest = Partial> & { clientAssertion?: string | ClientAssertionCallback; }; // @public -export class ConfidentialClientApplication - extends ClientApplication - implements IConfidentialClientApplication -{ +export class ConfidentialClientApplication extends ClientApplication implements IConfidentialClientApplication { constructor(configuration: Configuration); - acquireTokenByClientCredential( - request: ClientCredentialRequest - ): Promise; - acquireTokenOnBehalfOf( - request: OnBehalfOfRequest - ): Promise; + acquireTokenByClientCredential(request: ClientCredentialRequest): Promise; + acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise; SetAppTokenProvider(provider: IAppTokenProvider): void; } @@ -336,29 +245,19 @@ export class CryptoProvider implements ICrypto { // @public class Deserializer { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static deserializeAccessTokens( - accessTokens: Record - ): AccessTokenCache; + static deserializeAccessTokens(accessTokens: Record): AccessTokenCache; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static deserializeAccounts( - accounts: Record - ): AccountCache; + static deserializeAccounts(accounts: Record): AccountCache; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static deserializeAllCache(jsonCache: JsonCache): InMemoryCache; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static deserializeAppMetadata( - appMetadata: Record - ): AppMetadataCache; + static deserializeAppMetadata(appMetadata: Record): AppMetadataCache; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static deserializeIdTokens( - idTokens: Record - ): IdTokenCache; + static deserializeIdTokens(idTokens: Record): IdTokenCache; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static deserializeJSONBlob(jsonFile: string): JsonCache; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static deserializeRefreshTokens( - refreshTokens: Record - ): RefreshTokenCache; + static deserializeRefreshTokens(refreshTokens: Record): RefreshTokenCache; } // Warning: (ae-missing-release-tag) "DeviceCodeClient" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -367,25 +266,13 @@ class Deserializer { export class DeviceCodeClient extends BaseClient { constructor(configuration: ClientConfiguration); // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - acquireToken( - request: CommonDeviceCodeRequest - ): Promise; + acquireToken(request: CommonDeviceCodeRequest): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen createExtraQueryParameters(request: CommonDeviceCodeRequest): string; } // @public -export type DeviceCodeRequest = Partial< - Omit< - CommonDeviceCodeRequest, - | "scopes" - | "deviceCodeCallback" - | "resourceRequestMethod" - | "resourceRequestUri" - | "requestedClaimsHash" - | "storeInCache" - > -> & { +export type DeviceCodeRequest = Partial> & { scopes: Array; deviceCodeCallback: (response: DeviceCodeResponse) => void; }; @@ -401,7 +288,7 @@ export class DistributedCachePlugin implements ICachePlugin { beforeCacheAccess(cacheContext: TokenCacheContext): Promise; } -export { IAppTokenProvider }; +export { IAppTokenProvider } // Warning: (ae-missing-release-tag) "ICacheClient" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -414,28 +301,16 @@ export interface ICacheClient { set(key: string, value: string): Promise; } -export { ICachePlugin }; +export { ICachePlugin } // @public export interface IConfidentialClientApplication { - acquireTokenByClientCredential( - request: ClientCredentialRequest - ): Promise; - acquireTokenByCode( - request: AuthorizationCodeRequest - ): Promise; - acquireTokenByRefreshToken( - request: RefreshTokenRequest - ): Promise; - acquireTokenByUsernamePassword( - request: UsernamePasswordRequest - ): Promise; - acquireTokenOnBehalfOf( - request: OnBehalfOfRequest - ): Promise; - acquireTokenSilent( - request: SilentFlowRequest - ): Promise; + acquireTokenByClientCredential(request: ClientCredentialRequest): Promise; + acquireTokenByCode(request: AuthorizationCodeRequest): Promise; + acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise; + acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise; + acquireTokenOnBehalfOf(request: OnBehalfOfRequest): Promise; + acquireTokenSilent(request: SilentFlowRequest): Promise; clearCache(): void; getAuthCodeUrl(request: AuthorizationUrlRequest): Promise; getLogger(): Logger; @@ -444,7 +319,7 @@ export interface IConfidentialClientApplication { setLogger(logger: Logger): void; } -export { IdTokenClaims }; +export { IdTokenClaims } // @public export interface ILoopbackClient { @@ -453,15 +328,12 @@ export interface ILoopbackClient { // (undocumented) getRedirectUri(): string; // (undocumented) - listenForAuthCode( - successTemplate?: string, - errorTemplate?: string - ): Promise; + listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise; } -export { INativeBrokerPlugin }; +export { INativeBrokerPlugin } -export { INetworkModule }; +export { INetworkModule } // @public export type InMemoryCache = { @@ -472,26 +344,14 @@ export type InMemoryCache = { appMetadata: AppMetadataCache; }; -export { InteractionRequiredAuthError }; +export { InteractionRequiredAuthError } -export { InteractionRequiredAuthErrorCodes }; +export { InteractionRequiredAuthErrorCodes } -export { InteractionRequiredAuthErrorMessage }; +export { InteractionRequiredAuthErrorMessage } // @public -export type InteractiveRequest = Pick< - AuthorizationUrlRequest, - | "authority" - | "correlationId" - | "claims" - | "azureCloudOptions" - | "account" - | "extraQueryParameters" - | "tokenQueryParameters" - | "extraScopesToConsent" - | "loginHint" - | "prompt" -> & { +export type InteractiveRequest = Pick & { openBrowser: (url: string) => Promise; scopes?: Array; successTemplate?: string; @@ -501,9 +361,12 @@ export type InteractiveRequest = Pick< }; declare namespace internals { - export { Serializer, Deserializer }; + export { + Serializer, + Deserializer + } } -export { internals }; +export { internals } // Warning: (ae-missing-release-tag) "IPartitionManager" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -516,24 +379,12 @@ export interface IPartitionManager { // @public export interface IPublicClientApplication { - acquireTokenByCode( - request: AuthorizationCodeRequest - ): Promise; - acquireTokenByDeviceCode( - request: DeviceCodeRequest - ): Promise; - acquireTokenByRefreshToken( - request: RefreshTokenRequest - ): Promise; - acquireTokenByUsernamePassword( - request: UsernamePasswordRequest - ): Promise; - acquireTokenInteractive( - request: InteractiveRequest - ): Promise; - acquireTokenSilent( - request: SilentFlowRequest - ): Promise; + acquireTokenByCode(request: AuthorizationCodeRequest): Promise; + acquireTokenByDeviceCode(request: DeviceCodeRequest): Promise; + acquireTokenByRefreshToken(request: RefreshTokenRequest): Promise; + acquireTokenByUsernamePassword(request: UsernamePasswordRequest): Promise; + acquireTokenInteractive(request: InteractiveRequest): Promise; + acquireTokenSilent(request: SilentFlowRequest): Promise; clearCache(): void; getAllAccounts(): Promise; getAuthCodeUrl(request: AuthorizationUrlRequest): Promise; @@ -543,7 +394,7 @@ export interface IPublicClientApplication { signOut(request: SignOutRequest): Promise; } -export { ISerializableTokenCache }; +export { ISerializableTokenCache } // @public export interface ITokenCache { @@ -562,16 +413,14 @@ export type JsonCache = { AppMetadata: Record; }; -export { Logger }; +export { Logger } -export { LogLevel }; +export { LogLevel } // @public export class ManagedIdentityApplication { constructor(configuration?: ManagedIdentityConfiguration); - acquireToken( - managedIdentityRequestParams: ManagedIdentityRequestParams - ): Promise; + acquireToken(managedIdentityRequestParams: ManagedIdentityRequestParams): Promise; getManagedIdentitySource(): ManagedIdentitySourceNames; } @@ -600,7 +449,6 @@ export type ManagedIdentityIdParams = { // // @public export type ManagedIdentityRequestParams = { - claims?: string; forceRefresh?: boolean; resource: string; }; @@ -616,12 +464,11 @@ export const ManagedIdentitySourceNames: { }; // @public -export type ManagedIdentitySourceNames = - (typeof ManagedIdentitySourceNames)[keyof typeof ManagedIdentitySourceNames]; +export type ManagedIdentitySourceNames = (typeof ManagedIdentitySourceNames)[keyof typeof ManagedIdentitySourceNames]; -export { NetworkRequestOptions }; +export { NetworkRequestOptions } -export { NetworkResponse }; +export { NetworkResponse } // @public export type NodeAuthOptions = { @@ -646,12 +493,7 @@ export type NodeAuthOptions = { // @public export class NodeStorage extends CacheManager { - constructor( - logger: Logger, - clientId: string, - cryptoImpl: ICrypto, - staticAuthorityOptions?: StaticAuthorityOptions - ); + constructor(logger: Logger, clientId: string, cryptoImpl: ICrypto, staticAuthorityOptions?: StaticAuthorityOptions); cacheToInMemoryCache(cache: CacheKVStore): InMemoryCache; clear(): Promise; containsKey(key: string): boolean; @@ -672,12 +514,8 @@ export class NodeStorage extends CacheManager { getInMemoryCache(): InMemoryCache; getItem(key: string): ValidCacheType; getKeys(): string[]; - getRefreshTokenCredential( - refreshTokenKey: string - ): RefreshTokenEntity | null; - getServerTelemetry( - serverTelemetrykey: string - ): ServerTelemetryEntity | null; + getRefreshTokenCredential(refreshTokenKey: string): RefreshTokenEntity | null; + getServerTelemetry(serverTelemetrykey: string): ServerTelemetryEntity | null; getThrottlingCache(throttlingCacheKey: string): ThrottlingEntity | null; // (undocumented) getTokenKeys(): TokenKeys; @@ -695,18 +533,9 @@ export class NodeStorage extends CacheManager { setInMemoryCache(inMemoryCache: InMemoryCache): void; setItem(key: string, value: ValidCacheType): void; setRefreshTokenCredential(refreshToken: RefreshTokenEntity): void; - setServerTelemetry( - serverTelemetryKey: string, - serverTelemetry: ServerTelemetryEntity - ): void; - setThrottlingCache( - throttlingCacheKey: string, - throttlingCache: ThrottlingEntity - ): void; - updateCredentialCacheKey( - currentCacheKey: string, - credential: ValidCredentialType - ): string; + setServerTelemetry(serverTelemetryKey: string, serverTelemetry: ServerTelemetryEntity): void; + setThrottlingCache(throttlingCacheKey: string, throttlingCache: ThrottlingEntity): void; + updateCredentialCacheKey(currentCacheKey: string, credential: ValidCredentialType): string; } // @public @@ -731,71 +560,39 @@ export type NodeTelemetryOptions = { export class OnBehalfOfClient extends BaseClient { constructor(configuration: ClientConfiguration); // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - acquireToken( - request: CommonOnBehalfOfRequest - ): Promise; + acquireToken(request: CommonOnBehalfOfRequest): Promise; } // @public -export type OnBehalfOfRequest = Partial< - Omit< - CommonOnBehalfOfRequest, - | "oboAssertion" - | "scopes" - | "resourceRequestMethod" - | "resourceRequestUri" - | "requestedClaimsHash" - | "storeInCache" - > -> & { +export type OnBehalfOfRequest = Partial> & { oboAssertion: string; scopes: Array; }; -export { PromptValue }; +export { PromptValue } -export { ProtocolMode }; +export { ProtocolMode } // @public -export class PublicClientApplication - extends ClientApplication - implements IPublicClientApplication -{ +export class PublicClientApplication extends ClientApplication implements IPublicClientApplication { constructor(configuration: Configuration); - acquireTokenByDeviceCode( - request: DeviceCodeRequest - ): Promise; - acquireTokenInteractive( - request: InteractiveRequest - ): Promise; + acquireTokenByDeviceCode(request: DeviceCodeRequest): Promise; + acquireTokenInteractive(request: InteractiveRequest): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - acquireTokenSilent( - request: SilentFlowRequest - ): Promise; + acquireTokenSilent(request: SilentFlowRequest): Promise; getAllAccounts(): Promise; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen signOut(request: SignOutRequest): Promise; } // @public -export type RefreshTokenRequest = Partial< - Omit< - CommonRefreshTokenRequest, - | "scopes" - | "refreshToken" - | "authenticationScheme" - | "resourceRequestMethod" - | "resourceRequestUri" - | "requestedClaimsHash" - | "storeInCache" - > -> & { +export type RefreshTokenRequest = Partial> & { scopes: Array; refreshToken: string; forceCache?: boolean; }; -export { ResponseMode }; +export { ResponseMode } // @public export type SerializedAccessTokenEntity = { @@ -866,34 +663,24 @@ export type SerializedRefreshTokenEntity = { // @public (undocumented) class Serializer { // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static serializeAccessTokens( - atCache: AccessTokenCache - ): Record; + static serializeAccessTokens(atCache: AccessTokenCache): Record; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static serializeAccounts( - accCache: AccountCache - ): Record; + static serializeAccounts(accCache: AccountCache): Record; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static serializeAllCache(inMemCache: InMemoryCache): JsonCache; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static serializeAppMetadata( - amdtCache: AppMetadataCache - ): Record; + static serializeAppMetadata(amdtCache: AppMetadataCache): Record; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static serializeIdTokens( - idTCache: IdTokenCache - ): Record; + static serializeIdTokens(idTCache: IdTokenCache): Record; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static serializeJSONBlob(data: JsonCache): string; // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - static serializeRefreshTokens( - rtCache: RefreshTokenCache - ): Record; + static serializeRefreshTokens(rtCache: RefreshTokenCache): Record; } -export { ServerAuthorizationCodeResponse }; +export { ServerAuthorizationCodeResponse } -export { ServerError }; +export { ServerError } // Warning: (ae-missing-release-tag) "SignOutRequest" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -904,28 +691,14 @@ export type SignOutRequest = { }; // @public -export type SilentFlowRequest = Partial< - Omit< - CommonSilentFlowRequest, - | "account" - | "scopes" - | "resourceRequestMethod" - | "resourceRequestUri" - | "requestedClaimsHash" - | "storeInCache" - > -> & { +export type SilentFlowRequest = Partial> & { account: AccountInfo; scopes: Array; }; // @public export class TokenCache implements ISerializableTokenCache, ITokenCache { - constructor( - storage: NodeStorage, - logger: Logger, - cachePlugin?: ICachePlugin - ); + constructor(storage: NodeStorage, logger: Logger, cachePlugin?: ICachePlugin); deserialize(cache: string): void; getAccountByHomeId(homeAccountId: string): Promise; getAccountByLocalId(localAccountId: string): Promise; @@ -936,7 +709,7 @@ export class TokenCache implements ISerializableTokenCache, ITokenCache { serialize(): string; } -export { TokenCacheContext }; +export { TokenCacheContext } // Warning: (ae-missing-release-tag) "UsernamePasswordClient" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -944,30 +717,17 @@ export { TokenCacheContext }; export class UsernamePasswordClient extends BaseClient { constructor(configuration: ClientConfiguration); // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen - acquireToken( - request: CommonUsernamePasswordRequest - ): Promise; + acquireToken(request: CommonUsernamePasswordRequest): Promise; } // @public -export type UsernamePasswordRequest = Partial< - Omit< - CommonUsernamePasswordRequest, - | "scopes" - | "resourceRequestMethod" - | "resourceRequestUri" - | "username" - | "password" - | "requestedClaimsHash" - | "storeInCache" - > -> & { +export type UsernamePasswordRequest = Partial> & { scopes: Array; username: string; password: string; }; -export { ValidCacheType }; +export { ValidCacheType } // Warning: (ae-missing-release-tag) "version" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -1004,4 +764,5 @@ export const version = "2.13.1"; // src/client/UsernamePasswordClient.ts:114:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen // src/index.ts:8:12 - (tsdoc-characters-after-block-tag) The token "@azure" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" // src/index.ts:8:4 - (tsdoc-undefined-tag) The TSDoc tag "@module" is not defined in this configuration + ``` From 818161207bca5b341145788afed73a9af9324dc5 Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Wed, 11 Sep 2024 13:27:30 -0400 Subject: [PATCH 13/15] api extractor --- lib/msal-common/apiReview/msal-common.api.md | 3 ++- lib/msal-node/apiReview/msal-node.api.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/msal-common/apiReview/msal-common.api.md b/lib/msal-common/apiReview/msal-common.api.md index 2cc7626138..34ba3c5027 100644 --- a/lib/msal-common/apiReview/msal-common.api.md +++ b/lib/msal-common/apiReview/msal-common.api.md @@ -1073,6 +1073,7 @@ export type ClientAssertionCallback = (config: ClientAssertionConfig) => Promise export type ClientAssertionConfig = { clientId: string; tokenEndpoint?: string; + claims?: string; }; declare namespace ClientAssertionUtils { @@ -1996,7 +1997,7 @@ function generateCredentialKey(credentialEntity: CredentialEntity): string; // Warning: (ae-missing-release-tag) "getClientAssertion" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export function getClientAssertion(clientAssertion: string | ClientAssertionCallback, clientId: string, tokenEndpoint?: string): Promise; +export function getClientAssertion(clientAssertion: string | ClientAssertionCallback, clientId: string, tokenEndpoint?: string, claims?: string): Promise; // Warning: (ae-missing-release-tag) "getDeserializedResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // diff --git a/lib/msal-node/apiReview/msal-node.api.md b/lib/msal-node/apiReview/msal-node.api.md index 672117297b..4b30db714a 100644 --- a/lib/msal-node/apiReview/msal-node.api.md +++ b/lib/msal-node/apiReview/msal-node.api.md @@ -449,6 +449,7 @@ export type ManagedIdentityIdParams = { // // @public export type ManagedIdentityRequestParams = { + claims?: string; forceRefresh?: boolean; resource: string; }; From a725048bb69b26f5f7c675279958219a742c3d69 Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Thu, 26 Sep 2024 15:38:54 -0400 Subject: [PATCH 14/15] removed functionality sending claims to the network --- ...mmon-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json | 7 ------- lib/msal-common/apiReview/msal-common.api.md | 3 +-- lib/msal-common/src/account/ClientCredentials.ts | 1 - lib/msal-common/src/utils/ClientAssertionUtils.ts | 4 +--- .../src/client/ManagedIdentityApplication.ts | 3 +-- .../BaseManagedIdentitySource.ts | 6 ------ .../client/ManagedIdentitySources/Imds.spec.ts | 15 --------------- 7 files changed, 3 insertions(+), 36 deletions(-) delete mode 100644 change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json diff --git a/change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json b/change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json deleted file mode 100644 index 5edbf1fb0d..0000000000 --- a/change/@azure-msal-common-e4f59bc0-0846-4b3a-a6bd-b8a4829c5bff.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "Implemented functionality to skip the cache for MI when claims are provided #7207", - "packageName": "@azure/msal-common", - "email": "rginsburg@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/lib/msal-common/apiReview/msal-common.api.md b/lib/msal-common/apiReview/msal-common.api.md index 6544a6eeea..1b410b56d4 100644 --- a/lib/msal-common/apiReview/msal-common.api.md +++ b/lib/msal-common/apiReview/msal-common.api.md @@ -1073,7 +1073,6 @@ export type ClientAssertionCallback = (config: ClientAssertionConfig) => Promise export type ClientAssertionConfig = { clientId: string; tokenEndpoint?: string; - claims?: string; }; declare namespace ClientAssertionUtils { @@ -1997,7 +1996,7 @@ function generateCredentialKey(credentialEntity: CredentialEntity): string; // Warning: (ae-missing-release-tag) "getClientAssertion" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export function getClientAssertion(clientAssertion: string | ClientAssertionCallback, clientId: string, tokenEndpoint?: string, claims?: string): Promise; +export function getClientAssertion(clientAssertion: string | ClientAssertionCallback, clientId: string, tokenEndpoint?: string): Promise; // Warning: (ae-missing-release-tag) "getDeserializedResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // diff --git a/lib/msal-common/src/account/ClientCredentials.ts b/lib/msal-common/src/account/ClientCredentials.ts index d5f79b9ba3..6c148cf4f0 100644 --- a/lib/msal-common/src/account/ClientCredentials.ts +++ b/lib/msal-common/src/account/ClientCredentials.ts @@ -6,7 +6,6 @@ export type ClientAssertionConfig = { clientId: string; tokenEndpoint?: string; - claims?: string; }; export type ClientAssertionCallback = ( diff --git a/lib/msal-common/src/utils/ClientAssertionUtils.ts b/lib/msal-common/src/utils/ClientAssertionUtils.ts index fdc02ead61..7dc5ac9ab6 100644 --- a/lib/msal-common/src/utils/ClientAssertionUtils.ts +++ b/lib/msal-common/src/utils/ClientAssertionUtils.ts @@ -11,8 +11,7 @@ import { export async function getClientAssertion( clientAssertion: string | ClientAssertionCallback, clientId: string, - tokenEndpoint?: string, - claims?: string + tokenEndpoint?: string ): Promise { if (typeof clientAssertion === "string") { return clientAssertion; @@ -20,7 +19,6 @@ export async function getClientAssertion( const config: ClientAssertionConfig = { clientId: clientId, tokenEndpoint: tokenEndpoint, - claims: claims, }; return clientAssertion(config); } diff --git a/lib/msal-node/src/client/ManagedIdentityApplication.ts b/lib/msal-node/src/client/ManagedIdentityApplication.ts index 29e9c423d4..9b2353a427 100644 --- a/lib/msal-node/src/client/ManagedIdentityApplication.ts +++ b/lib/msal-node/src/client/ManagedIdentityApplication.ts @@ -130,7 +130,6 @@ export class ManagedIdentityApplication { } const managedIdentityRequest: ManagedIdentityRequest = { - claims: managedIdentityRequestParams.claims, forceRefresh: managedIdentityRequestParams.forceRefresh, resource: managedIdentityRequestParams.resource.replace( "/.default", @@ -144,7 +143,7 @@ export class ManagedIdentityApplication { }; if ( - managedIdentityRequest.claims || + managedIdentityRequestParams.claims || managedIdentityRequest.forceRefresh ) { // make a network call to the managed identity source diff --git a/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts b/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts index 461379c961..39d7a3e968 100644 --- a/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts +++ b/lib/msal-node/src/client/ManagedIdentitySources/BaseManagedIdentitySource.ts @@ -19,7 +19,6 @@ import { createClientAuthError, AuthenticationResult, UrlString, - AADServerParamKeys, } from "@azure/msal-common/node"; import { ManagedIdentityId } from "../../config/ManagedIdentityId.js"; import { ManagedIdentityRequestParameters } from "../../config/ManagedIdentityRequestParameters.js"; @@ -139,11 +138,6 @@ export abstract class BaseManagedIdentitySource { const networkRequestOptions: NetworkRequestOptions = { headers }; - if (managedIdentityRequest.claims) { - networkRequest.bodyParameters[AADServerParamKeys.CLAIMS] = - encodeURIComponent(managedIdentityRequest.claims); - } - if (Object.keys(networkRequest.bodyParameters).length) { networkRequestOptions.body = networkRequest.computeParametersBodyString(); diff --git a/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts b/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts index e8a2233d51..2e4318e3eb 100644 --- a/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts +++ b/lib/msal-node/test/client/ManagedIdentitySources/Imds.spec.ts @@ -32,7 +32,6 @@ import { ManagedIdentitySourceNames, } from "../../../src/utils/Constants"; import { - AADServerParamKeys, AccessTokenEntity, AuthenticationResult, CacheHelpers, @@ -551,11 +550,6 @@ describe("Acquires a token successfully via an IMDS Managed Identity", () => { }); test("ignores a cached token when claims are provided", async () => { - const sendGetRequestAsyncSpy: jest.SpyInstance = jest.spyOn( - networkClient, - "sendGetRequestAsync" - ); - let networkManagedIdentityResult: AuthenticationResult = await systemAssignedManagedIdentityApplication.acquireToken({ resource: MANAGED_IDENTITY_RESOURCE, @@ -581,15 +575,6 @@ describe("Acquires a token successfully via an IMDS Managed Identity", () => { resource: MANAGED_IDENTITY_RESOURCE, }); expect(networkManagedIdentityResult.fromCache).toBe(false); - - expect( - sendGetRequestAsyncSpy.mock.lastCall[1].body.includes( - `${AADServerParamKeys.CLAIMS}=${encodeURIComponent( - TEST_CONFIG.CLAIMS - )}` - ) - ).toBe(true); - expect(networkManagedIdentityResult.accessToken).toEqual( DEFAULT_SYSTEM_ASSIGNED_MANAGED_IDENTITY_AUTHENTICATION_RESULT.accessToken ); From 59989f40897ab6b6518ed88d8df9de6608a73a7d Mon Sep 17 00:00:00 2001 From: Robbie Ginsburg Date: Thu, 26 Sep 2024 15:40:07 -0400 Subject: [PATCH 15/15] fixed comment --- lib/msal-node/src/request/ManagedIdentityRequestParams.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msal-node/src/request/ManagedIdentityRequestParams.ts b/lib/msal-node/src/request/ManagedIdentityRequestParams.ts index c94e92bbb6..88cc1207a1 100644 --- a/lib/msal-node/src/request/ManagedIdentityRequestParams.ts +++ b/lib/msal-node/src/request/ManagedIdentityRequestParams.ts @@ -5,7 +5,7 @@ /** * ManagedIdentityRequest - * - claims - a stringified claims request which will be added to all /authorize and /token calls + * - claims - a stringified claims request which will be used to determine whether or not the cache should be skipped * - forceRefresh - forces managed identity requests to skip the cache and make network calls if true * - resource - resource requested to access the protected API. It should be of the form "{ResourceIdUri}" or {ResourceIdUri/.default}. For instance https://management.azure.net or, for Microsoft Graph, https://graph.microsoft.com/.default */