@azure/msal-node-extensions 1.5.26 → 5.0.0-beta.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.
Files changed (56) hide show
  1. package/bin/arm64/dpapi.node +0 -0
  2. package/bin/ia32/dpapi.node +0 -0
  3. package/bin/x64/dpapi.node +0 -0
  4. package/dist/Dpapi.mjs +1 -1
  5. package/dist/broker/NativeBrokerPlugin.mjs +24 -25
  6. package/dist/broker/NativeBrokerPlugin.mjs.map +1 -1
  7. package/dist/error/PersistenceError.mjs +1 -1
  8. package/dist/index.mjs +1 -1
  9. package/dist/lib/msal-common/dist/constants/AADServerParamKeys.mjs +2 -2
  10. package/dist/lib/msal-common/dist/constants/AADServerParamKeys.mjs.map +1 -1
  11. package/dist/lib/msal-common/dist/error/AuthError.mjs +16 -11
  12. package/dist/lib/msal-common/dist/error/AuthError.mjs.map +1 -1
  13. package/dist/lib/msal-common/dist/error/ClientAuthError.mjs +4 -57
  14. package/dist/lib/msal-common/dist/error/ClientAuthError.mjs.map +1 -1
  15. package/dist/lib/msal-common/dist/error/ClientAuthErrorCodes.mjs +3 -48
  16. package/dist/lib/msal-common/dist/error/ClientAuthErrorCodes.mjs.map +1 -1
  17. package/dist/lib/msal-common/dist/error/ClientConfigurationError.mjs +4 -31
  18. package/dist/lib/msal-common/dist/error/ClientConfigurationError.mjs.map +1 -1
  19. package/dist/lib/msal-common/dist/error/ClientConfigurationErrorCodes.mjs +4 -31
  20. package/dist/lib/msal-common/dist/error/ClientConfigurationErrorCodes.mjs.map +1 -1
  21. package/dist/lib/msal-common/dist/error/InteractionRequiredAuthError.mjs +6 -7
  22. package/dist/lib/msal-common/dist/error/InteractionRequiredAuthError.mjs.map +1 -1
  23. package/dist/lib/msal-common/dist/error/PlatformBrokerError.mjs +4 -3
  24. package/dist/lib/msal-common/dist/error/PlatformBrokerError.mjs.map +1 -1
  25. package/dist/lib/msal-common/dist/error/ServerError.mjs +2 -2
  26. package/dist/lib/msal-common/dist/error/ServerError.mjs.map +1 -1
  27. package/dist/lib/msal-common/dist/logger/Logger.mjs +91 -23
  28. package/dist/lib/msal-common/dist/logger/Logger.mjs.map +1 -1
  29. package/dist/lib/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs +29 -31
  30. package/dist/lib/msal-common/dist/telemetry/server/ServerTelemetryManager.mjs.map +1 -1
  31. package/dist/lib/msal-common/dist/utils/Constants.mjs +15 -79
  32. package/dist/lib/msal-common/dist/utils/Constants.mjs.map +1 -1
  33. package/dist/lib/msal-common/dist/utils/TimeUtils.mjs +2 -2
  34. package/dist/lib/msal-common/dist/utils/TimeUtils.mjs.map +1 -1
  35. package/dist/lock/CrossPlatformLock.mjs +10 -10
  36. package/dist/lock/CrossPlatformLock.mjs.map +1 -1
  37. package/dist/packageMetadata.d.ts +1 -1
  38. package/dist/packageMetadata.mjs +2 -2
  39. package/dist/persistence/BasePersistence.mjs +1 -1
  40. package/dist/persistence/DataProtectionScope.mjs +1 -1
  41. package/dist/persistence/FilePersistence.mjs +5 -5
  42. package/dist/persistence/FilePersistence.mjs.map +1 -1
  43. package/dist/persistence/FilePersistenceWithDataProtection.mjs +2 -2
  44. package/dist/persistence/FilePersistenceWithDataProtection.mjs.map +1 -1
  45. package/dist/persistence/KeychainPersistence.mjs +1 -1
  46. package/dist/persistence/LibSecretPersistence.mjs +1 -1
  47. package/dist/persistence/PersistenceCachePlugin.mjs +12 -12
  48. package/dist/persistence/PersistenceCachePlugin.mjs.map +1 -1
  49. package/dist/persistence/PersistenceCreator.mjs +1 -1
  50. package/dist/utils/Constants.mjs +1 -1
  51. package/dist/utils/Environment.mjs +1 -1
  52. package/dist/utils/TypeGuards.mjs +1 -1
  53. package/lib/msal-node-extensions.cjs +259 -398
  54. package/lib/msal-node-extensions.cjs.map +1 -1
  55. package/lib/types/packageMetadata.d.ts +1 -1
  56. package/package.json +4 -6
@@ -1,46 +1,19 @@
1
- /*! @azure/msal-node-extensions v1.5.26 2025-12-04 */
1
+ /*! @azure/msal-node-extensions v5.0.0-beta.0 2025-12-05 */
2
2
  'use strict';
3
3
  import { AuthError } from './AuthError.mjs';
4
- import { invalidPlatformBrokerConfiguration, invalidRequestMethodForEAR, invalidAuthorizePostBodyParameters, authorityMismatch, cannotAllowPlatformBroker, cannotSetOIDCOptions, invalidAuthenticationHeader, missingNonceAuthenticationHeader, missingSshKid, missingSshJwk, untrustedAuthority, invalidAuthorityMetadata, invalidCloudDiscoveryMetadata, pkceParamsMissing, invalidCodeChallengeMethod, logoutRequestEmpty, tokenRequestEmpty, invalidClaims, emptyInputScopesError, urlEmptyError, urlParseError, authorityUriInsecure, claimsRequestParsingError, redirectUriEmpty } from './ClientConfigurationErrorCodes.mjs';
5
4
 
6
- /*! @azure/msal-common v15.13.3 2025-12-04 */
5
+ /*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
7
6
 
8
7
  /*
9
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
10
9
  * Licensed under the MIT License.
11
10
  */
12
- const ClientConfigurationErrorMessages = {
13
- [redirectUriEmpty]: "A redirect URI is required for all calls, and none has been set.",
14
- [claimsRequestParsingError]: "Could not parse the given claims request object.",
15
- [authorityUriInsecure]: "Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",
16
- [urlParseError]: "URL could not be parsed into appropriate segments.",
17
- [urlEmptyError]: "URL was empty or null.",
18
- [emptyInputScopesError]: "Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",
19
- [invalidClaims]: "Given claims parameter must be a stringified JSON object.",
20
- [tokenRequestEmpty]: "Token request was empty and not found in cache.",
21
- [logoutRequestEmpty]: "The logout request was null or undefined.",
22
- [invalidCodeChallengeMethod]: 'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',
23
- [pkceParamsMissing]: "Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",
24
- [invalidCloudDiscoveryMetadata]: "Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",
25
- [invalidAuthorityMetadata]: "Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",
26
- [untrustedAuthority]: "The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",
27
- [missingSshJwk]: "Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",
28
- [missingSshKid]: "Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",
29
- [missingNonceAuthenticationHeader]: "Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",
30
- [invalidAuthenticationHeader]: "Invalid authentication header provided",
31
- [cannotSetOIDCOptions]: "Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",
32
- [cannotAllowPlatformBroker]: "Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",
33
- [authorityMismatch]: "Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",
34
- [invalidAuthorizePostBodyParameters]: "Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",
35
- [invalidRequestMethodForEAR]: "Invalid request method for EAR protocol mode. The request method cannot be GET when using EAR protocol mode. Please change the request method to POST.",
36
- [invalidPlatformBrokerConfiguration]: "Invalid platform broker configuration. `allowPlatformBrokerWithDOM` can only be enabled when `allowPlatformBroker` is enabled.",
37
- };
38
11
  /**
39
12
  * Error thrown when there is an error in configuration of the MSAL.js library.
40
13
  */
