@azure/msal-common 14.9.1-alpha.0 → 14.11.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 (83) hide show
  1. package/dist/account/AccountInfo.mjs +1 -1
  2. package/dist/account/AuthToken.mjs +1 -1
  3. package/dist/account/CcsCredential.mjs +1 -1
  4. package/dist/account/ClientInfo.mjs +1 -1
  5. package/dist/account/TokenClaims.mjs +1 -1
  6. package/dist/authority/Authority.mjs +1 -1
  7. package/dist/authority/AuthorityFactory.mjs +1 -1
  8. package/dist/authority/AuthorityMetadata.mjs +1 -1
  9. package/dist/authority/AuthorityOptions.mjs +1 -1
  10. package/dist/authority/AuthorityType.mjs +1 -1
  11. package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
  12. package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
  13. package/dist/authority/OpenIdConfigResponse.mjs +1 -1
  14. package/dist/authority/ProtocolMode.mjs +1 -1
  15. package/dist/authority/RegionDiscovery.mjs +1 -1
  16. package/dist/cache/CacheManager.mjs +1 -1
  17. package/dist/cache/entities/AccountEntity.mjs +1 -1
  18. package/dist/cache/entities/CacheRecord.mjs +1 -1
  19. package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
  20. package/dist/cache/utils/CacheHelpers.mjs +1 -1
  21. package/dist/client/AuthorizationCodeClient.mjs +1 -1
  22. package/dist/client/AuthorizationCodeClient.mjs.map +1 -1
  23. package/dist/client/BaseClient.mjs +1 -1
  24. package/dist/client/RefreshTokenClient.mjs +1 -1
  25. package/dist/client/SilentFlowClient.mjs +1 -1
  26. package/dist/config/ClientConfiguration.mjs +1 -1
  27. package/dist/constants/AADServerParamKeys.mjs +1 -1
  28. package/dist/crypto/ICrypto.mjs +1 -1
  29. package/dist/crypto/JoseHeader.mjs +1 -1
  30. package/dist/crypto/PopTokenGenerator.mjs +1 -1
  31. package/dist/error/AuthError.mjs +1 -1
  32. package/dist/error/AuthErrorCodes.mjs +1 -1
  33. package/dist/error/CacheError.mjs +1 -1
  34. package/dist/error/CacheErrorCodes.mjs +1 -1
  35. package/dist/error/ClientAuthError.mjs +1 -1
  36. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  37. package/dist/error/ClientConfigurationError.mjs +1 -1
  38. package/dist/error/ClientConfigurationErrorCodes.mjs +1 -1
  39. package/dist/error/InteractionRequiredAuthError.mjs +1 -1
  40. package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
  41. package/dist/error/JoseHeaderError.mjs +1 -1
  42. package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
  43. package/dist/error/ServerError.mjs +1 -1
  44. package/dist/index.cjs +4737 -4724
  45. package/dist/index.cjs.map +1 -1
  46. package/dist/index.d.ts +12 -7
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.mjs +16 -16
  49. package/dist/logger/Logger.mjs +1 -1
  50. package/dist/network/INetworkModule.mjs +1 -1
  51. package/dist/network/NetworkManager.mjs +1 -1
  52. package/dist/network/ThrottlingUtils.mjs +1 -1
  53. package/dist/packageMetadata.d.ts +1 -1
  54. package/dist/packageMetadata.d.ts.map +1 -1
  55. package/dist/packageMetadata.mjs +2 -2
  56. package/dist/request/AuthenticationHeaderParser.mjs +1 -1
  57. package/dist/request/RequestParameterBuilder.mjs +1 -1
  58. package/dist/request/RequestParameterBuilder.mjs.map +1 -1
  59. package/dist/request/RequestValidator.mjs +1 -1
  60. package/dist/request/ScopeSet.mjs +1 -1
  61. package/dist/response/ResponseHandler.mjs +1 -1
  62. package/dist/telemetry/performance/PerformanceClient.d.ts.map +1 -1
  63. package/dist/telemetry/performance/PerformanceClient.mjs +7 -1
  64. package/dist/telemetry/performance/PerformanceClient.mjs.map +1 -1
  65. package/dist/telemetry/performance/PerformanceEvent.d.ts +8 -1
  66. package/dist/telemetry/performance/PerformanceEvent.d.ts.map +1 -1
  67. package/dist/telemetry/performance/PerformanceEvent.mjs +9 -2
  68. package/dist/telemetry/performance/PerformanceEvent.mjs.map +1 -1
  69. package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
  70. package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
  71. package/dist/url/UrlString.mjs +1 -1
  72. package/dist/utils/ClientAssertionUtils.mjs +1 -1
  73. package/dist/utils/Constants.mjs +1 -1
  74. package/dist/utils/FunctionWrappers.mjs +1 -1
  75. package/dist/utils/ProtocolUtils.mjs +1 -1
  76. package/dist/utils/StringUtils.mjs +1 -1
  77. package/dist/utils/TimeUtils.mjs +1 -1
  78. package/dist/utils/UrlUtils.mjs +1 -1
  79. package/package.json +4 -2
  80. package/src/index.ts +12 -7
  81. package/src/packageMetadata.ts +1 -1
  82. package/src/telemetry/performance/PerformanceClient.ts +9 -0
  83. package/src/telemetry/performance/PerformanceEvent.ts +9 -1
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js.git"
12
12
  },
