@azure/msal-common 14.0.3 → 14.1.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.d.ts +0 -1
- package/dist/account/AccountInfo.d.ts.map +1 -1
- package/dist/account/AuthToken.d.ts.map +1 -1
- package/dist/account/AuthToken.mjs +7 -6
- package/dist/account/AuthToken.mjs.map +1 -1
- package/dist/account/CcsCredential.mjs +1 -1
- package/dist/account/ClientInfo.d.ts.map +1 -1
- package/dist/account/ClientInfo.mjs +6 -5
- package/dist/account/ClientInfo.mjs.map +1 -1
- package/dist/authority/Authority.d.ts.map +1 -1
- package/dist/authority/Authority.mjs +28 -50
- package/dist/authority/Authority.mjs.map +1 -1
- package/dist/authority/AuthorityFactory.d.ts.map +1 -1
- package/dist/authority/AuthorityFactory.mjs +9 -7
- package/dist/authority/AuthorityFactory.mjs.map +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.d.ts +3 -1
- package/dist/authority/RegionDiscovery.d.ts.map +1 -1
- package/dist/authority/RegionDiscovery.mjs +7 -8
- package/dist/authority/RegionDiscovery.mjs.map +1 -1
- package/dist/cache/CacheManager.d.ts +25 -7
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/CacheManager.mjs +98 -71
- package/dist/cache/CacheManager.mjs.map +1 -1
- package/dist/cache/entities/AccessTokenEntity.d.ts.map +1 -1
- package/dist/cache/entities/AccessTokenEntity.mjs +4 -3
- package/dist/cache/entities/AccessTokenEntity.mjs.map +1 -1
- package/dist/cache/entities/AccountEntity.d.ts.map +1 -1
- package/dist/cache/entities/AccountEntity.mjs +4 -3
- package/dist/cache/entities/AccountEntity.mjs.map +1 -1
- package/dist/cache/entities/AppMetadataEntity.mjs +1 -1
- package/dist/cache/entities/AuthorityMetadataEntity.mjs +1 -1
- package/dist/cache/entities/CacheRecord.mjs +1 -1
- package/dist/cache/entities/CredentialEntity.d.ts.map +1 -1
- package/dist/cache/entities/CredentialEntity.mjs +4 -3
- package/dist/cache/entities/CredentialEntity.mjs.map +1 -1
- package/dist/cache/entities/IdTokenEntity.mjs +1 -1
- package/dist/cache/entities/RefreshTokenEntity.mjs +1 -1
- package/dist/cache/entities/ServerTelemetryEntity.mjs +1 -1
- package/dist/cache/entities/ThrottlingEntity.mjs +1 -1
- package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
- package/dist/cache/utils/CacheTypes.d.ts +3 -6
- package/dist/cache/utils/CacheTypes.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.d.ts.map +1 -1
- package/dist/client/AuthorizationCodeClient.mjs +13 -11
- package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
- package/dist/client/BaseClient.d.ts.map +1 -1
- package/dist/client/BaseClient.mjs +5 -4
- package/dist/client/BaseClient.mjs.map +1 -1
- package/dist/client/RefreshTokenClient.d.ts.map +1 -1
- package/dist/client/RefreshTokenClient.mjs +33 -74
- package/dist/client/RefreshTokenClient.mjs.map +1 -1
- package/dist/client/SilentFlowClient.d.ts +2 -1
- package/dist/client/SilentFlowClient.d.ts.map +1 -1
- package/dist/client/SilentFlowClient.mjs +43 -19
- package/dist/client/SilentFlowClient.mjs.map +1 -1
- package/dist/config/ClientConfiguration.d.ts.map +1 -1
- package/dist/config/ClientConfiguration.mjs +5 -6
- package/dist/config/ClientConfiguration.mjs.map +1 -1
- package/dist/crypto/ICrypto.d.ts +0 -4
- package/dist/crypto/ICrypto.d.ts.map +1 -1
- package/dist/crypto/ICrypto.mjs +11 -22
- package/dist/crypto/ICrypto.mjs.map +1 -1
- package/dist/crypto/JoseHeader.d.ts.map +1 -1
- package/dist/crypto/JoseHeader.mjs +5 -4
- package/dist/crypto/JoseHeader.mjs.map +1 -1
- package/dist/crypto/PopTokenGenerator.d.ts +2 -1
- package/dist/crypto/PopTokenGenerator.d.ts.map +1 -1
- package/dist/crypto/PopTokenGenerator.mjs +4 -4
- package/dist/crypto/PopTokenGenerator.mjs.map +1 -1
- package/dist/error/AuthError.d.ts +8 -11
- package/dist/error/AuthError.d.ts.map +1 -1
- package/dist/error/AuthError.mjs +19 -21
- package/dist/error/AuthError.mjs.map +1 -1
- package/dist/error/AuthErrorCodes.d.ts +6 -0
- package/dist/error/AuthErrorCodes.d.ts.map +1 -0
- package/dist/error/AuthErrorCodes.mjs +14 -0
- package/dist/error/AuthErrorCodes.mjs.map +1 -0
- package/dist/error/ClientAuthError.d.ts +54 -234
- package/dist/error/ClientAuthError.d.ts.map +1 -1
- package/dist/error/ClientAuthError.mjs +149 -421
- package/dist/error/ClientAuthError.mjs.map +1 -1
- package/dist/error/ClientAuthErrorCodes.d.ts +44 -0
- package/dist/error/ClientAuthErrorCodes.d.ts.map +1 -0
- package/dist/error/ClientAuthErrorCodes.mjs +52 -0
- package/dist/error/ClientAuthErrorCodes.mjs.map +1 -0
- package/dist/error/ClientConfigurationError.d.ts +31 -125
- package/dist/error/ClientConfigurationError.d.ts.map +1 -1
- package/dist/error/ClientConfigurationError.mjs +81 -222
- package/dist/error/ClientConfigurationError.mjs.map +1 -1
- package/dist/error/ClientConfigurationErrorCodes.d.ts +23 -0
- package/dist/error/ClientConfigurationErrorCodes.d.ts.map +1 -0
- package/dist/error/ClientConfigurationErrorCodes.mjs +31 -0
- package/dist/error/ClientConfigurationErrorCodes.mjs.map +1 -0
- package/dist/error/InteractionRequiredAuthError.d.ts +14 -16
- package/dist/error/InteractionRequiredAuthError.d.ts.map +1 -1
- package/dist/error/InteractionRequiredAuthError.mjs +42 -41
- package/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
- package/dist/error/InteractionRequiredAuthErrorCodes.d.ts +6 -0
- package/dist/error/InteractionRequiredAuthErrorCodes.d.ts.map +1 -0
- package/dist/error/InteractionRequiredAuthErrorCodes.mjs +16 -0
- package/dist/error/InteractionRequiredAuthErrorCodes.mjs.map +1 -0
- package/dist/error/JoseHeaderError.d.ts +7 -20
- package/dist/error/JoseHeaderError.d.ts.map +1 -1
- package/dist/error/JoseHeaderError.mjs +10 -26
- package/dist/error/JoseHeaderError.mjs.map +1 -1
- package/dist/error/JoseHeaderErrorCodes.d.ts +3 -0
- package/dist/error/JoseHeaderErrorCodes.d.ts.map +1 -0
- package/dist/error/JoseHeaderErrorCodes.mjs +11 -0
- package/dist/error/JoseHeaderErrorCodes.mjs.map +1 -0
- package/dist/error/ServerError.mjs +1 -1
- package/dist/index.cjs +942 -1210
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +13 -5
- package/dist/index.mjs.map +1 -1
- package/dist/logger/Logger.mjs +1 -1
- package/dist/network/INetworkModule.d.ts.map +1 -1
- package/dist/network/INetworkModule.mjs +5 -6
- package/dist/network/INetworkModule.mjs.map +1 -1
- package/dist/network/NetworkManager.d.ts.map +1 -1
- package/dist/network/NetworkManager.mjs +4 -3
- package/dist/network/NetworkManager.mjs.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.d.ts.map +1 -1
- package/dist/request/AuthenticationHeaderParser.mjs +7 -6
- package/dist/request/AuthenticationHeaderParser.mjs.map +1 -1
- package/dist/request/CommonRefreshTokenRequest.d.ts +3 -0
- package/dist/request/CommonRefreshTokenRequest.d.ts.map +1 -1
- package/dist/request/CommonSilentFlowRequest.d.ts +2 -0
- package/dist/request/CommonSilentFlowRequest.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.d.ts.map +1 -1
- package/dist/request/RequestParameterBuilder.mjs +5 -4
- package/dist/request/RequestParameterBuilder.mjs.map +1 -1
- package/dist/request/RequestValidator.d.ts.map +1 -1
- package/dist/request/RequestValidator.mjs +8 -7
- package/dist/request/RequestValidator.mjs.map +1 -1
- package/dist/request/ScopeSet.d.ts.map +1 -1
- package/dist/request/ScopeSet.mjs +10 -8
- package/dist/request/ScopeSet.mjs.map +1 -1
- package/dist/response/ResponseHandler.d.ts.map +1 -1
- package/dist/response/ResponseHandler.mjs +15 -14
- package/dist/response/ResponseHandler.mjs.map +1 -1
- package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceClient.mjs +3 -2
- package/dist/telemetry/performance/PerformanceClient.mjs.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.d.ts +8 -0
- package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs +9 -1
- package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
- package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.d.ts.map +1 -1
- package/dist/telemetry/server/ServerTelemetryManager.mjs +2 -2
- package/dist/telemetry/server/ServerTelemetryManager.mjs.map +1 -1
- package/dist/url/UrlString.d.ts.map +1 -1
- package/dist/url/UrlString.mjs +13 -11
- package/dist/url/UrlString.mjs.map +1 -1
- package/dist/utils/Constants.d.ts +6 -3
- package/dist/utils/Constants.d.ts.map +1 -1
- package/dist/utils/Constants.mjs +12 -4
- package/dist/utils/Constants.mjs.map +1 -1
- package/dist/utils/FunctionWrappers.d.ts.map +1 -1
- package/dist/utils/FunctionWrappers.mjs +1 -2
- package/dist/utils/FunctionWrappers.mjs.map +1 -1
- package/dist/utils/ProtocolUtils.d.ts.map +1 -1
- package/dist/utils/ProtocolUtils.mjs +7 -6
- package/dist/utils/ProtocolUtils.mjs.map +1 -1
- package/dist/utils/StringUtils.mjs +1 -1
- package/dist/utils/TimeUtils.mjs +1 -1
- package/package.json +1 -1
- package/src/account/AccountInfo.ts +0 -1
- package/src/account/AuthToken.ts +8 -7
- package/src/account/ClientInfo.ts +9 -6
- package/src/authority/Authority.ts +76 -94
- package/src/authority/AuthorityFactory.ts +21 -9
- package/src/authority/RegionDiscovery.ts +21 -18
- package/src/cache/CacheManager.ts +133 -95
- package/src/cache/entities/AccessTokenEntity.ts +7 -2
- package/src/cache/entities/AccountEntity.ts +7 -2
- package/src/cache/entities/CredentialEntity.ts +7 -2
- package/src/cache/utils/CacheTypes.ts +6 -6
- package/src/client/AuthorizationCodeClient.ts +35 -11
- package/src/client/BaseClient.ts +7 -4
- package/src/client/RefreshTokenClient.ts +100 -126
- package/src/client/SilentFlowClient.ts +72 -19
- package/src/config/ClientConfiguration.ts +6 -7
- package/src/crypto/ICrypto.ts +12 -34
- package/src/crypto/JoseHeader.ts +6 -3
- package/src/crypto/PopTokenGenerator.ts +10 -5
- package/src/error/AuthError.ts +24 -26
- package/src/error/AuthErrorCodes.ts +10 -0
- package/src/error/ClientAuthError.ts +227 -632
- package/src/error/ClientAuthErrorCodes.ts +51 -0
- package/src/error/ClientConfigurationError.ts +146 -332
- package/src/error/ClientConfigurationErrorCodes.ts +28 -0
- package/src/error/InteractionRequiredAuthError.ts +60 -55
- package/src/error/InteractionRequiredAuthErrorCodes.ts +13 -0
- package/src/error/JoseHeaderError.ts +11 -31
- package/src/error/JoseHeaderErrorCodes.ts +7 -0
- package/src/index.ts +13 -1
- package/src/network/INetworkModule.ts +10 -7
- package/src/network/NetworkManager.ts +5 -5
- package/src/packageMetadata.ts +1 -1
- package/src/request/AuthenticationHeaderParser.ts +11 -8
- package/src/request/CommonRefreshTokenRequest.ts +3 -0
- package/src/request/CommonSilentFlowRequest.ts +2 -0
- package/src/request/RequestParameterBuilder.ts +10 -3
- package/src/request/RequestValidator.ts +19 -6
- package/src/request/ScopeSet.ts +23 -7
- package/src/response/ResponseHandler.ts +37 -17
- package/src/telemetry/performance/PerformanceClient.ts +2 -1
- package/src/telemetry/performance/PerformanceEvent.ts +9 -0
- package/src/telemetry/server/ServerTelemetryManager.ts +1 -1
- package/src/url/UrlString.ts +26 -16
- package/src/utils/Constants.ts +11 -3
- package/src/utils/FunctionWrappers.ts +0 -1
- package/src/utils/ProtocolUtils.ts +8 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../src/utils/Constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;CAQb,CAAC;AACX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEtE,eAAO,MAAM,mBAAmB,UAI/B,CAAC;AAEF,eAAO,MAAM,WAAW,UAAkD,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;CAQd,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;CAQtB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAC3B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC;AACX,MAAM,MAAM,qBAAqB,GAC7B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDrB,CAAC;AACX,MAAM,MAAM,kBAAkB,GAC1B,CAAC,OAAO,kBAAkB,CAAC,CAAC,MA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H,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC;AACX,MAAM,MAAM,sBAAsB,GAC9B,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;CAM1B,CAAC;AACX,MAAM,MAAM,uBAAuB,GAC/B,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;CAWf,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE5E,eAAO,MAAM,SAAS;;;;CAIZ,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEnE,eAAO,MAAM,aAAa,WAAW,CAAC"}
|
package/dist/utils/Constants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-common v14.0
|
|
1
|
+
/*! @azure/msal-common v14.1.0 2023-10-05 */
|
|
2
2
|
'use strict';
|
|
3
3
|
/*
|
|
4
4
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -355,12 +355,20 @@ const RegionDiscoveryOutcomes = {
|
|
|
355
355
|
AUTO_DETECTION_REQUESTED_SUCCESSFUL: "4",
|
|
356
356
|
AUTO_DETECTION_REQUESTED_FAILED: "5",
|
|
357
357
|
};
|
|
358
|
+
/**
|
|
359
|
+
* Specifies the reason for fetching the access token from the identity provider
|
|
360
|
+
*/
|
|
358
361
|
const CacheOutcome = {
|
|
359
|
-
|
|
360
|
-
|
|
362
|
+
// When a token is found in the cache or the cache is not supposed to be hit when making the request
|
|
363
|
+
NOT_APPLICABLE: "0",
|
|
364
|
+
// When the token request goes to the identity provider because force_refresh was set to true. Also occurs if claims were requested
|
|
365
|
+
FORCE_REFRESH_OR_CLAIMS: "1",
|
|
366
|
+
// When the token request goes to the identity provider because no cached access token exists
|
|
361
367
|
NO_CACHED_ACCESS_TOKEN: "2",
|
|
368
|
+
// When the token request goes to the identity provider because cached access token expired
|
|
362
369
|
CACHED_ACCESS_TOKEN_EXPIRED: "3",
|
|
363
|
-
|
|
370
|
+
// When the token request goes to the identity provider because refresh_in was used and the existing token needs to be refreshed
|
|
371
|
+
PROACTIVELY_REFRESHED: "4",
|
|
364
372
|
};
|
|
365
373
|
const JsonTypes = {
|
|
366
374
|
Jwt: "JWT",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.mjs","sources":["../../src/utils/Constants.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2DE,WAAA,EAAA,aAAA;AAEF,IAAA;;;;;;;;IAQW,kCAAA,EAAA,uBAAA;AACX,IAAA,mBAAyB,EAAA;AAEzB,QAAO,2BAAyB;AAMhC,QAAO,mBAAiB;AAExB,QAAA,qBAAA;;AAEG,KAAA;AACH,IAAA,mBAAwB,EAAA,OAAA;;;;;;;;IAQb,QAAA,EAAA,GAAA;AACX,IAAA,wBAAkC,EAAA,GAAA;AAElC,IAAA,sBAAA,EAAA,GAAA;;AAEG,IAAA,sBAAA,EAAA,GAAA;AACH,EAAA;;;;;;;;;AASA;AAGA,MAAA,WAAA,GAAA;;AAEG,IAAA,WAAA,EAAA,aAAA;AACH,IAAA,UAAA,mBAAkC;;;;IAIvB,iBAAA,EAAA,cAAA;AACX,EAAA;AAGA;;AAEG;AACH,MAAA,mBAA+B,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiDpB,mBAAA,EAAA,yBAAA;AACX,IAAA,mBAAY,EAAA,qBACA;AAEZ,IAAA,UAAA,EAAA,YAAA;;AAEG,IAAA,eAAA,EAAA,0BAAA;AACH,IAA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AAgC,EAAA,GAAA;AAEhC;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionWrappers.d.ts","sourceRoot":"","sources":["../../src/utils/FunctionWrappers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAEjF;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,MAAM,+DAEJ,MAAM,UACT,MAAM,oBACI,kBAAkB,kBACpB,MAAM,
|
|
1
|
+
{"version":3,"file":"FunctionWrappers.d.ts","sourceRoot":"","sources":["../../src/utils/FunctionWrappers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AAEjF;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,MAAM,+DAEJ,MAAM,UACT,MAAM,oBACI,kBAAkB,kBACpB,MAAM,sBA4BzB,CAAC;AAEF;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,WAAW,wEAET,MAAM,UACT,MAAM,oBACI,kBAAkB,kBACpB,MAAM,+BA8BzB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-common v14.0
|
|
1
|
+
/*! @azure/msal-common v14.1.0 2023-10-05 */
|
|
2
2
|
'use strict';
|
|
3
3
|
/*
|
|
4
4
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -20,7 +20,6 @@ const invoke = (callback, eventName, logger, telemetryClient, correlationId) =>
|
|
|
20
20
|
return (...args) => {
|
|
21
21
|
logger.trace(`Executing function ${eventName}`);
|
|
22
22
|
const inProgressEvent = telemetryClient?.startMeasurement(eventName, correlationId);
|
|
23
|
-
telemetryClient?.setPreQueueTime(eventName, correlationId);
|
|
24
23
|
try {
|
|
25
24
|
const result = callback(...args);
|
|
26
25
|
inProgressEvent?.end({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionWrappers.mjs","sources":["../../src/utils/FunctionWrappers.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAKA;AACA;AAEA;;;;;;;;;;AAUG;AAEH;
|
|
1
|
+
{"version":3,"file":"FunctionWrappers.mjs","sources":["../../src/utils/FunctionWrappers.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAKA;AACA;AAEA;;;;;;;;;;AAUG;AAEH;AAmCA;;;;;;;;;;;AAWG,YAAA,MAAA,CAAA,KAAA,CAAA,CAAA,sBAAA,EAAA,SAAA,CAAA,CAAA,CAAA,CAAA;AAEH,YAAO,OAAA,MAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProtocolUtils.d.ts","sourceRoot":"","sources":["../../src/utils/ProtocolUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProtocolUtils.d.ts","sourceRoot":"","sources":["../../src/utils/ProtocolUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAM5C;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,kBAAkB,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,qBAAa,aAAa;IACtB;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAClB,SAAS,EAAE,OAAO,EAClB,SAAS,CAAC,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM;IAUT;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CACvB,SAAS,EAAE,OAAO,EAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM;IAmBT;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CACpB,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,MAAM,GACd,kBAAkB;CA6BxB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
/*! @azure/msal-common v14.0
|
|
1
|
+
/*! @azure/msal-common v14.1.0 2023-10-05 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { Constants } from './Constants.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { createClientAuthError } from '../error/ClientAuthError.mjs';
|
|
5
|
+
import { noCryptoObject, invalidState } from '../error/ClientAuthErrorCodes.mjs';
|
|
5
6
|
|
|
6
7
|
/*
|
|
7
8
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -29,7 +30,7 @@ class ProtocolUtils {
|
|
|
29
30
|
*/
|
|
30
31
|
static generateLibraryState(cryptoObj, meta) {
|
|
31
32
|
if (!cryptoObj) {
|
|
32
|
-
throw
|
|
33
|
+
throw createClientAuthError(noCryptoObject);
|
|
33
34
|
}
|
|
34
35
|
// Create a state object containing a unique id and the timestamp of the request creation
|
|
35
36
|
const stateObj = {
|
|
@@ -48,10 +49,10 @@ class ProtocolUtils {
|
|
|
48
49
|
*/
|
|
49
50
|
static parseRequestState(cryptoObj, state) {
|
|
50
51
|
if (!cryptoObj) {
|
|
51
|
-
throw
|
|
52
|
+
throw createClientAuthError(noCryptoObject);
|
|
52
53
|
}
|
|
53
54
|
if (!state) {
|
|
54
|
-
throw
|
|
55
|
+
throw createClientAuthError(invalidState);
|
|
55
56
|
}
|
|
56
57
|
try {
|
|
57
58
|
// Split the state between library state and user passed state and decode them separately
|
|
@@ -68,7 +69,7 @@ class ProtocolUtils {
|
|
|
68
69
|
};
|
|
69
70
|
}
|
|
70
71
|
catch (e) {
|
|
71
|
-
throw
|
|
72
|
+
throw createClientAuthError(invalidState);
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProtocolUtils.mjs","sources":["../../src/utils/ProtocolUtils.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProtocolUtils.mjs","sources":["../../src/utils/ProtocolUtils.ts"],"sourcesContent":[null],"names":["ClientAuthErrorCodes.noCryptoObject"],"mappings":";;;;;;AAMA;AAMA;;;;AAMG;AACH;AACM,mBAAS,CAAA;;;AAIf;;AAEG;AACH,IAAM,OAAA,yBAA2B,EAAA,SAAA,EAAA,IAAA,EAAA;QACb,MAAA,eAAS,aAAA,CAAA,oBAAA,CAAA,SAAA,EAAA,IAAA,CAAA,CAAA;QACb,OAAA;cACd,CAAA,EAAA,YAAA,CAAA,EAAA,SAAA,CAAA,cAAA,CAAA,EAAA,SAAA,CAAA,CAAA;AAEF,cAAA,YAAA,CAAA;;AAEG;AACH;AACI;;;;AAIG,QAAA,IAAA,CAAA,SAAA,EAAA;uCAEmB,CAAAA,cAEL,CAAA,CAAA;AAWjB,SAAA;;;;AAIG,SAAA,CAAA;AACH,QAAA,IAA2B,IAAA,EAAA;AAsB3B,YAAA,QAAA,CAAA,IAAA,GAAA,IAAA,CAAA;;;;AAIG,KAAA;;AAiCN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/utils/TimeUtils.mjs
CHANGED
package/package.json
CHANGED
|
@@ -14,7 +14,6 @@ import { TokenClaims } from "./TokenClaims";
|
|
|
14
14
|
* - name - Full name for the account, including given name and family name
|
|
15
15
|
* - idToken - raw ID token
|
|
16
16
|
* - idTokenClaims - Object contains claims from ID token
|
|
17
|
-
* - localAccountId - The user's account ID
|
|
18
17
|
* - nativeAccountId - The user's native account ID
|
|
19
18
|
*/
|
|
20
19
|
export type AccountInfo = {
|
package/src/account/AuthToken.ts
CHANGED
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { TokenClaims } from "./TokenClaims";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
createClientAuthError,
|
|
9
|
+
ClientAuthErrorCodes,
|
|
10
|
+
} from "../error/ClientAuthError";
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
13
|
* Extract token by decoding the rawToken
|
|
@@ -23,7 +26,7 @@ export function extractTokenClaims(
|
|
|
23
26
|
const base64Decoded = base64Decode(jswPayload);
|
|
24
27
|
return JSON.parse(base64Decoded) as TokenClaims;
|
|
25
28
|
} catch (err) {
|
|
26
|
-
throw
|
|
29
|
+
throw createClientAuthError(ClientAuthErrorCodes.tokenParsingError);
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
|
|
@@ -34,14 +37,12 @@ export function extractTokenClaims(
|
|
|
34
37
|
*/
|
|
35
38
|
export function getJWSPayload(authToken: string): string {
|
|
36
39
|
if (!authToken) {
|
|
37
|
-
throw
|
|
40
|
+
throw createClientAuthError(ClientAuthErrorCodes.nullOrEmptyToken);
|
|
38
41
|
}
|
|
39
42
|
const tokenPartsRegex = /^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/;
|
|
40
43
|
const matches = tokenPartsRegex.exec(authToken);
|
|
41
44
|
if (!matches || matches.length < 4) {
|
|
42
|
-
throw
|
|
43
|
-
`Given token is malformed: ${JSON.stringify(authToken)}`
|
|
44
|
-
);
|
|
45
|
+
throw createClientAuthError(ClientAuthErrorCodes.tokenParsingError);
|
|
45
46
|
}
|
|
46
47
|
/**
|
|
47
48
|
* const crackedToken = {
|
|
@@ -65,6 +66,6 @@ export function checkMaxAge(authTime: number, maxAge: number): void {
|
|
|
65
66
|
*/
|
|
66
67
|
const fiveMinuteSkew = 300000; // five minutes in milliseconds
|
|
67
68
|
if (maxAge === 0 || Date.now() - fiveMinuteSkew > authTime + maxAge) {
|
|
68
|
-
throw
|
|
69
|
+
throw createClientAuthError(ClientAuthErrorCodes.maxAgeTranspired);
|
|
69
70
|
}
|
|
70
71
|
}
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
createClientAuthError,
|
|
8
|
+
ClientAuthErrorCodes,
|
|
9
|
+
} from "../error/ClientAuthError";
|
|
7
10
|
import { ICrypto } from "../crypto/ICrypto";
|
|
8
11
|
import { Separators, Constants } from "../utils/Constants";
|
|
9
12
|
|
|
@@ -25,15 +28,15 @@ export function buildClientInfo(
|
|
|
25
28
|
crypto: ICrypto
|
|
26
29
|
): ClientInfo {
|
|
27
30
|
if (!rawClientInfo) {
|
|
28
|
-
throw
|
|
31
|
+
throw createClientAuthError(ClientAuthErrorCodes.clientInfoEmptyError);
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
try {
|
|
32
35
|
const decodedClientInfo: string = crypto.base64Decode(rawClientInfo);
|
|
33
36
|
return JSON.parse(decodedClientInfo) as ClientInfo;
|
|
34
37
|
} catch (e) {
|
|
35
|
-
throw
|
|
36
|
-
|
|
38
|
+
throw createClientAuthError(
|
|
39
|
+
ClientAuthErrorCodes.clientInfoDecodingError
|
|
37
40
|
);
|
|
38
41
|
}
|
|
39
42
|
}
|
|
@@ -46,8 +49,8 @@ export function buildClientInfoFromHomeAccountId(
|
|
|
46
49
|
homeAccountId: string
|
|
47
50
|
): ClientInfo {
|
|
48
51
|
if (!homeAccountId) {
|
|
49
|
-
throw
|
|
50
|
-
|
|
52
|
+
throw createClientAuthError(
|
|
53
|
+
ClientAuthErrorCodes.clientInfoDecodingError
|
|
51
54
|
);
|
|
52
55
|
}
|
|
53
56
|
const clientInfoParts: string[] = homeAccountId.split(
|
|
@@ -10,7 +10,10 @@ import {
|
|
|
10
10
|
} from "./OpenIdConfigResponse";
|
|
11
11
|
import { UrlString } from "../url/UrlString";
|
|
12
12
|
import { IUri } from "../url/IUri";
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
createClientAuthError,
|
|
15
|
+
ClientAuthErrorCodes,
|
|
16
|
+
} from "../error/ClientAuthError";
|
|
14
17
|
import { INetworkModule } from "../network/INetworkModule";
|
|
15
18
|
import {
|
|
16
19
|
AADAuthorityConstants,
|
|
@@ -23,7 +26,10 @@ import {
|
|
|
23
26
|
InstanceDiscoveryMetadata,
|
|
24
27
|
InstanceDiscoveryMetadataAliases,
|
|
25
28
|
} from "./AuthorityMetadata";
|
|
26
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
createClientConfigurationError,
|
|
31
|
+
ClientConfigurationErrorCodes,
|
|
32
|
+
} from "../error/ClientConfigurationError";
|
|
27
33
|
import { ProtocolMode } from "./ProtocolMode";
|
|
28
34
|
import { ICacheManager } from "../cache/interface/ICacheManager";
|
|
29
35
|
import { AuthorityMetadataEntity } from "../cache/entities/AuthorityMetadataEntity";
|
|
@@ -45,6 +51,7 @@ import { Logger } from "../logger/Logger";
|
|
|
45
51
|
import { AuthError } from "../error/AuthError";
|
|
46
52
|
import { IPerformanceClient } from "../telemetry/performance/IPerformanceClient";
|
|
47
53
|
import { PerformanceEvents } from "../telemetry/performance/PerformanceEvent";
|
|
54
|
+
import { invokeAsync } from "../utils/FunctionWrappers";
|
|
48
55
|
|
|
49
56
|
/**
|
|
50
57
|
* The authority class validates the authority URIs used by the user, and retrieves the OpenID Configuration Data from the
|
|
@@ -107,6 +114,7 @@ export class Authority {
|
|
|
107
114
|
this.correlationId = correlationId;
|
|
108
115
|
this.regionDiscovery = new RegionDiscovery(
|
|
109
116
|
networkInterface,
|
|
117
|
+
this.logger,
|
|
110
118
|
this.performanceClient,
|
|
111
119
|
this.correlationId
|
|
112
120
|
);
|
|
@@ -205,8 +213,8 @@ export class Authority {
|
|
|
205
213
|
if (this.discoveryComplete()) {
|
|
206
214
|
return this.replacePath(this.metadata.authorization_endpoint);
|
|
207
215
|
} else {
|
|
208
|
-
throw
|
|
209
|
-
|
|
216
|
+
throw createClientAuthError(
|
|
217
|
+
ClientAuthErrorCodes.endpointResolutionError
|
|
210
218
|
);
|
|
211
219
|
}
|
|
212
220
|
}
|
|
@@ -218,8 +226,8 @@ export class Authority {
|
|
|
218
226
|
if (this.discoveryComplete()) {
|
|
219
227
|
return this.replacePath(this.metadata.token_endpoint);
|
|
220
228
|
} else {
|
|
221
|
-
throw
|
|
222
|
-
|
|
229
|
+
throw createClientAuthError(
|
|
230
|
+
ClientAuthErrorCodes.endpointResolutionError
|
|
223
231
|
);
|
|
224
232
|
}
|
|
225
233
|
}
|
|
@@ -230,8 +238,8 @@ export class Authority {
|
|
|
230
238
|
this.metadata.token_endpoint.replace("/token", "/devicecode")
|
|
231
239
|
);
|
|
232
240
|
} else {
|
|
233
|
-
throw
|
|
234
|
-
|
|
241
|
+
throw createClientAuthError(
|
|
242
|
+
ClientAuthErrorCodes.endpointResolutionError
|
|
235
243
|
);
|
|
236
244
|
}
|
|
237
245
|
}
|
|
@@ -243,12 +251,14 @@ export class Authority {
|
|
|
243
251
|
if (this.discoveryComplete()) {
|
|
244
252
|
// ROPC policies may not have end_session_endpoint set
|
|
245
253
|
if (!this.metadata.end_session_endpoint) {
|
|
246
|
-
throw
|
|
254
|
+
throw createClientAuthError(
|
|
255
|
+
ClientAuthErrorCodes.endSessionEndpointNotSupported
|
|
256
|
+
);
|
|
247
257
|
}
|
|
248
258
|
return this.replacePath(this.metadata.end_session_endpoint);
|
|
249
259
|
} else {
|
|
250
|
-
throw
|
|
251
|
-
|
|
260
|
+
throw createClientAuthError(
|
|
261
|
+
ClientAuthErrorCodes.endpointResolutionError
|
|
252
262
|
);
|
|
253
263
|
}
|
|
254
264
|
}
|
|
@@ -260,8 +270,8 @@ export class Authority {
|
|
|
260
270
|
if (this.discoveryComplete()) {
|
|
261
271
|
return this.replacePath(this.metadata.issuer);
|
|
262
272
|
} else {
|
|
263
|
-
throw
|
|
264
|
-
|
|
273
|
+
throw createClientAuthError(
|
|
274
|
+
ClientAuthErrorCodes.endpointResolutionError
|
|
265
275
|
);
|
|
266
276
|
}
|
|
267
277
|
}
|
|
@@ -273,8 +283,8 @@ export class Authority {
|
|
|
273
283
|
if (this.discoveryComplete()) {
|
|
274
284
|
return this.replacePath(this.metadata.jwks_uri);
|
|
275
285
|
} else {
|
|
276
|
-
throw
|
|
277
|
-
|
|
286
|
+
throw createClientAuthError(
|
|
287
|
+
ClientAuthErrorCodes.endpointResolutionError
|
|
278
288
|
);
|
|
279
289
|
}
|
|
280
290
|
}
|
|
@@ -356,6 +366,7 @@ export class Authority {
|
|
|
356
366
|
protected get defaultOpenIdConfigurationEndpoint(): string {
|
|
357
367
|
const canonicalAuthorityHost = this.hostnameAndPort;
|
|
358
368
|
if (
|
|
369
|
+
this.canonicalAuthority.endsWith("v2.0/") ||
|
|
359
370
|
this.authorityType === AuthorityType.Adfs ||
|
|
360
371
|
(this.protocolMode !== ProtocolMode.AAD &&
|
|
361
372
|
!this.isAliasOfKnownMicrosoftAuthority(canonicalAuthorityHost))
|
|
@@ -391,24 +402,24 @@ export class Authority {
|
|
|
391
402
|
metadataEntity.updateCanonicalAuthority(this.canonicalAuthority);
|
|
392
403
|
}
|
|
393
404
|
|
|
394
|
-
|
|
405
|
+
const cloudDiscoverySource = await invokeAsync(
|
|
406
|
+
this.updateCloudDiscoveryMetadata.bind(this),
|
|
395
407
|
PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata,
|
|
408
|
+
this.logger,
|
|
409
|
+
this.performanceClient,
|
|
396
410
|
this.correlationId
|
|
397
|
-
);
|
|
398
|
-
const cloudDiscoverySource = await this.updateCloudDiscoveryMetadata(
|
|
399
|
-
metadataEntity
|
|
400
|
-
);
|
|
411
|
+
)(metadataEntity);
|
|
401
412
|
this.canonicalAuthority = this.canonicalAuthority.replace(
|
|
402
413
|
this.hostnameAndPort,
|
|
403
414
|
metadataEntity.preferred_network
|
|
404
415
|
);
|
|
405
|
-
|
|
416
|
+
const endpointSource = await invokeAsync(
|
|
417
|
+
this.updateEndpointMetadata.bind(this),
|
|
406
418
|
PerformanceEvents.AuthorityUpdateEndpointMetadata,
|
|
419
|
+
this.logger,
|
|
420
|
+
this.performanceClient,
|
|
407
421
|
this.correlationId
|
|
408
|
-
);
|
|
409
|
-
const endpointSource = await this.updateEndpointMetadata(
|
|
410
|
-
metadataEntity
|
|
411
|
-
);
|
|
422
|
+
)(metadataEntity);
|
|
412
423
|
|
|
413
424
|
if (
|
|
414
425
|
cloudDiscoverySource !== AuthorityMetadataSource.CACHE &&
|
|
@@ -469,17 +480,13 @@ export class Authority {
|
|
|
469
480
|
if (
|
|
470
481
|
this.authorityOptions.azureRegionConfiguration?.azureRegion
|
|
471
482
|
) {
|
|
472
|
-
|
|
483
|
+
hardcodedMetadata = await invokeAsync(
|
|
484
|
+
this.updateMetadataWithRegionalInformation.bind(this),
|
|
473
485
|
PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation,
|
|
486
|
+
this.logger,
|
|
487
|
+
this.performanceClient,
|
|
474
488
|
this.correlationId
|
|
475
|
-
);
|
|
476
|
-
this.logger.verbose(
|
|
477
|
-
"Found azure region configuration. Updating endpoints with regional information."
|
|
478
|
-
);
|
|
479
|
-
hardcodedMetadata =
|
|
480
|
-
await this.updateMetadataWithRegionalInformation(
|
|
481
|
-
hardcodedMetadata
|
|
482
|
-
);
|
|
489
|
+
)(hardcodedMetadata);
|
|
483
490
|
}
|
|
484
491
|
|
|
485
492
|
metadataEntity.updateEndpointMetadata(hardcodedMetadata, false);
|
|
@@ -505,41 +512,31 @@ export class Authority {
|
|
|
505
512
|
this.logger.verbose("The metadata entity is expired.");
|
|
506
513
|
}
|
|
507
514
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
);
|
|
511
|
-
|
|
512
|
-
this.performanceClient?.setPreQueueTime(
|
|
515
|
+
metadata = await invokeAsync(
|
|
516
|
+
this.getEndpointMetadataFromNetwork.bind(this),
|
|
513
517
|
PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork,
|
|
518
|
+
this.logger,
|
|
519
|
+
this.performanceClient,
|
|
514
520
|
this.correlationId
|
|
515
|
-
);
|
|
516
|
-
metadata = await this.getEndpointMetadataFromNetwork();
|
|
521
|
+
)();
|
|
517
522
|
if (metadata) {
|
|
518
|
-
this.logger.verbose(
|
|
519
|
-
"Endpoint metadata was successfully returned from getEndpointMetadataFromNetwork()"
|
|
520
|
-
);
|
|
521
523
|
// If the user prefers to use an azure region replace the global endpoints with regional information.
|
|
522
524
|
if (this.authorityOptions.azureRegionConfiguration?.azureRegion) {
|
|
523
|
-
|
|
525
|
+
metadata = await invokeAsync(
|
|
526
|
+
this.updateMetadataWithRegionalInformation.bind(this),
|
|
524
527
|
PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation,
|
|
528
|
+
this.logger,
|
|
529
|
+
this.performanceClient,
|
|
525
530
|
this.correlationId
|
|
526
|
-
);
|
|
527
|
-
this.logger.verbose(
|
|
528
|
-
"Found azure region configuration. Updating endpoints with regional information."
|
|
529
|
-
);
|
|
530
|
-
metadata = await this.updateMetadataWithRegionalInformation(
|
|
531
|
-
metadata
|
|
532
|
-
);
|
|
531
|
+
)(metadata);
|
|
533
532
|
}
|
|
534
533
|
|
|
535
534
|
metadataEntity.updateEndpointMetadata(metadata, true);
|
|
536
535
|
return AuthorityMetadataSource.NETWORK;
|
|
537
536
|
} else {
|
|
538
537
|
// Metadata could not be obtained from the config, cache, network or hardcoded values
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
);
|
|
542
|
-
throw ClientAuthError.createUnableToGetOpenidConfigError(
|
|
538
|
+
throw createClientAuthError(
|
|
539
|
+
ClientAuthErrorCodes.openIdConfigError,
|
|
543
540
|
this.defaultOpenIdConfigurationEndpoint
|
|
544
541
|
);
|
|
545
542
|
}
|
|
@@ -575,7 +572,9 @@ export class Authority {
|
|
|
575
572
|
this.authorityOptions.authorityMetadata
|
|
576
573
|
) as OpenIdConfigResponse;
|
|
577
574
|
} catch (e) {
|
|
578
|
-
throw
|
|
575
|
+
throw createClientConfigurationError(
|
|
576
|
+
ClientConfigurationErrorCodes.invalidAuthorityMetadata
|
|
577
|
+
);
|
|
579
578
|
}
|
|
580
579
|
}
|
|
581
580
|
|
|
@@ -593,10 +592,6 @@ export class Authority {
|
|
|
593
592
|
this.correlationId
|
|
594
593
|
);
|
|
595
594
|
|
|
596
|
-
const perfEvent = this.performanceClient?.startMeasurement(
|
|
597
|
-
PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork,
|
|
598
|
-
this.correlationId
|
|
599
|
-
);
|
|
600
595
|
const options: ImdsOptions = {};
|
|
601
596
|
|
|
602
597
|
/*
|
|
@@ -618,23 +613,14 @@ export class Authority {
|
|
|
618
613
|
);
|
|
619
614
|
const isValidResponse = isOpenIdConfigResponse(response.body);
|
|
620
615
|
if (isValidResponse) {
|
|
621
|
-
perfEvent?.end({ success: true });
|
|
622
616
|
return response.body;
|
|
623
617
|
} else {
|
|
624
|
-
perfEvent?.end({
|
|
625
|
-
success: false,
|
|
626
|
-
errorCode: "invalid_response",
|
|
627
|
-
});
|
|
628
618
|
this.logger.verbose(
|
|
629
619
|
`Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration`
|
|
630
620
|
);
|
|
631
621
|
return null;
|
|
632
622
|
}
|
|
633
623
|
} catch (e) {
|
|
634
|
-
perfEvent?.end({
|
|
635
|
-
success: false,
|
|
636
|
-
errorCode: "request_failure",
|
|
637
|
-
});
|
|
638
624
|
this.logger.verbose(
|
|
639
625
|
`Authority.getEndpointMetadataFromNetwork: ${e}`
|
|
640
626
|
);
|
|
@@ -683,18 +669,18 @@ export class Authority {
|
|
|
683
669
|
);
|
|
684
670
|
}
|
|
685
671
|
|
|
686
|
-
|
|
672
|
+
const autodetectedRegionName = await invokeAsync(
|
|
673
|
+
this.regionDiscovery.detectRegion.bind(this.regionDiscovery),
|
|
687
674
|
PerformanceEvents.RegionDiscoveryDetectRegion,
|
|
675
|
+
this.logger,
|
|
676
|
+
this.performanceClient,
|
|
688
677
|
this.correlationId
|
|
678
|
+
)(
|
|
679
|
+
this.authorityOptions.azureRegionConfiguration
|
|
680
|
+
?.environmentRegion,
|
|
681
|
+
this.regionDiscoveryMetadata
|
|
689
682
|
);
|
|
690
683
|
|
|
691
|
-
const autodetectedRegionName =
|
|
692
|
-
await this.regionDiscovery.detectRegion(
|
|
693
|
-
this.authorityOptions.azureRegionConfiguration
|
|
694
|
-
?.environmentRegion,
|
|
695
|
-
this.regionDiscoveryMetadata
|
|
696
|
-
);
|
|
697
|
-
|
|
698
684
|
if (autodetectedRegionName) {
|
|
699
685
|
this.regionDiscoveryMetadata.region_outcome =
|
|
700
686
|
RegionDiscoveryOutcomes.AUTO_DETECTION_REQUESTED_SUCCESSFUL;
|
|
@@ -796,29 +782,23 @@ export class Authority {
|
|
|
796
782
|
this.logger.verbose("The metadata entity is expired.");
|
|
797
783
|
}
|
|
798
784
|
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
);
|
|
802
|
-
|
|
803
|
-
this.performanceClient?.setPreQueueTime(
|
|
785
|
+
metadata = await invokeAsync(
|
|
786
|
+
this.getCloudDiscoveryMetadataFromNetwork.bind(this),
|
|
804
787
|
PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork,
|
|
788
|
+
this.logger,
|
|
789
|
+
this.performanceClient,
|
|
805
790
|
this.correlationId
|
|
806
|
-
);
|
|
807
|
-
metadata = await this.getCloudDiscoveryMetadataFromNetwork();
|
|
791
|
+
)();
|
|
808
792
|
|
|
809
793
|
if (metadata) {
|
|
810
|
-
this.logger.verbose(
|
|
811
|
-
"cloud discovery metadata was successfully returned from getCloudDiscoveryMetadataFromNetwork()"
|
|
812
|
-
);
|
|
813
794
|
metadataEntity.updateCloudDiscoveryMetadata(metadata, true);
|
|
814
795
|
return AuthorityMetadataSource.NETWORK;
|
|
815
796
|
}
|
|
816
797
|
|
|
817
798
|
// Metadata could not be obtained from the config, cache, network or hardcoded values
|
|
818
|
-
|
|
819
|
-
|
|
799
|
+
throw createClientConfigurationError(
|
|
800
|
+
ClientConfigurationErrorCodes.untrustedAuthority
|
|
820
801
|
);
|
|
821
|
-
throw ClientConfigurationError.createUntrustedAuthorityError();
|
|
822
802
|
}
|
|
823
803
|
|
|
824
804
|
/**
|
|
@@ -867,7 +847,9 @@ export class Authority {
|
|
|
867
847
|
this.logger.verbose(
|
|
868
848
|
"Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."
|
|
869
849
|
);
|
|
870
|
-
throw
|
|
850
|
+
throw createClientConfigurationError(
|
|
851
|
+
ClientConfigurationErrorCodes.invalidCloudDiscoveryMetadata
|
|
852
|
+
);
|
|
871
853
|
}
|
|
872
854
|
}
|
|
873
855
|
|
|
@@ -1090,8 +1072,8 @@ export class Authority {
|
|
|
1090
1072
|
if (this.discoveryComplete()) {
|
|
1091
1073
|
return this.metadata.preferred_cache;
|
|
1092
1074
|
} else {
|
|
1093
|
-
throw
|
|
1094
|
-
|
|
1075
|
+
throw createClientAuthError(
|
|
1076
|
+
ClientAuthErrorCodes.endpointResolutionError
|
|
1095
1077
|
);
|
|
1096
1078
|
}
|
|
1097
1079
|
}
|