41
14
  class ClientConfigurationError extends AuthError {
42
15
  constructor(errorCode) {
43
- super(errorCode, ClientConfigurationErrorMessages[errorCode]);
16
+ super(errorCode);
44
17
  this.name = "ClientConfigurationError";
45
18
  Object.setPrototypeOf(this, ClientConfigurationError.prototype);
46
19
  }
@@ -49,5 +22,5 @@ function createClientConfigurationError(errorCode) {
49
22
  return new ClientConfigurationError(errorCode);
50
23
  }
51
24
 
52
- export { ClientConfigurationError, ClientConfigurationErrorMessages, createClientConfigurationError };
25
+ export { ClientConfigurationError, createClientConfigurationError };
53
26
  //# sourceMappingURL=ClientConfigurationError.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClientConfigurationError.mjs","sources":["../../../../../../../lib/msal-common/dist/error/ClientConfigurationError.mjs"],"sourcesContent":["/*! @azure/msal-common v15.13.3 2025-12-04 */\n'use strict';\nimport { AuthError } from './AuthError.mjs';\nimport { invalidPlatformBrokerConfiguration, invalidRequestMethodForEAR, invalidAuthorizePostBodyParameters, authorityMismatch, cannotAllowPlatformBroker, cannotSetOIDCOptions, invalidAuthenticationHeader, missingNonceAuthenticationHeader, missingSshKid, missingSshJwk, untrustedAuthority, invalidAuthorityMetadata, invalidCloudDiscoveryMetadata, pkceParamsMissing, invalidCodeChallengeMethod, logoutRequestEmpty, tokenRequestEmpty, invalidClaims, emptyInputScopesError, urlEmptyError, urlParseError, authorityUriInsecure, claimsRequestParsingError, redirectUriEmpty } from './ClientConfigurationErrorCodes.mjs';\nimport * as ClientConfigurationErrorCodes from './ClientConfigurationErrorCodes.mjs';\nexport { ClientConfigurationErrorCodes };\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst ClientConfigurationErrorMessages = {\r\n [redirectUriEmpty]: \"A redirect URI is required for all calls, and none has been set.\",\r\n [claimsRequestParsingError]: \"Could not parse the given claims request object.\",\r\n [authorityUriInsecure]: \"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options\",\r\n [urlParseError]: \"URL could not be parsed into appropriate segments.\",\r\n [urlEmptyError]: \"URL was empty or null.\",\r\n [emptyInputScopesError]: \"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.\",\r\n [invalidClaims]: \"Given claims parameter must be a stringified JSON object.\",\r\n [tokenRequestEmpty]: \"Token request was empty and not found in cache.\",\r\n [logoutRequestEmpty]: \"The logout request was null or undefined.\",\r\n [invalidCodeChallengeMethod]: 'code_challenge_method passed is invalid. Valid values are \"plain\" and \"S256\".',\r\n [pkceParamsMissing]: \"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request\",\r\n [invalidCloudDiscoveryMetadata]: \"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields\",\r\n [invalidAuthorityMetadata]: \"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.\",\r\n [untrustedAuthority]: \"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.\",\r\n [missingSshJwk]: \"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.\",\r\n [missingSshKid]: \"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.\",\r\n [missingNonceAuthenticationHeader]: \"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.\",\r\n [invalidAuthenticationHeader]: \"Invalid authentication header provided\",\r\n [cannotSetOIDCOptions]: \"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.\",\r\n [cannotAllowPlatformBroker]: \"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.\",\r\n [authorityMismatch]: \"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.\",\r\n [invalidAuthorizePostBodyParameters]: \"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.\",\r\n [invalidRequestMethodForEAR]: \"Invalid request method for EAR protocol mode. The request method cannot be GET when using EAR protocol mode. Please change the request method to POST.\",\r\n [invalidPlatformBrokerConfiguration]: \"Invalid platform broker configuration. `allowPlatformBrokerWithDOM` can only be enabled when `allowPlatformBroker` is enabled.\",\r\n};\r\n/**\r\n * ClientConfigurationErrorMessage class containing string constants used by error codes and messages.\r\n * @deprecated Use ClientConfigurationErrorCodes instead\r\n */\r\nconst ClientConfigurationErrorMessage = {\r\n redirectUriNotSet: {\r\n code: redirectUriEmpty,\r\n desc: ClientConfigurationErrorMessages[redirectUriEmpty],\r\n },\r\n claimsRequestParsingError: {\r\n code: claimsRequestParsingError,\r\n desc: ClientConfigurationErrorMessages[claimsRequestParsingError],\r\n },\r\n authorityUriInsecure: {\r\n code: authorityUriInsecure,\r\n desc: ClientConfigurationErrorMessages[authorityUriInsecure],\r\n },\r\n urlParseError: {\r\n code: urlParseError,\r\n desc: ClientConfigurationErrorMessages[urlParseError],\r\n },\r\n urlEmptyError: {\r\n code: urlEmptyError,\r\n desc: ClientConfigurationErrorMessages[urlEmptyError],\r\n },\r\n emptyScopesError: {\r\n code: emptyInputScopesError,\r\n desc: ClientConfigurationErrorMessages[emptyInputScopesError],\r\n },\r\n invalidClaimsRequest: {\r\n code: invalidClaims,\r\n desc: ClientConfigurationErrorMessages[invalidClaims],\r\n },\r\n tokenRequestEmptyError: {\r\n code: tokenRequestEmpty,\r\n desc: ClientConfigurationErrorMessages[tokenRequestEmpty],\r\n },\r\n logoutRequestEmptyError: {\r\n code: logoutRequestEmpty,\r\n desc: ClientConfigurationErrorMessages[logoutRequestEmpty],\r\n },\r\n invalidCodeChallengeMethod: {\r\n code: invalidCodeChallengeMethod,\r\n desc: ClientConfigurationErrorMessages[invalidCodeChallengeMethod],\r\n },\r\n invalidCodeChallengeParams: {\r\n code: pkceParamsMissing,\r\n desc: ClientConfigurationErrorMessages[pkceParamsMissing],\r\n },\r\n invalidCloudDiscoveryMetadata: {\r\n code: invalidCloudDiscoveryMetadata,\r\n desc: ClientConfigurationErrorMessages[invalidCloudDiscoveryMetadata],\r\n },\r\n invalidAuthorityMetadata: {\r\n code: invalidAuthorityMetadata,\r\n desc: ClientConfigurationErrorMessages[invalidAuthorityMetadata],\r\n },\r\n untrustedAuthority: {\r\n code: untrustedAuthority,\r\n desc: ClientConfigurationErrorMessages[untrustedAuthority],\r\n },\r\n missingSshJwk: {\r\n code: missingSshJwk,\r\n desc: ClientConfigurationErrorMessages[missingSshJwk],\r\n },\r\n missingSshKid: {\r\n code: missingSshKid,\r\n desc: ClientConfigurationErrorMessages[missingSshKid],\r\n },\r\n missingNonceAuthenticationHeader: {\r\n code: missingNonceAuthenticationHeader,\r\n desc: ClientConfigurationErrorMessages[missingNonceAuthenticationHeader],\r\n },\r\n invalidAuthenticationHeader: {\r\n code: invalidAuthenticationHeader,\r\n desc: ClientConfigurationErrorMessages[invalidAuthenticationHeader],\r\n },\r\n cannotSetOIDCOptions: {\r\n code: cannotSetOIDCOptions,\r\n desc: ClientConfigurationErrorMessages[cannotSetOIDCOptions],\r\n },\r\n cannotAllowPlatformBroker: {\r\n code: cannotAllowPlatformBroker,\r\n desc: ClientConfigurationErrorMessages[cannotAllowPlatformBroker],\r\n },\r\n authorityMismatch: {\r\n code: authorityMismatch,\r\n desc: ClientConfigurationErrorMessages[authorityMismatch],\r\n },\r\n invalidAuthorizePostBodyParameters: {\r\n code: invalidAuthorizePostBodyParameters,\r\n desc: ClientConfigurationErrorMessages[invalidAuthorizePostBodyParameters],\r\n },\r\n invalidRequestMethodForEAR: {\r\n code: invalidRequestMethodForEAR,\r\n desc: ClientConfigurationErrorMessages[invalidRequestMethodForEAR],\r\n },\r\n invalidPlatformBrokerConfiguration: {\r\n code: invalidPlatformBrokerConfiguration,\r\n desc: ClientConfigurationErrorMessages[invalidPlatformBrokerConfiguration],\r\n },\r\n};\r\n/**\r\n * Error thrown when there is an error in configuration of the MSAL.js library.\r\n */\r\nclass ClientConfigurationError extends AuthError {\r\n constructor(errorCode) {\r\n super(errorCode, ClientConfigurationErrorMessages[errorCode]);\r\n this.name = \"ClientConfigurationError\";\r\n Object.setPrototypeOf(this, ClientConfigurationError.prototype);\r\n }\r\n}\r\nfunction createClientConfigurationError(errorCode) {\r\n return new ClientConfigurationError(errorCode);\r\n}\n\nexport { ClientConfigurationError, ClientConfigurationErrorMessage, ClientConfigurationErrorMessages, createClientConfigurationError };\n//# sourceMappingURL=ClientConfigurationError.mjs.map\n"],"names":[],"mappings":";;;;;AAAA;;AAOA;AACA;AACA;AACA;AACK,MAAC,gCAAgC,GAAG;AACzC,IAAI,CAAC,gBAAgB,GAAG,kEAAkE;AAC1F,IAAI,CAAC,yBAAyB,GAAG,kDAAkD;AACnF,IAAI,CAAC,oBAAoB,GAAG,2NAA2N;AACvP,IAAI,CAAC,aAAa,GAAG,oDAAoD;AACzE,IAAI,CAAC,aAAa,GAAG,wBAAwB;AAC7C,IAAI,CAAC,qBAAqB,GAAG,gHAAgH;AAC7I,IAAI,CAAC,aAAa,GAAG,2DAA2D;AAChF,IAAI,CAAC,iBAAiB,GAAG,iDAAiD;AAC1E,IAAI,CAAC,kBAAkB,GAAG,2CAA2C;AACrE,IAAI,CAAC,0BAA0B,GAAG,+EAA+E;AACjH,IAAI,CAAC,iBAAiB,GAAG,qGAAqG;AAC9H,IAAI,CAAC,6BAA6B,GAAG,qIAAqI;AAC1K,IAAI,CAAC,wBAAwB,GAAG,yIAAyI;AACzK,IAAI,CAAC,kBAAkB,GAAG,4HAA4H;AACtJ,IAAI,CAAC,aAAa,GAAG,6HAA6H;AAClJ,IAAI,CAAC,aAAa,GAAG,uJAAuJ;AAC5K,IAAI,CAAC,gCAAgC,GAAG,gLAAgL;AACxN,IAAI,CAAC,2BAA2B,GAAG,wCAAwC;AAC3E,IAAI,CAAC,oBAAoB,GAAG,6GAA6G;AACzI,IAAI,CAAC,yBAAyB,GAAG,iFAAiF;AAClH,IAAI,CAAC,iBAAiB,GAAG,kPAAkP;AAC3Q,IAAI,CAAC,kCAAkC,GAAG,iLAAiL;AAC3N,IAAI,CAAC,0BAA0B,GAAG,wJAAwJ;AAC1L,IAAI,CAAC,kCAAkC,GAAG,gIAAgI;AAC1K,EAAE;AAuGF;AACA;AACA;AACA,MAAM,wBAAwB,SAAS,SAAS,CAAC;AACjD,IAAI,WAAW,CAAC,SAAS,EAAE;AAC3B,QAAQ,KAAK,CAAC,SAAS,EAAE,gCAAgC,CAAC,SAAS,CAAC,CAAC,CAAC;AACtE,QAAQ,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;AAC/C,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;AACxE,KAAK;AACL,CAAC;AACD,SAAS,8BAA8B,CAAC,SAAS,EAAE;AACnD,IAAI,OAAO,IAAI,wBAAwB,CAAC,SAAS,CAAC,CAAC;AACnD;;;;"}
1
+ {"version":3,"file":"ClientConfigurationError.mjs","sources":["../../../../../../../lib/msal-common/dist/error/ClientConfigurationError.mjs"],"sourcesContent":["/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */\n'use strict';\nimport { AuthError } from './AuthError.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Error thrown when there is an error in configuration of the MSAL.js library.\r\n */\r\nclass ClientConfigurationError extends AuthError {\r\n constructor(errorCode) {\r\n super(errorCode);\r\n this.name = \"ClientConfigurationError\";\r\n Object.setPrototypeOf(this, ClientConfigurationError.prototype);\r\n }\r\n}\r\nfunction createClientConfigurationError(errorCode) {\r\n return new ClientConfigurationError(errorCode);\r\n}\n\nexport { ClientConfigurationError, createClientConfigurationError };\n//# sourceMappingURL=ClientConfigurationError.mjs.map\n"],"names":[],"mappings":";;;;AAAA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,wBAAwB,SAAS,SAAS,CAAC;AACjD,IAAI,WAAW,CAAC,SAAS,EAAE;AAC3B,QAAQ,KAAK,CAAC,SAAS,CAAC,CAAC;AACzB,QAAQ,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;AAC/C,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;AACxE,KAAK;AACL,CAAC;AACD,SAAS,8BAA8B,CAAC,SAAS,EAAE;AACnD,IAAI,OAAO,IAAI,wBAAwB,CAAC,SAAS,CAAC,CAAC;AACnD;;;;"}
@@ -1,34 +1,7 @@
1
- /*! @azure/msal-node-extensions v1.5.26 2025-12-04 */
1
+ /*! @azure/msal-node-extensions v5.0.0-beta.0 2025-12-05 */
2
2
  'use strict';
3
- /*! @azure/msal-common v15.13.3 2025-12-04 */
4
- /*
5
- * Copyright (c) Microsoft Corporation. All rights reserved.
6
- * Licensed under the MIT License.
7
- */
8
- const redirectUriEmpty = "redirect_uri_empty";
9
- const claimsRequestParsingError = "claims_request_parsing_error";
10
- const authorityUriInsecure = "authority_uri_insecure";
11
- const urlParseError = "url_parse_error";
12
- const urlEmptyError = "empty_url_error";
13
- const emptyInputScopesError = "empty_input_scopes_error";
14
- const invalidClaims = "invalid_claims";
15
- const tokenRequestEmpty = "token_request_empty";
16
- const logoutRequestEmpty = "logout_request_empty";
17
- const invalidCodeChallengeMethod = "invalid_code_challenge_method";
18
- const pkceParamsMissing = "pkce_params_missing";
19
- const invalidCloudDiscoveryMetadata = "invalid_cloud_discovery_metadata";
20
- const invalidAuthorityMetadata = "invalid_authority_metadata";
21
- const untrustedAuthority = "untrusted_authority";
22
- const missingSshJwk = "missing_ssh_jwk";
23
- const missingSshKid = "missing_ssh_kid";
24
- const missingNonceAuthenticationHeader = "missing_nonce_authentication_header";
25
- const invalidAuthenticationHeader = "invalid_authentication_header";
26
- const cannotSetOIDCOptions = "cannot_set_OIDCOptions";
27
- const cannotAllowPlatformBroker = "cannot_allow_platform_broker";
28
- const authorityMismatch = "authority_mismatch";
29
- const invalidRequestMethodForEAR = "invalid_request_method_for_EAR";
30
- const invalidAuthorizePostBodyParameters = "invalid_authorize_post_body_parameters";
31
- const invalidPlatformBrokerConfiguration = "invalid_platform_broker_configuration";
3
+ /*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
4
+ const untrustedAuthority = "untrusted_authority";
32
5
 
33
- export { authorityMismatch, authorityUriInsecure, cannotAllowPlatformBroker, cannotSetOIDCOptions, claimsRequestParsingError, emptyInputScopesError, invalidAuthenticationHeader, invalidAuthorityMetadata, invalidAuthorizePostBodyParameters, invalidClaims, invalidCloudDiscoveryMetadata, invalidCodeChallengeMethod, invalidPlatformBrokerConfiguration, invalidRequestMethodForEAR, logoutRequestEmpty, missingNonceAuthenticationHeader, missingSshJwk, missingSshKid, pkceParamsMissing, redirectUriEmpty, tokenRequestEmpty, untrustedAuthority, urlEmptyError, urlParseError };
6
+ export { untrustedAuthority };
34
7
  //# sourceMappingURL=ClientConfigurationErrorCodes.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClientConfigurationErrorCodes.mjs","sources":["../../../../../../../lib/msal-common/dist/error/ClientConfigurationErrorCodes.mjs"],"sourcesContent":["/*! @azure/msal-common v15.13.3 2025-12-04 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst redirectUriEmpty = \"redirect_uri_empty\";\r\nconst claimsRequestParsingError = \"claims_request_parsing_error\";\r\nconst authorityUriInsecure = \"authority_uri_insecure\";\r\nconst urlParseError = \"url_parse_error\";\r\nconst urlEmptyError = \"empty_url_error\";\r\nconst emptyInputScopesError = \"empty_input_scopes_error\";\r\nconst invalidClaims = \"invalid_claims\";\r\nconst tokenRequestEmpty = \"token_request_empty\";\r\nconst logoutRequestEmpty = \"logout_request_empty\";\r\nconst invalidCodeChallengeMethod = \"invalid_code_challenge_method\";\r\nconst pkceParamsMissing = \"pkce_params_missing\";\r\nconst invalidCloudDiscoveryMetadata = \"invalid_cloud_discovery_metadata\";\r\nconst invalidAuthorityMetadata = \"invalid_authority_metadata\";\r\nconst untrustedAuthority = \"untrusted_authority\";\r\nconst missingSshJwk = \"missing_ssh_jwk\";\r\nconst missingSshKid = \"missing_ssh_kid\";\r\nconst missingNonceAuthenticationHeader = \"missing_nonce_authentication_header\";\r\nconst invalidAuthenticationHeader = \"invalid_authentication_header\";\r\nconst cannotSetOIDCOptions = \"cannot_set_OIDCOptions\";\r\nconst cannotAllowPlatformBroker = \"cannot_allow_platform_broker\";\r\nconst authorityMismatch = \"authority_mismatch\";\r\nconst invalidRequestMethodForEAR = \"invalid_request_method_for_EAR\";\r\nconst invalidAuthorizePostBodyParameters = \"invalid_authorize_post_body_parameters\";\r\nconst invalidPlatformBrokerConfiguration = \"invalid_platform_broker_configuration\";\n\nexport { authorityMismatch, authorityUriInsecure, cannotAllowPlatformBroker, cannotSetOIDCOptions, claimsRequestParsingError, emptyInputScopesError, invalidAuthenticationHeader, invalidAuthorityMetadata, invalidAuthorizePostBodyParameters, invalidClaims, invalidCloudDiscoveryMetadata, invalidCodeChallengeMethod, invalidPlatformBrokerConfiguration, invalidRequestMethodForEAR, logoutRequestEmpty, missingNonceAuthenticationHeader, missingSshJwk, missingSshKid, pkceParamsMissing, redirectUriEmpty, tokenRequestEmpty, untrustedAuthority, urlEmptyError, urlParseError };\n//# sourceMappingURL=ClientConfigurationErrorCodes.mjs.map\n"],"names":[],"mappings":";;AAAA;AAEA;AACA;AACA;AACA;AACK,MAAC,gBAAgB,GAAG,qBAAqB;AACzC,MAAC,yBAAyB,GAAG,+BAA+B;AAC5D,MAAC,oBAAoB,GAAG,yBAAyB;AACjD,MAAC,aAAa,GAAG,kBAAkB;AACnC,MAAC,aAAa,GAAG,kBAAkB;AACnC,MAAC,qBAAqB,GAAG,2BAA2B;AACpD,MAAC,aAAa,GAAG,iBAAiB;AAClC,MAAC,iBAAiB,GAAG,sBAAsB;AAC3C,MAAC,kBAAkB,GAAG,uBAAuB;AAC7C,MAAC,0BAA0B,GAAG,gCAAgC;AAC9D,MAAC,iBAAiB,GAAG,sBAAsB;AAC3C,MAAC,6BAA6B,GAAG,mCAAmC;AACpE,MAAC,wBAAwB,GAAG,6BAA6B;AACzD,MAAC,kBAAkB,GAAG,sBAAsB;AAC5C,MAAC,aAAa,GAAG,kBAAkB;AACnC,MAAC,aAAa,GAAG,kBAAkB;AACnC,MAAC,gCAAgC,GAAG,sCAAsC;AAC1E,MAAC,2BAA2B,GAAG,gCAAgC;AAC/D,MAAC,oBAAoB,GAAG,yBAAyB;AACjD,MAAC,yBAAyB,GAAG,+BAA+B;AAC5D,MAAC,iBAAiB,GAAG,qBAAqB;AAC1C,MAAC,0BAA0B,GAAG,iCAAiC;AAC/D,MAAC,kCAAkC,GAAG,yCAAyC;AAC/E,MAAC,kCAAkC,GAAG;;;;"}
1
+ {"version":3,"file":"ClientConfigurationErrorCodes.mjs","sources":["../../../../../../../lib/msal-common/dist/error/ClientConfigurationErrorCodes.mjs"],"sourcesContent":["/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nconst redirectUriEmpty = \"redirect_uri_empty\";\r\nconst claimsRequestParsingError = \"claims_request_parsing_error\";\r\nconst authorityUriInsecure = \"authority_uri_insecure\";\r\nconst urlParseError = \"url_parse_error\";\r\nconst urlEmptyError = \"empty_url_error\";\r\nconst emptyInputScopesError = \"empty_input_scopes_error\";\r\nconst invalidClaims = \"invalid_claims\";\r\nconst tokenRequestEmpty = \"token_request_empty\";\r\nconst logoutRequestEmpty = \"logout_request_empty\";\r\nconst invalidCodeChallengeMethod = \"invalid_code_challenge_method\";\r\nconst pkceParamsMissing = \"pkce_params_missing\";\r\nconst invalidCloudDiscoveryMetadata = \"invalid_cloud_discovery_metadata\";\r\nconst invalidAuthorityMetadata = \"invalid_authority_metadata\";\r\nconst untrustedAuthority = \"untrusted_authority\";\r\nconst missingSshJwk = \"missing_ssh_jwk\";\r\nconst missingSshKid = \"missing_ssh_kid\";\r\nconst missingNonceAuthenticationHeader = \"missing_nonce_authentication_header\";\r\nconst invalidAuthenticationHeader = \"invalid_authentication_header\";\r\nconst cannotSetOIDCOptions = \"cannot_set_OIDCOptions\";\r\nconst cannotAllowPlatformBroker = \"cannot_allow_platform_broker\";\r\nconst authorityMismatch = \"authority_mismatch\";\r\nconst invalidRequestMethodForEAR = \"invalid_request_method_for_EAR\";\n\nexport { authorityMismatch, authorityUriInsecure, cannotAllowPlatformBroker, cannotSetOIDCOptions, claimsRequestParsingError, emptyInputScopesError, invalidAuthenticationHeader, invalidAuthorityMetadata, invalidClaims, invalidCloudDiscoveryMetadata, invalidCodeChallengeMethod, invalidRequestMethodForEAR, logoutRequestEmpty, missingNonceAuthenticationHeader, missingSshJwk, missingSshKid, pkceParamsMissing, redirectUriEmpty, tokenRequestEmpty, untrustedAuthority, urlEmptyError, urlParseError };\n//# sourceMappingURL=ClientConfigurationErrorCodes.mjs.map\n"],"names":[],"mappings":";;AAAA;AAmBK,MAAC,kBAAkB,GAAG;;;;"}
@@ -1,9 +1,8 @@
1
- /*! @azure/msal-node-extensions v1.5.26 2025-12-04 */
1
+ /*! @azure/msal-node-extensions v5.0.0-beta.0 2025-12-05 */
2
2
  'use strict';
3
- import { Constants } from '../utils/Constants.mjs';
4
3
  import { AuthError } from './AuthError.mjs';
5
4
 
6
- /*! @azure/msal-common v15.13.3 2025-12-04 */
5
+ /*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
7
6
  /**
8
7
  * Error thrown when user interaction is required.
9
8
  */
@@ -11,10 +10,10 @@ class InteractionRequiredAuthError extends AuthError {
11
10
  constructor(errorCode, errorMessage, subError, timestamp, traceId, correlationId, claims, errorNo) {
12
11
  super(errorCode, errorMessage, subError);
13
12
  Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype);
14
- this.timestamp = timestamp || Constants.EMPTY_STRING;
15
- this.traceId = traceId || Constants.EMPTY_STRING;
16
- this.correlationId = correlationId || Constants.EMPTY_STRING;
17
- this.claims = claims || Constants.EMPTY_STRING;
13
+ this.timestamp = timestamp || "";
14
+ this.traceId = traceId || "";
15
+ this.correlationId = correlationId || "";
16
+ this.claims = claims || "";
18
17
  this.name = "InteractionRequiredAuthError";
19
18
  this.errorNo = errorNo;
20
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InteractionRequiredAuthError.mjs","sources":["../../../../../../../lib/msal-common/dist/error/InteractionRequiredAuthError.mjs"],"sourcesContent":["/*! @azure/msal-common v15.13.3 2025-12-04 */\n'use strict';\nimport { Constants } from '../utils/Constants.mjs';\nimport { AuthError } from './AuthError.mjs';\nimport { badToken, nativeAccountUnavailable, noTokensFound, uxNotAllowed, refreshTokenExpired, interactionRequired, consentRequired, loginRequired } from './InteractionRequiredAuthErrorCodes.mjs';\nimport * as InteractionRequiredAuthErrorCodes from './InteractionRequiredAuthErrorCodes.mjs';\nexport { InteractionRequiredAuthErrorCodes };\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required\r\n */\r\nconst InteractionRequiredServerErrorMessage = [\r\n interactionRequired,\r\n consentRequired,\r\n loginRequired,\r\n badToken,\r\n uxNotAllowed,\r\n];\r\nconst InteractionRequiredAuthSubErrorMessage = [\r\n \"message_only\",\r\n \"additional_action\",\r\n \"basic_action\",\r\n \"user_password_expired\",\r\n \"consent_required\",\r\n \"bad_token\",\r\n];\r\nconst InteractionRequiredAuthErrorMessages = {\r\n [noTokensFound]: \"No refresh token found in the cache. Please sign-in.\",\r\n [nativeAccountUnavailable]: \"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.\",\r\n [refreshTokenExpired]: \"Refresh token has expired.\",\r\n [badToken]: \"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.\",\r\n [uxNotAllowed]: \"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve.\",\r\n};\r\n/**\r\n * Interaction required errors defined by the SDK\r\n * @deprecated Use InteractionRequiredAuthErrorCodes instead\r\n */\r\nconst InteractionRequiredAuthErrorMessage = {\r\n noTokensFoundError: {\r\n code: noTokensFound,\r\n desc: InteractionRequiredAuthErrorMessages[noTokensFound],\r\n },\r\n native_account_unavailable: {\r\n code: nativeAccountUnavailable,\r\n desc: InteractionRequiredAuthErrorMessages[nativeAccountUnavailable],\r\n },\r\n bad_token: {\r\n code: badToken,\r\n desc: InteractionRequiredAuthErrorMessages[badToken],\r\n },\r\n};\r\n/**\r\n * Error thrown when user interaction is required.\r\n */\r\nclass InteractionRequiredAuthError extends AuthError {\r\n constructor(errorCode, errorMessage, subError, timestamp, traceId, correlationId, claims, errorNo) {\r\n super(errorCode, errorMessage, subError);\r\n Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype);\r\n this.timestamp = timestamp || Constants.EMPTY_STRING;\r\n this.traceId = traceId || Constants.EMPTY_STRING;\r\n this.correlationId = correlationId || Constants.EMPTY_STRING;\r\n this.claims = claims || Constants.EMPTY_STRING;\r\n this.name = \"InteractionRequiredAuthError\";\r\n this.errorNo = errorNo;\r\n }\r\n}\r\n/**\r\n * Helper function used to determine if an error thrown by the server requires interaction to resolve\r\n * @param errorCode\r\n * @param errorString\r\n * @param subError\r\n */\r\nfunction isInteractionRequiredError(errorCode, errorString, subError) {\r\n const isInteractionRequiredErrorCode = !!errorCode &&\r\n InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1;\r\n const isInteractionRequiredSubError = !!subError &&\r\n InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1;\r\n const isInteractionRequiredErrorDesc = !!errorString &&\r\n InteractionRequiredServerErrorMessage.some((irErrorCode) => {\r\n return errorString.indexOf(irErrorCode) > -1;\r\n });\r\n return (isInteractionRequiredErrorCode ||\r\n isInteractionRequiredErrorDesc ||\r\n isInteractionRequiredSubError);\r\n}\r\n/**\r\n * Creates an InteractionRequiredAuthError\r\n */\r\nfunction createInteractionRequiredAuthError(errorCode) {\r\n return new InteractionRequiredAuthError(errorCode, InteractionRequiredAuthErrorMessages[errorCode]);\r\n}\n\nexport { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, InteractionRequiredAuthSubErrorMessage, InteractionRequiredServerErrorMessage, createInteractionRequiredAuthError, isInteractionRequiredError };\n//# sourceMappingURL=InteractionRequiredAuthError.mjs.map\n"],"names":[],"mappings":";;;;;AAAA;AAuDA;AACA;AACA;AACA,MAAM,4BAA4B,SAAS,SAAS,CAAC;AACrD,IAAI,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE;AACvG,QAAQ,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AACjD,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC;AAC5E,QAAQ,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,SAAS,CAAC,YAAY,CAAC;AAC7D,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,SAAS,CAAC,YAAY,CAAC;AACzD,QAAQ,IAAI,CAAC,aAAa,GAAG,aAAa,IAAI,SAAS,CAAC,YAAY,CAAC;AACrE,QAAQ,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,SAAS,CAAC,YAAY,CAAC;AACvD,QAAQ,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;AACnD,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,KAAK;AACL;;;;"}
1
+ {"version":3,"file":"InteractionRequiredAuthError.mjs","sources":["../../../../../../../lib/msal-common/dist/error/InteractionRequiredAuthError.mjs"],"sourcesContent":["/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */\n'use strict';\nimport { AuthError } from './AuthError.mjs';\nimport { interactionRequired, consentRequired, loginRequired, badToken, uxNotAllowed } from './InteractionRequiredAuthErrorCodes.mjs';\nimport * as InteractionRequiredAuthErrorCodes from './InteractionRequiredAuthErrorCodes.mjs';\nexport { InteractionRequiredAuthErrorCodes };\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * InteractionRequiredServerErrorMessage contains string constants used by error codes and messages returned by the server indicating interaction is required\r\n */\r\nconst InteractionRequiredServerErrorMessage = [\r\n interactionRequired,\r\n consentRequired,\r\n loginRequired,\r\n badToken,\r\n uxNotAllowed,\r\n];\r\nconst InteractionRequiredAuthSubErrorMessage = [\r\n \"message_only\",\r\n \"additional_action\",\r\n \"basic_action\",\r\n \"user_password_expired\",\r\n \"consent_required\",\r\n \"bad_token\",\r\n \"ux_not_allowed\",\r\n];\r\n/**\r\n * Error thrown when user interaction is required.\r\n */\r\nclass InteractionRequiredAuthError extends AuthError {\r\n constructor(errorCode, errorMessage, subError, timestamp, traceId, correlationId, claims, errorNo) {\r\n super(errorCode, errorMessage, subError);\r\n Object.setPrototypeOf(this, InteractionRequiredAuthError.prototype);\r\n this.timestamp = timestamp || \"\";\r\n this.traceId = traceId || \"\";\r\n this.correlationId = correlationId || \"\";\r\n this.claims = claims || \"\";\r\n this.name = \"InteractionRequiredAuthError\";\r\n this.errorNo = errorNo;\r\n }\r\n}\r\n/**\r\n * Helper function used to determine if an error thrown by the server requires interaction to resolve\r\n * @param errorCode\r\n * @param errorString\r\n * @param subError\r\n */\r\nfunction isInteractionRequiredError(errorCode, errorString, subError) {\r\n const isInteractionRequiredErrorCode = !!errorCode &&\r\n InteractionRequiredServerErrorMessage.indexOf(errorCode) > -1;\r\n const isInteractionRequiredSubError = !!subError &&\r\n InteractionRequiredAuthSubErrorMessage.indexOf(subError) > -1;\r\n const isInteractionRequiredErrorDesc = !!errorString &&\r\n InteractionRequiredServerErrorMessage.some((irErrorCode) => {\r\n return errorString.indexOf(irErrorCode) > -1;\r\n });\r\n return (isInteractionRequiredErrorCode ||\r\n isInteractionRequiredErrorDesc ||\r\n isInteractionRequiredSubError);\r\n}\r\n/**\r\n * Creates an InteractionRequiredAuthError\r\n */\r\nfunction createInteractionRequiredAuthError(errorCode, errorMessage) {\r\n return new InteractionRequiredAuthError(errorCode, errorMessage);\r\n}\n\nexport { InteractionRequiredAuthError, InteractionRequiredAuthSubErrorMessage, InteractionRequiredServerErrorMessage, createInteractionRequiredAuthError, isInteractionRequiredError };\n//# sourceMappingURL=InteractionRequiredAuthError.mjs.map\n"],"names":[],"mappings":";;;;AAAA;AA8BA;AACA;AACA;AACA,MAAM,4BAA4B,SAAS,SAAS,CAAC;AACrD,IAAI,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE;AACvG,QAAQ,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AACjD,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC;AAC5E,QAAQ,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;AACzC,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;AACrC,QAAQ,IAAI,CAAC,aAAa,GAAG,aAAa,IAAI,EAAE,CAAC;AACjD,QAAQ,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;AACnC,QAAQ,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;AACnD,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,KAAK;AACL;;;;"}
@@ -1,15 +1,16 @@
1
- /*! @azure/msal-node-extensions v1.5.26 2025-12-04 */
1
+ /*! @azure/msal-node-extensions v5.0.0-beta.0 2025-12-05 */
2
2
  'use strict';
3
3
  import { AuthError } from './AuthError.mjs';
4
4
 
5
- /*! @azure/msal-common v15.13.3 2025-12-04 */
5
+ /*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
6
6
 
7
7
  /*
8
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
9
9
  * Licensed under the MIT License.
10
10
  */
11
11
  /**
12
- * Converts a numeric tag to a string representation
12
+ * Converts a numeric tag from MSAL Runtime to a 5-character string representation.
13
+ * Tags are encoded as 30-bit values (6 bits per character) using a custom symbol space.
13
14
  * @param tag - The numeric tag to convert
14
15
  * @returns The string representation of the tag
15
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformBrokerError.mjs","sources":["../../../../../../../lib/msal-common/dist/error/PlatformBrokerError.mjs"],"sourcesContent":["/*! @azure/msal-common v15.13.3 2025-12-04 */\n'use strict';\nimport { AuthError } from './AuthError.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Converts a numeric tag to a string representation\r\n * @param tag - The numeric tag to convert\r\n * @returns The string representation of the tag\r\n */\r\nfunction tagToString(tag) {\r\n if (tag === 0) {\r\n return \"UNTAG\";\r\n }\r\n const tagSymbolSpace = \"abcdefghijklmnopqrstuvwxyz0123456789****************************\";\r\n let tagBuffer = \"*****\";\r\n const chars = [\r\n tagSymbolSpace[(tag >> 24) & 0x3f],\r\n tagSymbolSpace[(tag >> 18) & 0x3f],\r\n tagSymbolSpace[(tag >> 12) & 0x3f],\r\n tagSymbolSpace[(tag >> 6) & 0x3f],\r\n tagSymbolSpace[(tag >> 0) & 0x3f],\r\n ];\r\n tagBuffer = chars.join(\"\");\r\n return tagBuffer;\r\n}\r\n/**\r\n * Error class for MSAL Runtime errors that preserves detailed broker information\r\n */\r\nclass PlatformBrokerError extends AuthError {\r\n constructor(errorStatus, errorContext, errorCode, errorTag) {\r\n const tagString = tagToString(errorTag);\r\n const enhancedErrorContext = errorContext\r\n ? `${errorContext} (Error Code: ${errorCode}, Tag: ${tagString})`\r\n : `(Error Code: ${errorCode}, Tag: ${tagString})`;\r\n super(errorStatus, enhancedErrorContext);\r\n this.name = \"PlatformBrokerError\";\r\n this.statusCode = errorCode;\r\n this.tag = tagString;\r\n Object.setPrototypeOf(this, PlatformBrokerError.prototype);\r\n }\r\n}\n\nexport { PlatformBrokerError };\n//# sourceMappingURL=PlatformBrokerError.mjs.map\n"],"names":[],"mappings":";;;;AAAA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAW,CAAC,GAAG,EAAE;AAC1B,IAAI,IAAI,GAAG,KAAK,CAAC,EAAE;AACnB,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,MAAM,cAAc,GAAG,kEAAkE,CAAC;AAC9F,IAAI,IAAI,SAAS,GAAG,OAAO,CAAC;AAC5B,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,cAAc,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,IAAI,CAAC;AAC1C,QAAQ,cAAc,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,IAAI,CAAC;AAC1C,QAAQ,cAAc,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,IAAI,CAAC;AAC1C,QAAQ,cAAc,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC;AACzC,QAAQ,cAAc,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC;AACzC,KAAK,CAAC;AACN,IAAI,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,OAAO,SAAS,CAAC;AACrB,CAAC;AACD;AACA;AACA;AACA,MAAM,mBAAmB,SAAS,SAAS,CAAC;AAC5C,IAAI,WAAW,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE;AAChE,QAAQ,MAAM,SAAS,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;AAChD,QAAQ,MAAM,oBAAoB,GAAG,YAAY;AACjD,cAAc,CAAC,EAAE,YAAY,CAAC,cAAc,EAAE,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AAC7E,cAAc,CAAC,aAAa,EAAE,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAC9D,QAAQ,KAAK,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;AACjD,QAAQ,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;AAC1C,QAAQ,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;AACpC,QAAQ,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC;AAC7B,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;AACnE,KAAK;AACL;;;;"}
1
+ {"version":3,"file":"PlatformBrokerError.mjs","sources":["../../../../../../../lib/msal-common/dist/error/PlatformBrokerError.mjs"],"sourcesContent":["/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */\n'use strict';\nimport { AuthError } from './AuthError.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Converts a numeric tag from MSAL Runtime to a 5-character string representation.\r\n * Tags are encoded as 30-bit values (6 bits per character) using a custom symbol space.\r\n * @param tag - The numeric tag to convert\r\n * @returns The string representation of the tag\r\n */\r\nfunction tagToString(tag) {\r\n if (tag === 0) {\r\n return \"UNTAG\";\r\n }\r\n const tagSymbolSpace = \"abcdefghijklmnopqrstuvwxyz0123456789****************************\";\r\n let tagBuffer = \"*****\";\r\n const chars = [\r\n tagSymbolSpace[(tag >> 24) & 0x3f],\r\n tagSymbolSpace[(tag >> 18) & 0x3f],\r\n tagSymbolSpace[(tag >> 12) & 0x3f],\r\n tagSymbolSpace[(tag >> 6) & 0x3f],\r\n tagSymbolSpace[(tag >> 0) & 0x3f],\r\n ];\r\n tagBuffer = chars.join(\"\");\r\n return tagBuffer;\r\n}\r\n/**\r\n * Error class for MSAL Runtime errors that preserves detailed broker information\r\n */\r\nclass PlatformBrokerError extends AuthError {\r\n constructor(errorStatus, errorContext, errorCode, errorTag) {\r\n const tagString = tagToString(errorTag);\r\n const enhancedErrorContext = errorContext\r\n ? `${errorContext} (Error Code: ${errorCode}, Tag: ${tagString})`\r\n : `(Error Code: ${errorCode}, Tag: ${tagString})`;\r\n super(errorStatus, enhancedErrorContext);\r\n this.name = \"PlatformBrokerError\";\r\n this.statusCode = errorCode;\r\n this.tag = tagString;\r\n Object.setPrototypeOf(this, PlatformBrokerError.prototype);\r\n }\r\n}\n\nexport { PlatformBrokerError };\n//# sourceMappingURL=PlatformBrokerError.mjs.map\n"],"names":[],"mappings":";;;;AAAA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,WAAW,CAAC,GAAG,EAAE;AAC1B,IAAI,IAAI,GAAG,KAAK,CAAC,EAAE;AACnB,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,MAAM,cAAc,GAAG,kEAAkE,CAAC;AAC9F,IAAI,IAAI,SAAS,GAAG,OAAO,CAAC;AAC5B,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,cAAc,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,IAAI,CAAC;AAC1C,QAAQ,cAAc,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,IAAI,CAAC;AAC1C,QAAQ,cAAc,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,IAAI,CAAC;AAC1C,QAAQ,cAAc,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC;AACzC,QAAQ,cAAc,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC;AACzC,KAAK,CAAC;AACN,IAAI,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,OAAO,SAAS,CAAC;AACrB,CAAC;AACD;AACA;AACA;AACA,MAAM,mBAAmB,SAAS,SAAS,CAAC;AAC5C,IAAI,WAAW,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE;AAChE,QAAQ,MAAM,SAAS,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;AAChD,QAAQ,MAAM,oBAAoB,GAAG,YAAY;AACjD,cAAc,CAAC,EAAE,YAAY,CAAC,cAAc,EAAE,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AAC7E,cAAc,CAAC,aAAa,EAAE,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAC9D,QAAQ,KAAK,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;AACjD,QAAQ,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;AAC1C,QAAQ,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;AACpC,QAAQ,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC;AAC7B,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;AACnE,KAAK;AACL;;;;"}
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-node-extensions v1.5.26 2025-12-04 */
1
+ /*! @azure/msal-node-extensions v5.0.0-beta.0 2025-12-05 */
2
2
  'use strict';
3
3
  import { AuthError } from './AuthError.mjs';
4
4
 
5
- /*! @azure/msal-common v15.13.3 2025-12-04 */
5
+ /*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
6
6
 
7
7
  /*
8
8
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1 +1 @@
1
- {"version":3,"file":"ServerError.mjs","sources":["../../../../../../../lib/msal-common/dist/error/ServerError.mjs"],"sourcesContent":["/*! @azure/msal-common v15.13.3 2025-12-04 */\n'use strict';\nimport { AuthError } from './AuthError.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Error thrown when there is an error with the server code, for example, unavailability.\r\n */\r\nclass ServerError extends AuthError {\r\n constructor(errorCode, errorMessage, subError, errorNo, status) {\r\n super(errorCode, errorMessage, subError);\r\n this.name = \"ServerError\";\r\n this.errorNo = errorNo;\r\n this.status = status;\r\n Object.setPrototypeOf(this, ServerError.prototype);\r\n }\r\n}\n\nexport { ServerError };\n//# sourceMappingURL=ServerError.mjs.map\n"],"names":[],"mappings":";;;;AAAA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,SAAS,SAAS,CAAC;AACpC,IAAI,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE;AACpE,QAAQ,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AACjD,QAAQ,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;AAClC,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,QAAQ,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AAC7B,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;AAC3D,KAAK;AACL;;;;"}
1
+ {"version":3,"file":"ServerError.mjs","sources":["../../../../../../../lib/msal-common/dist/error/ServerError.mjs"],"sourcesContent":["/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */\n'use strict';\nimport { AuthError } from './AuthError.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Error thrown when there is an error with the server code, for example, unavailability.\r\n */\r\nclass ServerError extends AuthError {\r\n constructor(errorCode, errorMessage, subError, errorNo, status) {\r\n super(errorCode, errorMessage, subError);\r\n this.name = \"ServerError\";\r\n this.errorNo = errorNo;\r\n this.status = status;\r\n Object.setPrototypeOf(this, ServerError.prototype);\r\n }\r\n}\n\nexport { ServerError };\n//# sourceMappingURL=ServerError.mjs.map\n"],"names":[],"mappings":";;;;AAAA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,SAAS,SAAS,CAAC;AACpC,IAAI,WAAW,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE;AACpE,QAAQ,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AACjD,QAAQ,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;AAClC,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,QAAQ,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AAC7B,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;AAC3D,KAAK;AACL;;;;"}
@@ -1,9 +1,6 @@
1
- /*! @azure/msal-node-extensions v1.5.26 2025-12-04 */
1
+ /*! @azure/msal-node-extensions v5.0.0-beta.0 2025-12-05 */
2
2
  'use strict';
3
- import { Constants } from '../utils/Constants.mjs';
4
-
5
- /*! @azure/msal-common v15.13.3 2025-12-04 */
6
-
3
+ /*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */
7
4
  /*
8
5
  * Copyright (c) Microsoft Corporation. All rights reserved.
9
6
  * Licensed under the MIT License.
@@ -19,6 +16,70 @@ var LogLevel;
19
16
  LogLevel[LogLevel["Verbose"] = 3] = "Verbose";
20
17
  LogLevel[LogLevel["Trace"] = 4] = "Trace";
21
18
  })(LogLevel || (LogLevel = {}));
19
+ // Shared cache state for better minification - using Map's insertion order for LRU
20
+ const CACHE_CAPACITY = 50;
21
+ const MAX_LOGS_PER_CORRELATION = 500;
22
+ const correlationCache = new Map();
23
+ /**
24
+ * Mark correlation ID as recently used by moving it to end of Map
25
+ * @param correlationId
26
+ * @param {CorrelationLogData} data
27
+ */
28
+ function markAsRecentlyUsed(correlationId, data) {
29
+ correlationCache.delete(correlationId);
30
+ correlationCache.set(correlationId, data);
31
+ }
32
+ /**
33
+ * Add log message to cache for specific correlation ID
34
+ * @param correlationId
35
+ * @param {LoggedMessage} loggedMessage
36
+ */
37
+ function addLogToCache(correlationId, loggedMessage) {
38
+ const currentTime = Date.now();
39
+ let data = correlationCache.get(correlationId);
40
+ if (data) {
41
+ // Mark as recently used
42
+ markAsRecentlyUsed(correlationId, data);
43
+ }
44
+ else {
45
+ // Create new entry
46
+ data = { logs: [], firstEventTime: currentTime };
47
+ correlationCache.set(correlationId, data);
48
+ // Remove LRU (first entry) if capacity exceeded
49
+ if (correlationCache.size > CACHE_CAPACITY) {
50
+ const firstKey = correlationCache.keys().next().value;
51
+ if (firstKey) {
52
+ correlationCache.delete(firstKey);
53
+ }
54
+ }
55
+ }
56
+ // Add log to the data, maintaining max logs per correlation
57
+ data.logs.push({
58
+ ...loggedMessage,
59
+ milliseconds: currentTime - data.firstEventTime,
60
+ });
61
+ if (data.logs.length > MAX_LOGS_PER_CORRELATION) {
62
+ data.logs.shift(); // Remove oldest log
63
+ }
64
+ }
65
+ /**
66
+ * Checks if a string is already a hashed logging string (6 alphanumeric characters)
67
+ */
68
+ function isHashedString(str) {
69
+ if (str.length !== 6) {
70
+ return false;
71
+ }
72
+ for (let i = 0; i < str.length; i++) {
73
+ const char = str[i];
74
+ const isAlphaNumeric = (char >= "a" && char <= "z") ||
75
+ (char >= "A" && char <= "Z") ||
76
+ (char >= "0" && char <= "9");
77
+ if (!isAlphaNumeric) {
78
+ return false;
79
+ }
80
+ }
81
+ return true;
82
+ }
22
83
  /**
23
84
  * Class which facilitates logging of messages to a specific place.
24
85
  */
@@ -37,10 +98,8 @@ class Logger {
37
98
  typeof setLoggerOptions.logLevel === "number"
38
99
  ? setLoggerOptions.logLevel
39
100
  : LogLevel.Info;
40
- this.correlationId =
41
- setLoggerOptions.correlationId || Constants.EMPTY_STRING;
42
- this.packageName = packageName || Constants.EMPTY_STRING;
43
- this.packageVersion = packageVersion || Constants.EMPTY_STRING;
101
+ this.packageName = packageName || "";
102
+ this.packageVersion = packageVersion || "";
44
103
  }
45
104
  static createDefaultLoggerOptions() {
46
105
  return {
@@ -54,27 +113,36 @@ class Logger {
54
113
  /**
55
114
  * Create new Logger with existing configurations.
56
115
  */
57
- clone(packageName, packageVersion, correlationId) {
116
+ clone(packageName, packageVersion) {
58
117
  return new Logger({
59
118
  loggerCallback: this.localCallback,
60
119
  piiLoggingEnabled: this.piiLoggingEnabled,
61
120
  logLevel: this.level,
62
- correlationId: correlationId || this.correlationId,
63
121
  }, packageName, packageVersion);
64
122
  }
65
123
  /**
66
124
  * Log message with required options.
67
125
  */
68
126
  logMessage(logMessage, options) {
127
+ const correlationId = options.correlationId;
128
+ const isHashedInput = isHashedString(logMessage);
129
+ if (isHashedInput) {
130
+ const loggedMessage = {
131
+ hash: logMessage,
132
+ level: options.logLevel,
133
+ containsPii: options.containsPii || false,
134
+ milliseconds: 0, // Will be calculated in addLogToCache
135
+ };
136
+ addLogToCache(correlationId, loggedMessage);
137
+ }
69
138
  if (options.logLevel > this.level ||
70
139
  (!this.piiLoggingEnabled && options.containsPii)) {
71
140
  return;
72
141
  }
73
142
  const timestamp = new Date().toUTCString();
74
143
  // Add correlationId to logs if set, correlationId provided on log messages take precedence
75
- const logHeader = `[${timestamp}] : [${options.correlationId || this.correlationId || ""}]`;
144
+ const logHeader = `[${timestamp}] : [${correlationId}]`;
76
145
  const log = `${logHeader} : ${this.packageName}@${this.packageVersion} : ${LogLevel[options.logLevel]} - ${logMessage}`;
77
- // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? "-Pii": Constants.EMPTY_STRING}${options.context ? `:${options.context}` : Constants.EMPTY_STRING}`)(logMessage);
78
146
  this.executeCallback(options.logLevel, log, options.containsPii || false);
79
147
  }
80
148
  /**
@@ -92,7 +160,7 @@ class Logger {
92
160
  this.logMessage(message, {
93
161
  logLevel: LogLevel.Error,
94
162
  containsPii: false,
95
- correlationId: correlationId || Constants.EMPTY_STRING,
163
+ correlationId: correlationId,
96
164
  });
97
165
  }
98
166
  /**
@@ -102,7 +170,7 @@ class Logger {
102
170
  this.logMessage(message, {
103
171
  logLevel: LogLevel.Error,
104
172
  containsPii: true,
105
- correlationId: correlationId || Constants.EMPTY_STRING,
173
+ correlationId: correlationId,
106
174
  });
107
175
  }
108
176
  /**
@@ -112,7 +180,7 @@ class Logger {
112
180
  this.logMessage(message, {
113
181
  logLevel: LogLevel.Warning,
114
182
  containsPii: false,
115
- correlationId: correlationId || Constants.EMPTY_STRING,
183
+ correlationId: correlationId,
116
184
  });
117
185
  }
118
186
  /**
@@ -122,7 +190,7 @@ class Logger {
122
190
  this.logMessage(message, {
123
191
  logLevel: LogLevel.Warning,
124
192
  containsPii: true,
125
- correlationId: correlationId || Constants.EMPTY_STRING,
193
+ correlationId: correlationId,
126
194
  });
127
195
  }
128
196
  /**
@@ -132,7 +200,7 @@ class Logger {
132
200
  this.logMessage(message, {
133
201
  logLevel: LogLevel.Info,
134
202
  containsPii: false,
135
- correlationId: correlationId || Constants.EMPTY_STRING,
203
+ correlationId: correlationId,
136
204
  });
137
205
  }
138
206
  /**
@@ -142,7 +210,7 @@ class Logger {
142
210
  this.logMessage(message, {
143
211
  logLevel: LogLevel.Info,
144
212
  containsPii: true,
145
- correlationId: correlationId || Constants.EMPTY_STRING,
213
+ correlationId: correlationId,
146
214
  });
147
215
  }
148
216
  /**
@@ -152,7 +220,7 @@ class Logger {
152
220
  this.logMessage(message, {
153
221
  logLevel: LogLevel.Verbose,
154
222
  containsPii: false,
155
- correlationId: correlationId || Constants.EMPTY_STRING,
223
+ correlationId: correlationId,
156
224
  });
157
225
  }
158
226
  /**
@@ -162,7 +230,7 @@ class Logger {
162
230
  this.logMessage(message, {
163
231
  logLevel: LogLevel.Verbose,
164
232
  containsPii: true,
165
- correlationId: correlationId || Constants.EMPTY_STRING,
233
+ correlationId: correlationId,
166
234
  });
167
235
  }
168
236
  /**
@@ -172,7 +240,7 @@ class Logger {
172
240
  this.logMessage(message, {
173
241
  logLevel: LogLevel.Trace,
174
242
  containsPii: false,
175
- correlationId: correlationId || Constants.EMPTY_STRING,
243
+ correlationId: correlationId,
176
244
  });
177
245
  }
178
246
  /**
@@ -182,7 +250,7 @@ class Logger {
182
250
  this.logMessage(message, {
183
251
  logLevel: LogLevel.Trace,
184
252
  containsPii: true,
185
- correlationId: correlationId || Constants.EMPTY_STRING,
253
+ correlationId: correlationId,
186
254
  });
187
255
  }
188
256
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Logger.mjs","sources":["../../../../../../../lib/msal-common/dist/logger/Logger.mjs"],"sourcesContent":["/*! @azure/msal-common v15.13.3 2025-12-04 */\n'use strict';\nimport { Constants } from '../utils/Constants.mjs';\n\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Log message level.\r\n */\r\nvar LogLevel;\r\n(function (LogLevel) {\r\n LogLevel[LogLevel[\"Error\"] = 0] = \"Error\";\r\n LogLevel[LogLevel[\"Warning\"] = 1] = \"Warning\";\r\n LogLevel[LogLevel[\"Info\"] = 2] = \"Info\";\r\n LogLevel[LogLevel[\"Verbose\"] = 3] = \"Verbose\";\r\n LogLevel[LogLevel[\"Trace\"] = 4] = \"Trace\";\r\n})(LogLevel || (LogLevel = {}));\r\n/**\r\n * Class which facilitates logging of messages to a specific place.\r\n */\r\nclass Logger {\r\n constructor(loggerOptions, packageName, packageVersion) {\r\n // Current log level, defaults to info.\r\n this.level = LogLevel.Info;\r\n const defaultLoggerCallback = () => {\r\n return;\r\n };\r\n const setLoggerOptions = loggerOptions || Logger.createDefaultLoggerOptions();\r\n this.localCallback =\r\n setLoggerOptions.loggerCallback || defaultLoggerCallback;\r\n this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false;\r\n this.level =\r\n typeof setLoggerOptions.logLevel === \"number\"\r\n ? setLoggerOptions.logLevel\r\n : LogLevel.Info;\r\n this.correlationId =\r\n setLoggerOptions.correlationId || Constants.EMPTY_STRING;\r\n this.packageName = packageName || Constants.EMPTY_STRING;\r\n this.packageVersion = packageVersion || Constants.EMPTY_STRING;\r\n }\r\n static createDefaultLoggerOptions() {\r\n return {\r\n loggerCallback: () => {\r\n // allow users to not set loggerCallback\r\n },\r\n piiLoggingEnabled: false,\r\n logLevel: LogLevel.Info,\r\n };\r\n }\r\n /**\r\n * Create new Logger with existing configurations.\r\n */\r\n clone(packageName, packageVersion, correlationId) {\r\n return new Logger({\r\n loggerCallback: this.localCallback,\r\n piiLoggingEnabled: this.piiLoggingEnabled,\r\n logLevel: this.level,\r\n correlationId: correlationId || this.correlationId,\r\n }, packageName, packageVersion);\r\n }\r\n /**\r\n * Log message with required options.\r\n */\r\n logMessage(logMessage, options) {\r\n if (options.logLevel > this.level ||\r\n (!this.piiLoggingEnabled && options.containsPii)) {\r\n return;\r\n }\r\n const timestamp = new Date().toUTCString();\r\n // Add correlationId to logs if set, correlationId provided on log messages take precedence\r\n const logHeader = `[${timestamp}] : [${options.correlationId || this.correlationId || \"\"}]`;\r\n const log = `${logHeader} : ${this.packageName}@${this.packageVersion} : ${LogLevel[options.logLevel]} - ${logMessage}`;\r\n // debug(`msal:${LogLevel[options.logLevel]}${options.containsPii ? \"-Pii\": Constants.EMPTY_STRING}${options.context ? `:${options.context}` : Constants.EMPTY_STRING}`)(logMessage);\r\n this.executeCallback(options.logLevel, log, options.containsPii || false);\r\n }\r\n /**\r\n * Execute callback with message.\r\n */\r\n executeCallback(level, message, containsPii) {\r\n if (this.localCallback) {\r\n this.localCallback(level, message, containsPii);\r\n }\r\n }\r\n /**\r\n * Logs error messages.\r\n */\r\n error(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Error,\r\n containsPii: false,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs error messages with PII.\r\n */\r\n errorPii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Error,\r\n containsPii: true,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs warning messages.\r\n */\r\n warning(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Warning,\r\n containsPii: false,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs warning messages with PII.\r\n */\r\n warningPii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Warning,\r\n containsPii: true,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs info messages.\r\n */\r\n info(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Info,\r\n containsPii: false,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs info messages with PII.\r\n */\r\n infoPii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Info,\r\n containsPii: true,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs verbose messages.\r\n */\r\n verbose(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Verbose,\r\n containsPii: false,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs verbose messages with PII.\r\n */\r\n verbosePii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Verbose,\r\n containsPii: true,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs trace messages.\r\n */\r\n trace(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Trace,\r\n containsPii: false,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Logs trace messages with PII.\r\n */\r\n tracePii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Trace,\r\n containsPii: true,\r\n correlationId: correlationId || Constants.EMPTY_STRING,\r\n });\r\n }\r\n /**\r\n * Returns whether PII Logging is enabled or not.\r\n */\r\n isPiiLoggingEnabled() {\r\n return this.piiLoggingEnabled || false;\r\n }\r\n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C,YAAY,QAAQ,EAAE,QAAQ,CAAC,OAAO;AACtC,YAAY,WAAW,EAAE,KAAK;AAC9B,YAAY,aAAa,EAAE,aAAa,IAAI,SAAS,CAAC,YAAY;AAClE,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA,IAAI,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE;AACvC,QAAQ,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;AACjC,YAAY,QAAQ,EAAE,QAAQ,CAAC,OAAO;AACtC,YAAY,WAAW,EAAE,IAAI;AAC7B,YAAY,aAAa,EAAE,aAAa,IAAI,SAAS,CAAC,YAAY;AAClE,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA,IAAI,KAAK,CAAC,OAAO,EAAE,aAAa,EAAE;AAClC,QAAQ,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;AACjC,YAAY,QAAQ,EAAE,QAAQ,CAAC,KAAK;AACpC,YAAY,WAAW,EAAE,KAAK;AAC9B,YAAY,aAAa,EAAE,aAAa,IAAI,SAAS,CAAC,YAAY;AAClE,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA,IAAI,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE;AACrC,QAAQ,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE;AACjC,YAAY,QAAQ,EAAE,QAAQ,CAAC,KAAK;AACpC,YAAY,WAAW,EAAE,IAAI;AAC7B,YAAY,aAAa,EAAE,aAAa,IAAI,SAAS,CAAC,YAAY;AAClE,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA,IAAI,mBAAmB,GAAG;AAC1B,QAAQ,OAAO,IAAI,CAAC,iBAAiB,IAAI,KAAK,CAAC;AAC/C,KAAK;AACL;;;;"}
1
+ {"version":3,"file":"Logger.mjs","sources":["../../../../../../../lib/msal-common/dist/logger/Logger.mjs"],"sourcesContent":["/*! @azure/msal-common v16.0.0-beta.0 2025-12-05 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n/**\r\n * Log message level.\r\n */\r\nvar LogLevel;\r\n(function (LogLevel) {\r\n LogLevel[LogLevel[\"Error\"] = 0] = \"Error\";\r\n LogLevel[LogLevel[\"Warning\"] = 1] = \"Warning\";\r\n LogLevel[LogLevel[\"Info\"] = 2] = \"Info\";\r\n LogLevel[LogLevel[\"Verbose\"] = 3] = \"Verbose\";\r\n LogLevel[LogLevel[\"Trace\"] = 4] = \"Trace\";\r\n})(LogLevel || (LogLevel = {}));\r\n// Shared cache state for better minification - using Map's insertion order for LRU\r\nconst CACHE_CAPACITY = 50;\r\nconst MAX_LOGS_PER_CORRELATION = 500;\r\nconst correlationCache = new Map();\r\n/**\r\n * Mark correlation ID as recently used by moving it to end of Map\r\n * @param correlationId\r\n * @param {CorrelationLogData} data\r\n */\r\nfunction markAsRecentlyUsed(correlationId, data) {\r\n correlationCache.delete(correlationId);\r\n correlationCache.set(correlationId, data);\r\n}\r\n/**\r\n * Add log message to cache for specific correlation ID\r\n * @param correlationId\r\n * @param {LoggedMessage} loggedMessage\r\n */\r\nfunction addLogToCache(correlationId, loggedMessage) {\r\n const currentTime = Date.now();\r\n let data = correlationCache.get(correlationId);\r\n if (data) {\r\n // Mark as recently used\r\n markAsRecentlyUsed(correlationId, data);\r\n }\r\n else {\r\n // Create new entry\r\n data = { logs: [], firstEventTime: currentTime };\r\n correlationCache.set(correlationId, data);\r\n // Remove LRU (first entry) if capacity exceeded\r\n if (correlationCache.size > CACHE_CAPACITY) {\r\n const firstKey = correlationCache.keys().next().value;\r\n if (firstKey) {\r\n correlationCache.delete(firstKey);\r\n }\r\n }\r\n }\r\n // Add log to the data, maintaining max logs per correlation\r\n data.logs.push({\r\n ...loggedMessage,\r\n milliseconds: currentTime - data.firstEventTime,\r\n });\r\n if (data.logs.length > MAX_LOGS_PER_CORRELATION) {\r\n data.logs.shift(); // Remove oldest log\r\n }\r\n}\r\n/**\r\n * Get logs for correlation ID and flush them from cache\r\n * Attaches logs with empty correlation id to the requested correlation logs\r\n * @param correlationId\r\n */\r\nfunction getAndFlushLogsFromCache(correlationId) {\r\n const res = [];\r\n for (const id of [\"\", correlationId]) {\r\n const data = correlationCache.get(id);\r\n res.push(...(data?.logs ?? []));\r\n correlationCache.delete(id); // Remove the correlation ID completely from cache\r\n }\r\n return res;\r\n}\r\n/**\r\n * Checks if a string is already a hashed logging string (6 alphanumeric characters)\r\n */\r\nfunction isHashedString(str) {\r\n if (str.length !== 6) {\r\n return false;\r\n }\r\n for (let i = 0; i < str.length; i++) {\r\n const char = str[i];\r\n const isAlphaNumeric = (char >= \"a\" && char <= \"z\") ||\r\n (char >= \"A\" && char <= \"Z\") ||\r\n (char >= \"0\" && char <= \"9\");\r\n if (!isAlphaNumeric) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n/**\r\n * Class which facilitates logging of messages to a specific place.\r\n */\r\nclass Logger {\r\n constructor(loggerOptions, packageName, packageVersion) {\r\n // Current log level, defaults to info.\r\n this.level = LogLevel.Info;\r\n const defaultLoggerCallback = () => {\r\n return;\r\n };\r\n const setLoggerOptions = loggerOptions || Logger.createDefaultLoggerOptions();\r\n this.localCallback =\r\n setLoggerOptions.loggerCallback || defaultLoggerCallback;\r\n this.piiLoggingEnabled = setLoggerOptions.piiLoggingEnabled || false;\r\n this.level =\r\n typeof setLoggerOptions.logLevel === \"number\"\r\n ? setLoggerOptions.logLevel\r\n : LogLevel.Info;\r\n this.packageName = packageName || \"\";\r\n this.packageVersion = packageVersion || \"\";\r\n }\r\n static createDefaultLoggerOptions() {\r\n return {\r\n loggerCallback: () => {\r\n // allow users to not set loggerCallback\r\n },\r\n piiLoggingEnabled: false,\r\n logLevel: LogLevel.Info,\r\n };\r\n }\r\n /**\r\n * Create new Logger with existing configurations.\r\n */\r\n clone(packageName, packageVersion) {\r\n return new Logger({\r\n loggerCallback: this.localCallback,\r\n piiLoggingEnabled: this.piiLoggingEnabled,\r\n logLevel: this.level,\r\n }, packageName, packageVersion);\r\n }\r\n /**\r\n * Log message with required options.\r\n */\r\n logMessage(logMessage, options) {\r\n const correlationId = options.correlationId;\r\n const isHashedInput = isHashedString(logMessage);\r\n if (isHashedInput) {\r\n const loggedMessage = {\r\n hash: logMessage,\r\n level: options.logLevel,\r\n containsPii: options.containsPii || false,\r\n milliseconds: 0, // Will be calculated in addLogToCache\r\n };\r\n addLogToCache(correlationId, loggedMessage);\r\n }\r\n if (options.logLevel > this.level ||\r\n (!this.piiLoggingEnabled && options.containsPii)) {\r\n return;\r\n }\r\n const timestamp = new Date().toUTCString();\r\n // Add correlationId to logs if set, correlationId provided on log messages take precedence\r\n const logHeader = `[${timestamp}] : [${correlationId}]`;\r\n const log = `${logHeader} : ${this.packageName}@${this.packageVersion} : ${LogLevel[options.logLevel]} - ${logMessage}`;\r\n this.executeCallback(options.logLevel, log, options.containsPii || false);\r\n }\r\n /**\r\n * Execute callback with message.\r\n */\r\n executeCallback(level, message, containsPii) {\r\n if (this.localCallback) {\r\n this.localCallback(level, message, containsPii);\r\n }\r\n }\r\n /**\r\n * Logs error messages.\r\n */\r\n error(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Error,\r\n containsPii: false,\r\n correlationId: correlationId,\r\n });\r\n }\r\n /**\r\n * Logs error messages with PII.\r\n */\r\n errorPii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Error,\r\n containsPii: true,\r\n correlationId: correlationId,\r\n });\r\n }\r\n /**\r\n * Logs warning messages.\r\n */\r\n warning(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Warning,\r\n containsPii: false,\r\n correlationId: correlationId,\r\n });\r\n }\r\n /**\r\n * Logs warning messages with PII.\r\n */\r\n warningPii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Warning,\r\n containsPii: true,\r\n correlationId: correlationId,\r\n });\r\n }\r\n /**\r\n * Logs info messages.\r\n */\r\n info(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Info,\r\n containsPii: false,\r\n correlationId: correlationId,\r\n });\r\n }\r\n /**\r\n * Logs info messages with PII.\r\n */\r\n infoPii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Info,\r\n containsPii: true,\r\n correlationId: correlationId,\r\n });\r\n }\r\n /**\r\n * Logs verbose messages.\r\n */\r\n verbose(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Verbose,\r\n containsPii: false,\r\n correlationId: correlationId,\r\n });\r\n }\r\n /**\r\n * Logs verbose messages with PII.\r\n */\r\n verbosePii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Verbose,\r\n containsPii: true,\r\n correlationId: correlationId,\r\n });\r\n }\r\n /**\r\n * Logs trace messages.\r\n */\r\n trace(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Trace,\r\n containsPii: false,\r\n correlationId: correlationId,\r\n });\r\n }\r\n /**\r\n * Logs trace messages with PII.\r\n */\r\n tracePii(message, correlationId) {\r\n this.logMessage(message, {\r\n logLevel: LogLevel.Trace,\r\n containsPii: true,\r\n correlationId: correlationId,\r\n });\r\n }\r\n /**\r\n * Returns whether PII Logging is enabled or not.\r\n */\r\n isPiiLoggingEnabled() {\r\n return this.piiLoggingEnabled || false;\r\n }\r\n}\n\nexport { LogLevel, Logger, getAndFlushLogsFromCache };\n//# sourceMappingURL=Logger.mjs.map\n"],"names":[],"mappings":";;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACG,IAAC,SAAS;AACb,CAAC,UAAU,QAAQ,EAAE;AACrB,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC;AAC9C,IAAI,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC;AAClD,IAAI,QAA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