@azure/msal-common 14.15.0 → 14.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/AccountInfo.mjs +1 -1
- package/dist/account/AuthToken.mjs +1 -1
- package/dist/account/CcsCredential.mjs +1 -1
- package/dist/account/ClientInfo.mjs +1 -1
- package/dist/account/TokenClaims.mjs +1 -1
- package/dist/authority/Authority.mjs +1 -1
- package/dist/authority/AuthorityFactory.mjs +1 -1
- package/dist/authority/AuthorityMetadata.mjs +1 -1
- package/dist/authority/AuthorityOptions.mjs +1 -1
- package/dist/authority/AuthorityType.mjs +1 -1
- package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
- package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
- package/dist/authority/OpenIdConfigResponse.mjs +1 -1
- package/dist/authority/ProtocolMode.mjs +1 -1
- package/dist/authority/RegionDiscovery.mjs +1 -1
- package/dist/cache/CacheManager.d.ts +0 -5
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/CacheManager.mjs +1 -4
- package/dist/cache/CacheManager.mjs.map +1 -1
- package/dist/cache/entities/AccountEntity.mjs +1 -1
- package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
- package/dist/cache/utils/CacheHelpers.mjs +1 -1
- package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.mjs +24 -13
- package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
- package/dist/client/BaseClient.d.ts +10 -3
- package/dist/client/BaseClient.d.ts.map +1 -1
- package/dist/client/BaseClient.mjs +62 -10
- package/dist/client/BaseClient.mjs.map +1 -1
- package/dist/client/RefreshTokenClient.d.ts.map +1 -1
- package/dist/client/RefreshTokenClient.mjs +10 -4
- package/dist/client/RefreshTokenClient.mjs.map +1 -1
- package/dist/client/SilentFlowClient.mjs +1 -1
- package/dist/config/ClientConfiguration.d.ts +2 -0
- package/dist/config/ClientConfiguration.d.ts.map +1 -1
- package/dist/config/ClientConfiguration.mjs +1 -1
- package/dist/config/ClientConfiguration.mjs.map +1 -1
- package/dist/constants/AADServerParamKeys.d.ts +2 -0
- package/dist/constants/AADServerParamKeys.d.ts.map +1 -1
- package/dist/constants/AADServerParamKeys.mjs +5 -3
- package/dist/constants/AADServerParamKeys.mjs.map +1 -1
- package/dist/crypto/ICrypto.mjs +1 -1
- package/dist/crypto/JoseHeader.mjs +1 -1
- package/dist/crypto/PopTokenGenerator.mjs +1 -1
- package/dist/error/AuthError.mjs +1 -1
- package/dist/error/AuthErrorCodes.mjs +1 -1
- package/dist/error/CacheError.mjs +1 -1
- package/dist/error/CacheErrorCodes.mjs +1 -1
- package/dist/error/ClientAuthError.mjs +1 -1
- package/dist/error/ClientAuthErrorCodes.mjs +1 -1
- package/dist/error/ClientConfigurationError.mjs +1 -1
- package/dist/error/ClientConfigurationErrorCodes.mjs +1 -1
- package/dist/error/InteractionRequiredAuthError.mjs +1 -1
- package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
- package/dist/error/JoseHeaderError.mjs +1 -1
- package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
- package/dist/error/NetworkError.d.ts +19 -0
- package/dist/error/NetworkError.d.ts.map +1 -0
- package/dist/error/NetworkError.mjs +34 -0
- package/dist/error/NetworkError.mjs.map +1 -0
- package/dist/error/ServerError.mjs +1 -1
- package/dist/exports-common.d.ts +2 -1
- package/dist/exports-common.d.ts.map +1 -1
- package/dist/index-browser.mjs +2 -2
- package/dist/index-node.mjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/logger/Logger.mjs +1 -1
- package/dist/network/INetworkModule.d.ts +1 -1
- package/dist/network/INetworkModule.d.ts.map +1 -1
- package/dist/network/INetworkModule.mjs +1 -1
- package/dist/network/NetworkResponse.d.ts +6 -0
- package/dist/network/NetworkResponse.d.ts.map +1 -0
- package/dist/network/ThrottlingUtils.d.ts +1 -1
- package/dist/network/ThrottlingUtils.d.ts.map +1 -1
- package/dist/network/ThrottlingUtils.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/request/AuthenticationHeaderParser.mjs +1 -1
- package/dist/request/BaseAuthRequest.d.ts +2 -0
- package/dist/request/BaseAuthRequest.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.d.ts +8 -1
- package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.mjs +26 -3
- package/dist/request/RequestParameterBuilder.mjs.map +1 -1
- package/dist/request/RequestValidator.mjs +1 -1
- package/dist/request/ScopeSet.mjs +1 -1
- package/dist/response/ResponseHandler.mjs +1 -1
- package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceClient.mjs +29 -10
- package/dist/telemetry/performance/PerformanceClient.mjs.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.d.ts +9 -0
- package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs +6 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
- package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
- package/dist/url/UrlString.mjs +1 -1
- package/dist/utils/ClientAssertionUtils.mjs +1 -1
- package/dist/utils/Constants.d.ts +1 -0
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.mjs +2 -1
- package/dist/utils/Constants.mjs.map +1 -1
- package/dist/utils/FunctionWrappers.mjs +1 -1
- package/dist/utils/ProtocolUtils.mjs +1 -1
- package/dist/utils/StringUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/dist/utils/UrlUtils.mjs +1 -1
- package/lib/index-browser.cjs +33 -13
- package/lib/index-browser.cjs.map +1 -1
- package/lib/{index-node-aee3f7b6.js → index-node-C9XsExml.js} +268 -180
- package/lib/index-node-C9XsExml.js.map +1 -0
- package/lib/index-node.cjs +5 -4
- package/lib/index-node.cjs.map +1 -1
- package/lib/index.cjs +5 -4
- package/lib/index.cjs.map +1 -1
- package/lib/types/cache/CacheManager.d.ts +0 -5
- package/lib/types/cache/CacheManager.d.ts.map +1 -1
- package/lib/types/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/lib/types/client/BaseClient.d.ts +10 -3
- package/lib/types/client/BaseClient.d.ts.map +1 -1
- package/lib/types/client/RefreshTokenClient.d.ts.map +1 -1
- package/lib/types/config/ClientConfiguration.d.ts +2 -0
- package/lib/types/config/ClientConfiguration.d.ts.map +1 -1
- package/lib/types/constants/AADServerParamKeys.d.ts +2 -0
- package/lib/types/constants/AADServerParamKeys.d.ts.map +1 -1
- package/lib/types/error/NetworkError.d.ts +19 -0
- package/lib/types/error/NetworkError.d.ts.map +1 -0
- package/lib/types/exports-common.d.ts +2 -1
- package/lib/types/exports-common.d.ts.map +1 -1
- package/lib/types/network/INetworkModule.d.ts +1 -1
- package/lib/types/network/INetworkModule.d.ts.map +1 -1
- package/lib/types/network/NetworkResponse.d.ts +6 -0
- package/lib/types/network/NetworkResponse.d.ts.map +1 -0
- package/lib/types/network/ThrottlingUtils.d.ts +1 -1
- package/lib/types/network/ThrottlingUtils.d.ts.map +1 -1
- package/lib/types/packageMetadata.d.ts +1 -1
- package/lib/types/request/BaseAuthRequest.d.ts +2 -0
- package/lib/types/request/BaseAuthRequest.d.ts.map +1 -1
- package/lib/types/request/RequestParameterBuilder.d.ts +8 -1
- package/lib/types/request/RequestParameterBuilder.d.ts.map +1 -1
- package/lib/types/telemetry/performance/PerformanceClient.d.ts.map +1 -1
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts +9 -0
- package/lib/types/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/lib/types/utils/Constants.d.ts +1 -0
- package/lib/types/utils/Constants.d.ts.map +1 -1
- package/package.json +2 -4
- package/src/authority/RegionDiscovery.ts +1 -1
- package/src/cache/CacheManager.ts +0 -8
- package/src/client/AuthorizationCodeClient.ts +37 -16
- package/src/client/BaseClient.ts +104 -22
- package/src/client/RefreshTokenClient.ts +14 -5
- package/src/config/ClientConfiguration.ts +2 -0
- package/src/constants/AADServerParamKeys.ts +2 -0
- package/src/error/NetworkError.ts +44 -0
- package/src/exports-common.ts +2 -5
- package/src/network/INetworkModule.ts +1 -1
- package/src/network/NetworkResponse.ts +10 -0
- package/src/network/ThrottlingUtils.ts +1 -1
- package/src/packageMetadata.ts +1 -1
- package/src/request/BaseAuthRequest.ts +2 -0
- package/src/request/RequestParameterBuilder.ts +51 -1
- package/src/telemetry/performance/PerformanceClient.ts +42 -12
- package/src/telemetry/performance/PerformanceEvent.ts +15 -0
- package/src/utils/Constants.ts +1 -0
- package/dist/network/NetworkManager.d.ts +0 -34
- package/dist/network/NetworkManager.d.ts.map +0 -1
- package/dist/network/NetworkManager.mjs +0 -44
- package/dist/network/NetworkManager.mjs.map +0 -1
- package/lib/index-node-aee3f7b6.js.map +0 -1
- package/lib/types/network/NetworkManager.d.ts +0 -34
- package/lib/types/network/NetworkManager.d.ts.map +0 -1
- package/src/network/NetworkManager.ts +0 -76
|
@@ -116,6 +116,7 @@ export const PerformanceEvents = {
|
|
|
116
116
|
/**
|
|
117
117
|
* Time spent sending/waiting for the response of a request to the token endpoint
|
|
118
118
|
*/
|
|
119
|
+
NetworkClientSendPostRequestAsync: "networkClientSendPostRequestAsync",
|
|
119
120
|
RefreshTokenClientExecutePostToTokenEndpoint:
|
|
120
121
|
"refreshTokenClientExecutePostToTokenEndpoint",
|
|
121
122
|
AuthorizationCodeClientExecutePostToTokenEndpoint:
|
|
@@ -342,6 +343,10 @@ export const PerformanceEventAbbreviations: ReadonlyMap<string, string> =
|
|
|
342
343
|
PerformanceEvents.BaseClientCreateTokenRequestHeaders,
|
|
343
344
|
"BaseClientCreateTReqHead",
|
|
344
345
|
],
|
|
346
|
+
[
|
|
347
|
+
PerformanceEvents.NetworkClientSendPostRequestAsync,
|
|
348
|
+
"NetClientSendPost",
|
|
349
|
+
],
|
|
345
350
|
[
|
|
346
351
|
PerformanceEvents.RefreshTokenClientExecutePostToTokenEndpoint,
|
|
347
352
|
"RTClientExecPost",
|
|
@@ -790,7 +795,14 @@ export type PerformanceEvent = {
|
|
|
790
795
|
matsSilentStatus?: number;
|
|
791
796
|
matsHttpStatus?: number;
|
|
792
797
|
matsHttpEventCount?: number;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Http POST metadata
|
|
801
|
+
*/
|
|
793
802
|
httpVerToken?: string;
|
|
803
|
+
httpStatus?: number;
|
|
804
|
+
contentTypeHeader?: string;
|
|
805
|
+
contentLengthHeader?: string;
|
|
794
806
|
|
|
795
807
|
/**
|
|
796
808
|
* Native broker fields
|
|
@@ -834,6 +846,9 @@ export type PerformanceEvent = {
|
|
|
834
846
|
* @type {string}
|
|
835
847
|
*/
|
|
836
848
|
retryError?: string;
|
|
849
|
+
|
|
850
|
+
embeddedClientId?: string;
|
|
851
|
+
embeddedRedirectUri?: string;
|
|
837
852
|
};
|
|
838
853
|
|
|
839
854
|
export type PerformanceEventContext = {
|
package/src/utils/Constants.ts
CHANGED
|
@@ -99,6 +99,7 @@ export const OIDC_SCOPES = [...OIDC_DEFAULT_SCOPES, Constants.EMAIL_SCOPE];
|
|
|
99
99
|
*/
|
|
100
100
|
export const HeaderNames = {
|
|
101
101
|
CONTENT_TYPE: "Content-Type",
|
|
102
|
+
CONTENT_LENGTH: "Content-Length",
|
|
102
103
|
RETRY_AFTER: "Retry-After",
|
|
103
104
|
CCS_HEADER: "X-AnchorMailbox",
|
|
104
105
|
WWWAuthenticate: "WWW-Authenticate",
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { INetworkModule, NetworkRequestOptions } from "./INetworkModule.js";
|
|
2
|
-
import { RequestThumbprint } from "./RequestThumbprint.js";
|
|
3
|
-
import { CacheManager } from "../cache/CacheManager.js";
|
|
4
|
-
import { ServerAuthorizationTokenResponse } from "../response/ServerAuthorizationTokenResponse.js";
|
|
5
|
-
export type NetworkResponse<T> = {
|
|
6
|
-
headers: Record<string, string>;
|
|
7
|
-
body: T;
|
|
8
|
-
status: number;
|
|
9
|
-
};
|
|
10
|
-
export type UrlToHttpRequestOptions = {
|
|
11
|
-
protocol: string;
|
|
12
|
-
hostname: string;
|
|
13
|
-
hash: string;
|
|
14
|
-
search: string;
|
|
15
|
-
pathname: string;
|
|
16
|
-
path: string;
|
|
17
|
-
href: string;
|
|
18
|
-
port?: number;
|
|
19
|
-
auth?: string;
|
|
20
|
-
};
|
|
21
|
-
/** @internal */
|
|
22
|
-
export declare class NetworkManager {
|
|
23
|
-
private networkClient;
|
|
24
|
-
private cacheManager;
|
|
25
|
-
constructor(networkClient: INetworkModule, cacheManager: CacheManager);
|
|
26
|
-
/**
|
|
27
|
-
* Wraps sendPostRequestAsync with necessary preflight and postflight logic
|
|
28
|
-
* @param thumbprint
|
|
29
|
-
* @param tokenEndpoint
|
|
30
|
-
* @param options
|
|
31
|
-
*/
|
|
32
|
-
sendPostRequest<T extends ServerAuthorizationTokenResponse>(thumbprint: RequestThumbprint, tokenEndpoint: string, options: NetworkRequestOptions): Promise<NetworkResponse<T>>;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=NetworkManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkManager.d.ts","sourceRoot":"","sources":["../../src/network/NetworkManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMxD,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AAEnG,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,gBAAgB;AAChB,qBAAa,cAAc;IACvB,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,YAAY,CAAe;gBAEvB,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY;IAKrE;;;;;OAKG;IACG,eAAe,CAAC,CAAC,SAAS,gCAAgC,EAC5D,UAAU,EAAE,iBAAiB,EAC7B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,qBAAqB,GAC/B,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;CAqBjC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/*! @azure/msal-common v14.15.0 2024-09-20 */
|
|
2
|
-
'use strict';
|
|
3
|
-
import { ThrottlingUtils } from './ThrottlingUtils.mjs';
|
|
4
|
-
import { AuthError } from '../error/AuthError.mjs';
|
|
5
|
-
import { createClientAuthError } from '../error/ClientAuthError.mjs';
|
|
6
|
-
import { networkError } from '../error/ClientAuthErrorCodes.mjs';
|
|
7
|
-
|
|
8
|
-
/*
|
|
9
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10
|
-
* Licensed under the MIT License.
|
|
11
|
-
*/
|
|
12
|
-
/** @internal */
|
|
13
|
-
class NetworkManager {
|
|
14
|
-
constructor(networkClient, cacheManager) {
|
|
15
|
-
this.networkClient = networkClient;
|
|
16
|
-
this.cacheManager = cacheManager;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Wraps sendPostRequestAsync with necessary preflight and postflight logic
|
|
20
|
-
* @param thumbprint
|
|
21
|
-
* @param tokenEndpoint
|
|
22
|
-
* @param options
|
|
23
|
-
*/
|
|
24
|
-
async sendPostRequest(thumbprint, tokenEndpoint, options) {
|
|
25
|
-
ThrottlingUtils.preProcess(this.cacheManager, thumbprint);
|
|
26
|
-
let response;
|
|
27
|
-
try {
|
|
28
|
-
response = await this.networkClient.sendPostRequestAsync(tokenEndpoint, options);
|
|
29
|
-
}
|
|
30
|
-
catch (e) {
|
|
31
|
-
if (e instanceof AuthError) {
|
|
32
|
-
throw e;
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
throw createClientAuthError(networkError);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
ThrottlingUtils.postProcess(this.cacheManager, thumbprint, response);
|
|
39
|
-
return response;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { NetworkManager };
|
|
44
|
-
//# sourceMappingURL=NetworkManager.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkManager.mjs","sources":["../../src/network/NetworkManager.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.networkError"],"mappings":";;;;;;;AAAA;;;AAGG;AA+BH;MACa,cAAc,CAAA;IAIvB,WAAY,CAAA,aAA6B,EAAE,YAA0B,EAAA;AACjE,QAAA,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;AACnC,QAAA,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;KACpC;AAED;;;;;AAKG;AACH,IAAA,MAAM,eAAe,CACjB,UAA6B,EAC7B,aAAqB,EACrB,OAA8B,EAAA;QAE9B,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1D,QAAA,IAAI,QAAQ,CAAC;QACb,IAAI;AACA,YAAA,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,oBAAoB,CACpD,aAAa,EACb,OAAO,CACV,CAAC;AACL,SAAA;AAAC,QAAA,OAAO,CAAC,EAAE;YACR,IAAI,CAAC,YAAY,SAAS,EAAE;AACxB,gBAAA,MAAM,CAAC,CAAC;AACX,aAAA;AAAM,iBAAA;AACH,gBAAA,MAAM,qBAAqB,CAACA,YAAiC,CAAC,CAAC;AAClE,aAAA;AACJ,SAAA;QAED,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AAErE,QAAA,OAAO,QAAQ,CAAC;KACnB;AACJ;;;;"}
|