13
- "version": "14.9.1-alpha.0",
13
+ "version": "14.11.0",
14
14
  "description": "Microsoft Authentication Library for js",
15
15
  "keywords": [
16
16
  "implicit",
@@ -59,7 +59,8 @@
59
59
  "prepack": "npm run build",
60
60
  "metadata:check": "ts-node scripts/metadata.ts",
61
61
  "format:check": "prettier --ignore-path .gitignore --check src test",
62
- "format:fix": "prettier --ignore-path .gitignore --write src test"
62
+ "format:fix": "prettier --ignore-path .gitignore --write src test",
63
+ "apiExtractor": "api-extractor run"
63
64
  },
64
65
  "beachball": {
65
66
  "disallowedChangeTypes": [
@@ -72,6 +73,7 @@
72
73
  "@babel/plugin-proposal-object-rest-spread": "^7.6.2",
73
74
  "@babel/preset-env": "^7.7.1",
74
75
  "@babel/preset-typescript": "^7.7.2",
76
+ "@microsoft/api-extractor": "^7.43.4",
75
77
  "@rollup/plugin-typescript": "^11.0.0",
76
78
  "@types/debug": "^4.1.5",
77
79
  "@types/jest": "^29.5.0",
package/src/index.ts CHANGED
@@ -8,6 +8,13 @@
8
8
  * @module @azure/msal-common
9
9
  */
10
10
 
11
+ import * as AuthToken from "./account/AuthToken";
12
+ import * as AuthorityFactory from "./authority/AuthorityFactory";
13
+ import * as CacheHelpers from "./cache/utils/CacheHelpers";
14
+ import * as TimeUtils from "./utils/TimeUtils";
15
+ import * as UrlUtils from "./utils/UrlUtils";
16
+ import * as ClientAssertionUtils from "./utils/ClientAssertionUtils";
17
+ import * as AADServerParamKeys from "./constants/AADServerParamKeys";
11
18
  export { AuthorizationCodeClient } from "./client/AuthorizationCodeClient";
12
19
  export { RefreshTokenClient } from "./client/RefreshTokenClient";
13
20
  export { SilentFlowClient } from "./client/SilentFlowClient";
@@ -36,7 +43,7 @@ export {
36
43
  tenantIdMatchesHomeTenant,
37
44
  buildTenantProfileFromIdTokenClaims,
38
45
  } from "./account/AccountInfo";
39
- export * as AuthToken from "./account/AuthToken";
46
+ export { AuthToken };
40
47
  export {
41
48
  TokenClaims,
42
49
  getTenantIdFromIdTokenClaims,
@@ -59,7 +66,7 @@ export {
59
66
  AzureCloudInstance,
60
67
  StaticAuthorityOptions,
61
68
  } from "./authority/AuthorityOptions";
62
- export * as AuthorityFactory from "./authority/AuthorityFactory";
69
+ export { AuthorityFactory };
63
70
  export { AuthorityType } from "./authority/AuthorityType";
64
71
  export { ProtocolMode } from "./authority/ProtocolMode";
65
72
  export { OIDCOptions } from "./authority/OIDCOptions";
@@ -81,7 +88,7 @@ export {
81
88
  } from "./cache/utils/CacheTypes";
82
89
  export { CacheRecord } from "./cache/entities/CacheRecord";
83
90
  export { CredentialEntity } from "./cache/entities/CredentialEntity";
84
- export * as CacheHelpers from "./cache/utils/CacheHelpers";
91
+ export { CacheHelpers };
85
92
  export { AppMetadataEntity } from "./cache/entities/AppMetadataEntity";
86
93
  export { AccountEntity } from "./cache/entities/AccountEntity";
87
94
  export { IdTokenEntity } from "./cache/entities/IdTokenEntity";
@@ -213,7 +220,7 @@ export {
213
220
  DEFAULT_TOKEN_RENEWAL_OFFSET_SEC,
214
221
  JsonWebTokenTypes,
215
222
  } from "./utils/Constants";
216
- export * as AADServerParamKeys from "./constants/AADServerParamKeys";
223
+ export { AADServerParamKeys };
217
224
  export { StringUtils } from "./utils/StringUtils";
218
225
  export { StringDict } from "./utils/MsalTypes";
219
226
  export {
@@ -221,9 +228,7 @@ export {
221
228
  RequestStateObject,
222
229
  LibraryStateObject,
223
230
  } from "./utils/ProtocolUtils";
224
- export * as TimeUtils from "./utils/TimeUtils";
225
- export * as UrlUtils from "./utils/UrlUtils";
226
- export * as ClientAssertionUtils from "./utils/ClientAssertionUtils";
231
+ export { TimeUtils, UrlUtils, ClientAssertionUtils };
227
232
  export * from "./utils/FunctionWrappers";
228
233
  // Server Telemetry
229
234
  export { ServerTelemetryManager } from "./telemetry/server/ServerTelemetryManager";
@@ -1,3 +1,3 @@
1
1
  /* eslint-disable header/header */
2
2
  export const name = "@azure/msal-common";
3
- export const version = "14.9.1-alpha.0";
3
+ export const version = "14.11.0";
@@ -818,6 +818,15 @@ export abstract class PerformanceClient implements IPerformanceClient {
818
818
  * @returns {string}
819
819
  */
820
820
  addPerformanceCallback(callback: PerformanceCallbackFunction): string {
821
+ for (const [id, cb] of this.callbacks) {
822
+ if (cb.toString() === callback.toString()) {
823
+ this.logger.warning(
824
+ `PerformanceClient: Performance callback is already registered with id: ${id}`
825
+ );
826
+ return id;
827
+ }
828
+ }
829
+
821
830
  const callbackId = this.generateId();
822
831
  this.callbacks.set(callbackId, callback);
823
832
  this.logger.verbose(
@@ -40,9 +40,17 @@ export const PerformanceEvents = {
40
40
  */
41
41
  AcquireTokenPopup: "acquireTokenPopup",
42
42
 
43
+ /**
44
+ * acquireTokenPreRedirect (msal-browser).
45
+ * First part of the redirect flow.
46
+ * Used to acquire a new access token interactively through redirects.
47
+ */
48
+ AcquireTokenPreRedirect: "acquireTokenPreRedirect",
49
+
43
50
  /**
44
51
  * acquireTokenRedirect (msal-browser).
45
- * Used to acquire a new access token interactively through redirects
52
+ * Second part of the redirect flow.
53
+ * Used to acquire a new access token interactively through redirects.
46
54
  */
47
55
  AcquireTokenRedirect: "acquireTokenRedirect",
48
56