@azure/msal-browser 2.18.0 → 2.19.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 (131) hide show
  1. package/CHANGELOG.json +1613 -1548
  2. package/CHANGELOG.md +510 -491
  3. package/LICENSE +21 -21
  4. package/README.md +1 -1
  5. package/dist/_virtual/_tslib.js +1 -1
  6. package/dist/app/ClientApplication.d.ts +4 -0
  7. package/dist/app/ClientApplication.d.ts.map +1 -1
  8. package/dist/app/ClientApplication.js +9 -3
  9. package/dist/app/ClientApplication.js.map +1 -1
  10. package/dist/app/IPublicClientApplication.d.ts +2 -0
  11. package/dist/app/IPublicClientApplication.d.ts.map +1 -1
  12. package/dist/app/IPublicClientApplication.js +4 -1
  13. package/dist/app/IPublicClientApplication.js.map +1 -1
  14. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  15. package/dist/app/PublicClientApplication.js +5 -3
  16. package/dist/app/PublicClientApplication.js.map +1 -1
  17. package/dist/cache/AsyncMemoryStorage.d.ts +46 -0
  18. package/dist/cache/AsyncMemoryStorage.d.ts.map +1 -0
  19. package/dist/cache/AsyncMemoryStorage.js +195 -0
  20. package/dist/cache/AsyncMemoryStorage.js.map +1 -0
  21. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  22. package/dist/cache/BrowserCacheManager.js +1 -1
  23. package/dist/cache/BrowserCacheManager.js.map +1 -1
  24. package/dist/cache/BrowserStorage.d.ts +1 -1
  25. package/dist/cache/BrowserStorage.d.ts.map +1 -1
  26. package/dist/cache/BrowserStorage.js +1 -1
  27. package/dist/cache/BrowserStorage.js.map +1 -1
  28. package/dist/cache/DatabaseStorage.d.ts +25 -6
  29. package/dist/cache/DatabaseStorage.d.ts.map +1 -1
  30. package/dist/cache/DatabaseStorage.js +127 -81
  31. package/dist/cache/DatabaseStorage.js.map +1 -1
  32. package/dist/cache/IAsyncMemoryStorage.d.ts +28 -0
  33. package/dist/cache/IAsyncMemoryStorage.d.ts.map +1 -0
  34. package/dist/cache/IWindowStorage.d.ts +3 -3
  35. package/dist/cache/IWindowStorage.d.ts.map +1 -1
  36. package/dist/cache/MemoryStorage.d.ts +3 -3
  37. package/dist/cache/MemoryStorage.d.ts.map +1 -1
  38. package/dist/cache/MemoryStorage.js +1 -1
  39. package/dist/cache/MemoryStorage.js.map +1 -1
  40. package/dist/cache/TokenCache.js +1 -1
  41. package/dist/cache/TokenCache.js.map +1 -1
  42. package/dist/config/Configuration.js +1 -1
  43. package/dist/config/Configuration.js.map +1 -1
  44. package/dist/crypto/BrowserCrypto.d.ts +3 -1
  45. package/dist/crypto/BrowserCrypto.d.ts.map +1 -1
  46. package/dist/crypto/BrowserCrypto.js +3 -2
  47. package/dist/crypto/BrowserCrypto.js.map +1 -1
  48. package/dist/crypto/CryptoOps.d.ts +11 -5
  49. package/dist/crypto/CryptoOps.d.ts.map +1 -1
  50. package/dist/crypto/CryptoOps.js +37 -13
  51. package/dist/crypto/CryptoOps.js.map +1 -1
  52. package/dist/crypto/GuidGenerator.js +1 -1
  53. package/dist/crypto/GuidGenerator.js.map +1 -1
  54. package/dist/crypto/PkceGenerator.js +1 -1
  55. package/dist/crypto/PkceGenerator.js.map +1 -1
  56. package/dist/crypto/SignedHttpRequest.d.ts +6 -2
  57. package/dist/crypto/SignedHttpRequest.d.ts.map +1 -1
  58. package/dist/crypto/SignedHttpRequest.js +11 -5
  59. package/dist/crypto/SignedHttpRequest.js.map +1 -1
  60. package/dist/encode/Base64Decode.js +1 -1
  61. package/dist/encode/Base64Decode.js.map +1 -1
  62. package/dist/encode/Base64Encode.js +1 -1
  63. package/dist/encode/Base64Encode.js.map +1 -1
  64. package/dist/error/BrowserAuthError.d.ts +8 -0
  65. package/dist/error/BrowserAuthError.d.ts.map +1 -1
  66. package/dist/error/BrowserAuthError.js +12 -2
  67. package/dist/error/BrowserAuthError.js.map +1 -1
  68. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  69. package/dist/error/BrowserConfigurationAuthError.js.map +1 -1
  70. package/dist/event/EventHandler.js +1 -1
  71. package/dist/event/EventHandler.js.map +1 -1
  72. package/dist/event/EventMessage.js +1 -1
  73. package/dist/event/EventMessage.js.map +1 -1
  74. package/dist/event/EventType.js +1 -1
  75. package/dist/event/EventType.js.map +1 -1
  76. package/dist/index.cjs.js +722 -242
  77. package/dist/index.cjs.js.map +1 -1
  78. package/dist/index.d.ts +3 -3
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.js +2 -2
  81. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  82. package/dist/interaction_client/BaseInteractionClient.js +10 -2
  83. package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
  84. package/dist/interaction_client/PopupClient.js +1 -1
  85. package/dist/interaction_client/PopupClient.js.map +1 -1
  86. package/dist/interaction_client/RedirectClient.js +2 -2
  87. package/dist/interaction_client/RedirectClient.js.map +1 -1
  88. package/dist/interaction_client/SilentCacheClient.js +1 -1
  89. package/dist/interaction_client/SilentCacheClient.js.map +1 -1
  90. package/dist/interaction_client/SilentIframeClient.js +1 -1
  91. package/dist/interaction_client/SilentIframeClient.js.map +1 -1
  92. package/dist/interaction_client/SilentRefreshClient.js +1 -1
  93. package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
  94. package/dist/interaction_client/StandardInteractionClient.js +1 -1
  95. package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
  96. package/dist/interaction_handler/InteractionHandler.js +1 -1
  97. package/dist/interaction_handler/InteractionHandler.js.map +1 -1
  98. package/dist/interaction_handler/PopupHandler.js +1 -1
  99. package/dist/interaction_handler/PopupHandler.js.map +1 -1
  100. package/dist/interaction_handler/RedirectHandler.js +1 -1
  101. package/dist/interaction_handler/RedirectHandler.js.map +1 -1
  102. package/dist/interaction_handler/SilentHandler.js +1 -1
  103. package/dist/interaction_handler/SilentHandler.js.map +1 -1
  104. package/dist/navigation/NavigationClient.js +1 -1
  105. package/dist/navigation/NavigationClient.js.map +1 -1
  106. package/dist/network/FetchClient.js +1 -1
  107. package/dist/network/FetchClient.js.map +1 -1
  108. package/dist/network/XhrClient.js +1 -1
  109. package/dist/network/XhrClient.js.map +1 -1
  110. package/dist/packageMetadata.d.ts +1 -1
  111. package/dist/packageMetadata.js +2 -2
  112. package/dist/packageMetadata.js.map +1 -1
  113. package/dist/request/RedirectRequest.d.ts.map +1 -1
  114. package/dist/utils/BrowserConstants.d.ts +3 -0
  115. package/dist/utils/BrowserConstants.d.ts.map +1 -1
  116. package/dist/utils/BrowserConstants.js +7 -3
  117. package/dist/utils/BrowserConstants.js.map +1 -1
  118. package/dist/utils/BrowserProtocolUtils.js +1 -1
  119. package/dist/utils/BrowserProtocolUtils.js.map +1 -1
  120. package/dist/utils/BrowserStringUtils.js +1 -1
  121. package/dist/utils/BrowserStringUtils.js.map +1 -1
  122. package/dist/utils/BrowserUtils.js +1 -1
  123. package/dist/utils/BrowserUtils.js.map +1 -1
  124. package/dist/utils/MathUtils.js +1 -1
  125. package/dist/utils/MathUtils.js.map +1 -1
  126. package/dist/utils/PopupUtils.js +1 -1
  127. package/dist/utils/PopupUtils.js.map +1 -1
  128. package/lib/msal-browser.js +722 -242
  129. package/lib/msal-browser.js.map +1 -1
  130. package/lib/msal-browser.min.js +31 -31
  131. package/package.json +95 -94
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
package/README.md CHANGED
@@ -59,7 +59,7 @@ npm install @azure/msal-browser
59
59
 
60
60
  <!-- CDN_LATEST -->
61
61
  ```html
62
- <script type="text/javascript" src="https://alcdn.msauth.net/browser/2.18.0/js/msal-browser.min.js"></script>
62
+ <script type="text/javascript" src="https://alcdn.msauth.net/browser/2.19.0/js/msal-browser.min.js"></script>
63
63
  ```
64
64
 
65
65
  See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/cdn-usage.md) for more info on how to use this package from the Microsoft CDN.
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.18.0 2021-10-05 */
1
+ /*! @azure/msal-browser v2.19.0 2021-11-02 */
2
2
  'use strict';
3
3
  /*! *****************************************************************************
4
4
  Copyright (c) Microsoft Corporation.
@@ -203,5 +203,9 @@ export declare abstract class ClientApplication {
203
203
  * @param navigationClient
204
204
  */
205
205
  setNavigationClient(navigationClient: INavigationClient): void;
206
+ /**
207
+ * Returns the configuration object
208
+ */
209
+ getConfiguration(): BrowserConfiguration;
206
210
  }
207
211
  //# sourceMappingURL=ClientApplication.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClientApplication.d.ts","sourceRoot":"","sources":["../../src/app/ClientApplication.ts"],"names":[],"mappings":"AAMA,OAAO,EAA0D,WAAW,EAAa,cAAc,EAAE,oBAAoB,EAAE,MAAM,EAAE,uBAAuB,EAAE,OAAO,EAAiC,MAAM,oBAAoB,CAAC;AACnO,OAAO,EAAE,mBAAmB,EAAiC,MAAM,8BAA8B,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAsB,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAAE,eAAe,EAAiD,UAAU,EAAsB,MAAM,2BAA2B,CAAC;AAE3I,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAA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AgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI;IAInD;;OAEG;IACH,gBAAgB,IAAI,WAAW,GAAG,IAAI;IAQtC;;;OAGG;IACH,SAAS,CAAC,gCAAgC,CAAC,eAAe,EAAE,eAAe,GAAG,IAAI;IAsBlF;;;OAGG;IACH,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,GAAG,IAAI;IAIhE;;;OAGG;IACH,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAI7C;;OAEG;IACH,0BAA0B,IAAI,IAAI;IAIlC;;OAEG;IACH,2BAA2B,IAAI,IAAI;IAInC;;OAEG;IACH,aAAa,IAAI,WAAW;IAI5B;;OAEG;IACH,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B;;;;OAIG;IACH,wBAAwB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAKhE;;;OAGG;IACH,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI;IAI9D;;OAEG;IACH,gBAAgB,IAAI,oBAAoB;CAK3C"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.18.0 2021-10-05 */
1
+ /*! @azure/msal-browser v2.19.0 2021-11-02 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { CryptoOps } from '../crypto/CryptoOps.js';
@@ -61,7 +61,7 @@ var ClientApplication = /** @class */ (function () {
61
61
  // Initialize redirectResponse Map
62
62
  this.redirectResponse = new Map();
63
63
  // Initialize the crypto class.
64
- this.browserCrypto = this.isBrowserEnvironment ? new CryptoOps() : DEFAULT_CRYPTO_IMPLEMENTATION;
64
+ this.browserCrypto = this.isBrowserEnvironment ? new CryptoOps(this.logger) : DEFAULT_CRYPTO_IMPLEMENTATION;
65
65
  this.eventHandler = new EventHandler(this.logger, this.browserCrypto);
66
66
  // Initialize the browser storage class.
67
67
  this.browserStorage = this.isBrowserEnvironment ?
@@ -290,7 +290,7 @@ var ClientApplication = /** @class */ (function () {
290
290
  var isInvalidGrantError = (e.errorCode === BrowserConstants.INVALID_GRANT_ERROR);
291
291
  if (isServerError && isInvalidGrantError && !isInteractionRequiredError) {
292
292
  _this.logger.verbose("Refresh token expired or invalid, attempting acquire token by iframe", request.correlationId);
293
- var silentIframeClient = new SilentIframeClient(_this.config, _this.browserStorage, _this.browserCrypto, _this.logger, _this.eventHandler, _this.navigationClient, ApiId.acquireTokenSilent_authCode);
293
+ var silentIframeClient = new SilentIframeClient(_this.config, _this.browserStorage, _this.browserCrypto, _this.logger, _this.eventHandler, _this.navigationClient, ApiId.acquireTokenSilent_authCode, request.correlationId);
294
294
  return silentIframeClient.acquireToken(request);
295
295
  }
296
296
  throw e;
@@ -510,6 +510,12 @@ var ClientApplication = /** @class */ (function () {
510
510
  ClientApplication.prototype.setNavigationClient = function (navigationClient) {
511
511
  this.navigationClient = navigationClient;
512
512
  };
513
+ /**
514
+ * Returns the configuration object
515
+ */
516
+ ClientApplication.prototype.getConfiguration = function () {
517
+ return this.config;
518
+ };
513
519
  return ClientApplication;
514
520
  }());
515
521
 
@@ -1 +1 @@
1
- {"version":3,"file":"ClientApplication.js","sources":["../../src/app/ClientApplication.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { CryptoOps } from \"../crypto/CryptoOps\";\r\nimport { StringUtils, ServerError, InteractionRequiredAuthError, AccountInfo, Constants, INetworkModule, AuthenticationResult, Logger, CommonSilentFlowRequest, ICrypto, DEFAULT_CRYPTO_IMPLEMENTATION } from \"@azure/msal-common\";\r\nimport { BrowserCacheManager, DEFAULT_BROWSER_CACHE_MANAGER } from \"../cache/BrowserCacheManager\";\r\nimport { BrowserConfiguration, buildConfiguration, Configuration } from \"../config/Configuration\";\r\nimport { InteractionType, ApiId, BrowserConstants, BrowserCacheLocation, WrapperSKU, TemporaryCacheKeys } from \"../utils/BrowserConstants\";\r\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\r\nimport { RedirectRequest } from \"../request/RedirectRequest\";\r\nimport { PopupRequest } from \"../request/PopupRequest\";\r\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\r\nimport { version, name } from \"../packageMetadata\";\r\nimport { EventCallbackFunction } from \"../event/EventMessage\";\r\nimport { EventType } from \"../event/EventType\";\r\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\r\nimport { BrowserConfigurationAuthError } from \"../error/BrowserConfigurationAuthError\";\r\nimport { EndSessionPopupRequest } from \"../request/EndSessionPopupRequest\";\r\nimport { INavigationClient } from \"../navigation/INavigationClient\";\r\nimport { EventHandler } from \"../event/EventHandler\";\r\nimport { PopupClient } from \"../interaction_client/PopupClient\";\r\nimport { RedirectClient } from \"../interaction_client/RedirectClient\";\r\nimport { SilentIframeClient } from \"../interaction_client/SilentIframeClient\";\r\nimport { SilentRefreshClient } from \"../interaction_client/SilentRefreshClient\";\r\nimport { TokenCache } from \"../cache/TokenCache\";\r\nimport { ITokenCache } from \"../cache/ITokenCache\";\r\n\r\nexport abstract class ClientApplication {\r\n\r\n // Crypto interface implementation\r\n protected readonly browserCrypto: ICrypto;\r\n\r\n // Storage interface implementation\r\n protected readonly browserStorage: BrowserCacheManager;\r\n\r\n // Network interface implementation\r\n protected readonly networkClient: INetworkModule;\r\n\r\n // Navigation interface implementation\r\n protected navigationClient: INavigationClient;\r\n\r\n // Input configuration by developer/user\r\n protected config: BrowserConfiguration;\r\n\r\n // Token cache implementation\r\n private tokenCache: TokenCache;\r\n\r\n // Logger\r\n protected logger: Logger;\r\n\r\n // Flag to indicate if in browser environment\r\n protected isBrowserEnvironment: boolean;\r\n\r\n protected eventHandler: EventHandler;\r\n\r\n // Redirect Response Object\r\n private redirectResponse: Map<string, Promise<AuthenticationResult | null>>;\r\n\r\n /**\r\n * @constructor\r\n * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object\r\n *\r\n * Important attributes in the Configuration object for auth are:\r\n * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview\r\n * - authority: the authority URL for your application.\r\n * - redirect_uri: the uri of your application registered in the portal.\r\n *\r\n * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.\r\n * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}\r\n * If your application supports Accounts in one organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).\r\n * If your application supports Accounts in any organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with organizations.\r\n * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace \"Enter_the_Tenant_Info_Here\" value with common.\r\n * To restrict support to Personal Microsoft accounts only, replace \"Enter_the_Tenant_Info_Here\" value with consumers.\r\n *\r\n * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/\r\n * Full B2C functionality will be available in this library in future versions.\r\n *\r\n * @param configuration Object for the MSAL PublicClientApplication instance\r\n */\r\n constructor(configuration: Configuration) {\r\n /*\r\n * If loaded in an environment where window is not available,\r\n * set internal flag to false so that further requests fail.\r\n * This is to support server-side rendering environments.\r\n */\r\n this.isBrowserEnvironment = typeof window !== \"undefined\";\r\n // Set the configuration.\r\n this.config = buildConfiguration(configuration, this.isBrowserEnvironment);\r\n\r\n // Initialize logger\r\n this.logger = new Logger(this.config.system.loggerOptions, name, version);\r\n \r\n // Initialize the network module class.\r\n this.networkClient = this.config.system.networkClient;\r\n \r\n // Initialize the navigation client class.\r\n this.navigationClient = this.config.system.navigationClient;\r\n \r\n // Initialize redirectResponse Map\r\n this.redirectResponse = new Map();\r\n \r\n // Initialize the crypto class.\r\n this.browserCrypto = this.isBrowserEnvironment ? new CryptoOps() : DEFAULT_CRYPTO_IMPLEMENTATION;\r\n\r\n this.eventHandler = new EventHandler(this.logger, this.browserCrypto);\r\n\r\n // Initialize the browser storage class.\r\n this.browserStorage = this.isBrowserEnvironment ? \r\n new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger) : \r\n DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger);\r\n\r\n // Initialize the token cache\r\n this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto);\r\n }\r\n\r\n // #region Redirect Flow\r\n\r\n /**\r\n * Event handler function which allows users to fire events after the PublicClientApplication object\r\n * has loaded during redirect flows. This should be invoked on all page loads involved in redirect\r\n * auth flows.\r\n * @param hash Hash to process. Defaults to the current value of window.location.hash. Only needs to be provided explicitly if the response to be handled is not contained in the current value.\r\n * @returns Token response or null. If the return value is null, then no auth redirect was detected.\r\n */\r\n async handleRedirectPromise(hash?: string): Promise<AuthenticationResult | null> {\r\n this.logger.verbose(\"handleRedirectPromise called\");\r\n const loggedInAccounts = this.getAllAccounts();\r\n if (this.isBrowserEnvironment) {\r\n /**\r\n * Store the promise on the PublicClientApplication instance if this is the first invocation of handleRedirectPromise,\r\n * otherwise return the promise from the first invocation. Prevents race conditions when handleRedirectPromise is called\r\n * several times concurrently.\r\n */\r\n const redirectResponseKey = hash || Constants.EMPTY_STRING;\r\n let response = this.redirectResponse.get(redirectResponseKey);\r\n if (typeof response === \"undefined\") {\r\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, InteractionType.Redirect);\r\n this.logger.verbose(\"handleRedirectPromise has been called for the first time, storing the promise\");\r\n const correlationId = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CORRELATION_ID, true) || \"\";\r\n const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, correlationId);\r\n response = redirectClient.handleRedirectPromise(hash)\r\n .then((result: AuthenticationResult | null) => {\r\n if (result) {\r\n // Emit login event if number of accounts change\r\n const isLoggingIn = loggedInAccounts.length < this.getAllAccounts().length;\r\n if (isLoggingIn) {\r\n this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, InteractionType.Redirect, result);\r\n this.logger.verbose(\"handleRedirectResponse returned result, login success\");\r\n } else {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Redirect, result);\r\n this.logger.verbose(\"handleRedirectResponse returned result, acquire token success\");\r\n }\r\n }\r\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, InteractionType.Redirect);\r\n\r\n return result;\r\n })\r\n .catch((e) => {\r\n // Emit login event if there is an account\r\n if (loggedInAccounts.length > 0) {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Redirect, null, e);\r\n } else {\r\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Redirect, null, e);\r\n }\r\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, InteractionType.Redirect);\r\n\r\n throw e;\r\n });\r\n this.redirectResponse.set(redirectResponseKey, response);\r\n } else {\r\n this.logger.verbose(\"handleRedirectPromise has been called previously, returning the result from the first call\");\r\n }\r\n \r\n return response;\r\n }\r\n this.logger.verbose(\"handleRedirectPromise returns null, not browser environment\");\r\n return null;\r\n }\r\n\r\n /**\r\n * Use when you want to obtain an access_token for your API by redirecting the user's browser window to the authorization endpoint. This function redirects\r\n * the page, so any code that follows this function will not execute.\r\n *\r\n * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current\r\n * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.\r\n *\r\n * @param request\r\n */\r\n async acquireTokenRedirect(request: RedirectRequest): Promise<void> {\r\n // Preflight request\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\r\n this.logger.verbose(\"acquireTokenRedirect called\");\r\n\r\n // If logged in, emit acquire token events\r\n const isLoggedIn = this.getAllAccounts().length > 0;\r\n if (isLoggedIn) {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Redirect, request);\r\n } else {\r\n this.eventHandler.emitEvent(EventType.LOGIN_START, InteractionType.Redirect, request);\r\n }\r\n \r\n const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\r\n return redirectClient.acquireToken(request).catch((e) => {\r\n // If logged in, emit acquire token events\r\n if (isLoggedIn) {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Redirect, null, e);\r\n } else {\r\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Redirect, null, e);\r\n }\r\n throw e;\r\n });\r\n }\r\n\r\n // #endregion\r\n\r\n // #region Popup Flow\r\n\r\n /**\r\n * Use when you want to obtain an access_token for your API via opening a popup window in the user's browser\r\n *\r\n * @param request\r\n *\r\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\r\n */\r\n acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult> {\r\n try {\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\r\n this.logger.verbose(\"acquireTokenPopup called\", request.correlationId);\r\n } catch (e) {\r\n // Since this function is syncronous we need to reject\r\n return Promise.reject(e);\r\n }\r\n\r\n // If logged in, emit acquire token events\r\n const loggedInAccounts = this.getAllAccounts();\r\n if (loggedInAccounts.length > 0) {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Popup, request);\r\n } else {\r\n this.eventHandler.emitEvent(EventType.LOGIN_START, InteractionType.Popup, request);\r\n }\r\n\r\n const popupClient = new PopupClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\r\n\r\n return popupClient.acquireToken(request).then((result) => {\r\n // If logged in, emit acquire token events\r\n const isLoggingIn = loggedInAccounts.length < this.getAllAccounts().length;\r\n if (isLoggingIn) {\r\n this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, InteractionType.Popup, result);\r\n } else {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Popup, result);\r\n }\r\n\r\n return result;\r\n }).catch((e) => {\r\n if (loggedInAccounts.length > 0) {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Popup, null, e);\r\n } else {\r\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Popup, null, e);\r\n }\r\n // Since this function is syncronous we need to reject\r\n return Promise.reject(e);\r\n });\r\n }\r\n\r\n // #endregion\r\n\r\n // #region Silent Flow\r\n\r\n /**\r\n * This function uses a hidden iframe to fetch an authorization code from the eSTS. There are cases where this may not work:\r\n * - Any browser using a form of Intelligent Tracking Prevention\r\n * - If there is not an established session with the service\r\n *\r\n * In these cases, the request must be done inside a popup or full frame redirect.\r\n *\r\n * For the cases where interaction is required, you cannot send a request with prompt=none.\r\n *\r\n * If your refresh token has expired, you can use this function to fetch a new set of tokens silently as long as\r\n * you session on the server still exists.\r\n * @param request {@link SsoSilentRequest}\r\n *\r\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\r\n */\r\n async ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult> {\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\r\n this.logger.verbose(\"ssoSilent called\", request.correlationId);\r\n this.eventHandler.emitEvent(EventType.SSO_SILENT_START, InteractionType.Silent, request);\r\n\r\n try {\r\n const silentIframeClient = new SilentIframeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.ssoSilent, request.correlationId);\r\n const silentTokenResult = await silentIframeClient.acquireToken(request);\r\n this.eventHandler.emitEvent(EventType.SSO_SILENT_SUCCESS, InteractionType.Silent, silentTokenResult);\r\n return silentTokenResult;\r\n } catch (e) {\r\n this.eventHandler.emitEvent(EventType.SSO_SILENT_FAILURE, InteractionType.Silent, null, e);\r\n throw e;\r\n }\r\n }\r\n\r\n /**\r\n * Use this function to obtain a token before every call to the API / resource provider\r\n *\r\n * MSAL return's a cached token when available\r\n * Or it send's a request to the STS to obtain a new token using a refresh token.\r\n *\r\n * @param {@link SilentRequest}\r\n *\r\n * To renew idToken, please pass clientId as the only scope in the Authentication Parameters\r\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\r\n */\r\n protected async acquireTokenByRefreshToken(request: CommonSilentFlowRequest): Promise<AuthenticationResult> {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, request);\r\n // block the reload if it occurred inside a hidden iframe\r\n BrowserUtils.blockReloadInHiddenIframes();\r\n\r\n const silentRefreshClient = new SilentRefreshClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\r\n\r\n return silentRefreshClient.acquireToken(request).catch(e => {\r\n const isServerError = e instanceof ServerError;\r\n const isInteractionRequiredError = e instanceof InteractionRequiredAuthError;\r\n const isInvalidGrantError = (e.errorCode === BrowserConstants.INVALID_GRANT_ERROR);\r\n if (isServerError && isInvalidGrantError && !isInteractionRequiredError) {\r\n this.logger.verbose(\"Refresh token expired or invalid, attempting acquire token by iframe\", request.correlationId);\r\n\r\n const silentIframeClient = new SilentIframeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenSilent_authCode);\r\n return silentIframeClient.acquireToken(request);\r\n }\r\n throw e;\r\n });\r\n }\r\n\r\n // #endregion\r\n\r\n // #region Logout\r\n\r\n /**\r\n * Deprecated logout function. Use logoutRedirect or logoutPopup instead\r\n * @param logoutRequest \r\n * @deprecated\r\n */\r\n async logout(logoutRequest?: EndSessionRequest): Promise<void> {\r\n this.logger.warning(\"logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.\");\r\n return this.logoutRedirect(logoutRequest);\r\n }\r\n\r\n /**\r\n * Use to log out the current user, and redirect the user to the postLogoutRedirectUri.\r\n * Default behaviour is to redirect the user to `window.location.href`.\r\n * @param logoutRequest\r\n */\r\n async logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void> {\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\r\n const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, logoutRequest?.correlationId);\r\n return redirectClient.logout(logoutRequest);\r\n }\r\n\r\n /**\r\n * Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server\r\n * @param logoutRequest \r\n */\r\n logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void> {\r\n try{\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\r\n const popupClient = new PopupClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, logoutRequest?.correlationId);\r\n return popupClient.logout(logoutRequest);\r\n } catch (e) {\r\n // Since this function is syncronous we need to reject\r\n return Promise.reject(e);\r\n }\r\n }\r\n\r\n // #endregion\r\n\r\n // #region Account APIs\r\n\r\n /**\r\n * Returns all accounts that MSAL currently has data for.\r\n * (the account object is created at the time of successful login)\r\n * or empty array when no accounts are found\r\n * @returns Array of account objects in cache\r\n */\r\n getAllAccounts(): AccountInfo[] {\r\n this.logger.verbose(\"getAllAccounts called\");\r\n return this.isBrowserEnvironment ? this.browserStorage.getAllAccounts() : [];\r\n }\r\n\r\n /**\r\n * Returns the signed in account matching username.\r\n * (the account object is created at the time of successful login)\r\n * or null when no matching account is found.\r\n * This API is provided for convenience but getAccountById should be used for best reliability\r\n * @param userName\r\n * @returns The account object stored in MSAL\r\n */\r\n getAccountByUsername(userName: string): AccountInfo|null {\r\n const allAccounts = this.getAllAccounts();\r\n if (!StringUtils.isEmpty(userName) && allAccounts && allAccounts.length) {\r\n this.logger.verbose(\"Account matching username found, returning\");\r\n this.logger.verbosePii(`Returning signed-in accounts matching username: ${userName}`);\r\n return allAccounts.filter(accountObj => accountObj.username.toLowerCase() === userName.toLowerCase())[0] || null;\r\n } else {\r\n this.logger.verbose(\"getAccountByUsername: No matching account found, returning null\");\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Returns the signed in account matching homeAccountId.\r\n * (the account object is created at the time of successful login)\r\n * or null when no matching account is found\r\n * @param homeAccountId\r\n * @returns The account object stored in MSAL\r\n */\r\n getAccountByHomeId(homeAccountId: string): AccountInfo|null {\r\n const allAccounts = this.getAllAccounts();\r\n if (!StringUtils.isEmpty(homeAccountId) && allAccounts && allAccounts.length) {\r\n this.logger.verbose(\"Account matching homeAccountId found, returning\");\r\n this.logger.verbosePii(`Returning signed-in accounts matching homeAccountId: ${homeAccountId}`);\r\n return allAccounts.filter(accountObj => accountObj.homeAccountId === homeAccountId)[0] || null;\r\n } else {\r\n this.logger.verbose(\"getAccountByHomeId: No matching account found, returning null\");\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Returns the signed in account matching localAccountId.\r\n * (the account object is created at the time of successful login)\r\n * or null when no matching account is found\r\n * @param localAccountId\r\n * @returns The account object stored in MSAL\r\n */\r\n getAccountByLocalId(localAccountId: string): AccountInfo | null {\r\n const allAccounts = this.getAllAccounts();\r\n if (!StringUtils.isEmpty(localAccountId) && allAccounts && allAccounts.length) {\r\n this.logger.verbose(\"Account matching localAccountId found, returning\");\r\n this.logger.verbosePii(`Returning signed-in accounts matching localAccountId: ${localAccountId}`);\r\n return allAccounts.filter(accountObj => accountObj.localAccountId === localAccountId)[0] || null;\r\n } else {\r\n this.logger.verbose(\"getAccountByLocalId: No matching account found, returning null\");\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.\r\n * @param account\r\n */\r\n setActiveAccount(account: AccountInfo | null): void {\r\n this.browserStorage.setActiveAccount(account);\r\n }\r\n\r\n /**\r\n * Gets the currently active account\r\n */\r\n getActiveAccount(): AccountInfo | null {\r\n return this.browserStorage.getActiveAccount();\r\n }\r\n\r\n // #endregion\r\n\r\n // #region Helpers\r\n\r\n /**\r\n * Helper to validate app environment before making an auth request\r\n * * @param interactionType\r\n */\r\n protected preflightBrowserEnvironmentCheck(interactionType: InteractionType): void {\r\n this.logger.verbose(\"preflightBrowserEnvironmentCheck started\");\r\n // Block request if not in browser environment\r\n BrowserUtils.blockNonBrowserEnvironment(this.isBrowserEnvironment);\r\n\r\n // Block redirects if in an iframe\r\n BrowserUtils.blockRedirectInIframe(interactionType, this.config.system.allowRedirectInIframe);\r\n\r\n // Block auth requests inside a hidden iframe\r\n BrowserUtils.blockReloadInHiddenIframes();\r\n\r\n // Block redirectUri opened in a popup from calling MSAL APIs\r\n BrowserUtils.blockAcquireTokenInPopups();\r\n\r\n // Block redirects if memory storage is enabled but storeAuthStateInCookie is not\r\n if (interactionType === InteractionType.Redirect &&\r\n this.config.cache.cacheLocation === BrowserCacheLocation.MemoryStorage &&\r\n !this.config.cache.storeAuthStateInCookie) {\r\n throw BrowserConfigurationAuthError.createInMemoryRedirectUnavailableError();\r\n }\r\n }\r\n\r\n /**\r\n * Adds event callbacks to array\r\n * @param callback\r\n */\r\n addEventCallback(callback: EventCallbackFunction): string | null {\r\n return this.eventHandler.addEventCallback(callback);\r\n }\r\n\r\n /**\r\n * Removes callback with provided id from callback array\r\n * @param callbackId\r\n */\r\n removeEventCallback(callbackId: string): void {\r\n this.eventHandler.removeEventCallback(callbackId);\r\n }\r\n\r\n /**\r\n * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\r\n */\r\n enableAccountStorageEvents(): void {\r\n this.eventHandler.enableAccountStorageEvents();\r\n }\r\n\r\n /**\r\n * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\r\n */\r\n disableAccountStorageEvents(): void {\r\n this.eventHandler.disableAccountStorageEvents();\r\n }\r\n\r\n /**\r\n * Gets the token cache for the application.\r\n */\r\n getTokenCache(): ITokenCache {\r\n return this.tokenCache;\r\n }\r\n\r\n /**\r\n * Returns the logger instance\r\n */\r\n getLogger(): Logger {\r\n return this.logger;\r\n }\r\n\r\n /**\r\n * Replaces the default logger set in configurations with new Logger with new configurations\r\n * @param logger Logger instance\r\n */\r\n setLogger(logger: Logger): void {\r\n this.logger = logger;\r\n }\r\n\r\n /**\r\n * Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.\r\n * @param sku\r\n * @param version\r\n */\r\n initializeWrapperLibrary(sku: WrapperSKU, version: string): void {\r\n // Validate the SKU passed in is one we expect\r\n this.browserStorage.setWrapperMetadata(sku, version);\r\n }\r\n\r\n /**\r\n * Sets navigation client\r\n * @param navigationClient\r\n */\r\n setNavigationClient(navigationClient: INavigationClient): void {\r\n this.navigationClient = navigationClient;\r\n }\r\n // #endregion\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;IAiFI,2BAAY,aAA4B;;;;;;QAMpC,IAAI,CAAC,oBAAoB,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;;QAE1D,IAAI,CAAC,MAAM,GAAG,kBAAkB,CAAC,aAAa,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;;QAG3E,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;;QAG1E,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;;QAGtD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC;;QAG5D,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;;QAGlC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,oBAAoB,GAAG,IAAI,SAAS,EAAE,GAAG,6BAA6B,CAAC;QAEjG,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CA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a,GAAb;QACI,OAAO,IAAI,CAAC,UAAU,CAAC;KAC1B;;;;IAKD,qCAAS,GAAT;QACI,OAAO,IAAI,CAAC,MAAM,CAAC;KACtB;;;;;IAMD,qCAAS,GAAT,UAAU,MAAc;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;KACxB;;;;;;IAOD,oDAAwB,GAAxB,UAAyB,GAAe,EAAE,OAAe;;QAErD,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;KACxD;;;;;IAMD,+CAAmB,GAAnB,UAAoB,gBAAmC;QACnD,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;KAC5C;IAEL,wBAAC;AAAD,CAAC;;;;"}
1
+ {"version":3,"file":"ClientApplication.js","sources":["../../src/app/ClientApplication.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { CryptoOps } from \"../crypto/CryptoOps\";\nimport { StringUtils, ServerError, InteractionRequiredAuthError, AccountInfo, Constants, INetworkModule, AuthenticationResult, Logger, CommonSilentFlowRequest, ICrypto, DEFAULT_CRYPTO_IMPLEMENTATION } from \"@azure/msal-common\";\nimport { BrowserCacheManager, DEFAULT_BROWSER_CACHE_MANAGER } from \"../cache/BrowserCacheManager\";\nimport { BrowserConfiguration, buildConfiguration, Configuration } from \"../config/Configuration\";\nimport { InteractionType, ApiId, BrowserConstants, BrowserCacheLocation, WrapperSKU, TemporaryCacheKeys } from \"../utils/BrowserConstants\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\nimport { version, name } from \"../packageMetadata\";\nimport { EventCallbackFunction } from \"../event/EventMessage\";\nimport { EventType } from \"../event/EventType\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { BrowserConfigurationAuthError } from \"../error/BrowserConfigurationAuthError\";\nimport { EndSessionPopupRequest } from \"../request/EndSessionPopupRequest\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { EventHandler } from \"../event/EventHandler\";\nimport { PopupClient } from \"../interaction_client/PopupClient\";\nimport { RedirectClient } from \"../interaction_client/RedirectClient\";\nimport { SilentIframeClient } from \"../interaction_client/SilentIframeClient\";\nimport { SilentRefreshClient } from \"../interaction_client/SilentRefreshClient\";\nimport { TokenCache } from \"../cache/TokenCache\";\nimport { ITokenCache } from \"../cache/ITokenCache\";\n\nexport abstract class ClientApplication {\n\n // Crypto interface implementation\n protected readonly browserCrypto: ICrypto;\n\n // Storage interface implementation\n protected readonly browserStorage: BrowserCacheManager;\n\n // Network interface implementation\n protected readonly networkClient: INetworkModule;\n\n // Navigation interface implementation\n protected navigationClient: INavigationClient;\n\n // Input configuration by developer/user\n protected config: BrowserConfiguration;\n\n // Token cache implementation\n private tokenCache: TokenCache;\n\n // Logger\n protected logger: Logger;\n\n // Flag to indicate if in browser environment\n protected isBrowserEnvironment: boolean;\n\n protected eventHandler: EventHandler;\n\n // Redirect Response Object\n private redirectResponse: Map<string, Promise<AuthenticationResult | null>>;\n\n /**\n * @constructor\n * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object\n *\n * Important attributes in the Configuration object for auth are:\n * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview\n * - authority: the authority URL for your application.\n * - redirect_uri: the uri of your application registered in the portal.\n *\n * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.\n * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}\n * If your application supports Accounts in one organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).\n * If your application supports Accounts in any organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with organizations.\n * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace \"Enter_the_Tenant_Info_Here\" value with common.\n * To restrict support to Personal Microsoft accounts only, replace \"Enter_the_Tenant_Info_Here\" value with consumers.\n *\n * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/\n * Full B2C functionality will be available in this library in future versions.\n *\n * @param configuration Object for the MSAL PublicClientApplication instance\n */\n constructor(configuration: Configuration) {\n /*\n * If loaded in an environment where window is not available,\n * set internal flag to false so that further requests fail.\n * This is to support server-side rendering environments.\n */\n this.isBrowserEnvironment = typeof window !== \"undefined\";\n // Set the configuration.\n this.config = buildConfiguration(configuration, this.isBrowserEnvironment);\n\n // Initialize logger\n this.logger = new Logger(this.config.system.loggerOptions, name, version);\n \n // Initialize the network module class.\n this.networkClient = this.config.system.networkClient;\n \n // Initialize the navigation client class.\n this.navigationClient = this.config.system.navigationClient;\n \n // Initialize redirectResponse Map\n this.redirectResponse = new Map();\n \n // Initialize the crypto class.\n this.browserCrypto = this.isBrowserEnvironment ? new CryptoOps(this.logger) : DEFAULT_CRYPTO_IMPLEMENTATION;\n\n this.eventHandler = new EventHandler(this.logger, this.browserCrypto);\n\n // Initialize the browser storage class.\n this.browserStorage = this.isBrowserEnvironment ? \n new BrowserCacheManager(this.config.auth.clientId, this.config.cache, this.browserCrypto, this.logger) : \n DEFAULT_BROWSER_CACHE_MANAGER(this.config.auth.clientId, this.logger);\n\n // Initialize the token cache\n this.tokenCache = new TokenCache(this.config, this.browserStorage, this.logger, this.browserCrypto);\n }\n\n // #region Redirect Flow\n\n /**\n * Event handler function which allows users to fire events after the PublicClientApplication object\n * has loaded during redirect flows. This should be invoked on all page loads involved in redirect\n * auth flows.\n * @param hash Hash to process. Defaults to the current value of window.location.hash. Only needs to be provided explicitly if the response to be handled is not contained in the current value.\n * @returns Token response or null. If the return value is null, then no auth redirect was detected.\n */\n async handleRedirectPromise(hash?: string): Promise<AuthenticationResult | null> {\n this.logger.verbose(\"handleRedirectPromise called\");\n const loggedInAccounts = this.getAllAccounts();\n if (this.isBrowserEnvironment) {\n /**\n * Store the promise on the PublicClientApplication instance if this is the first invocation of handleRedirectPromise,\n * otherwise return the promise from the first invocation. Prevents race conditions when handleRedirectPromise is called\n * several times concurrently.\n */\n const redirectResponseKey = hash || Constants.EMPTY_STRING;\n let response = this.redirectResponse.get(redirectResponseKey);\n if (typeof response === \"undefined\") {\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_START, InteractionType.Redirect);\n this.logger.verbose(\"handleRedirectPromise has been called for the first time, storing the promise\");\n const correlationId = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CORRELATION_ID, true) || \"\";\n const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, correlationId);\n response = redirectClient.handleRedirectPromise(hash)\n .then((result: AuthenticationResult | null) => {\n if (result) {\n // Emit login event if number of accounts change\n const isLoggingIn = loggedInAccounts.length < this.getAllAccounts().length;\n if (isLoggingIn) {\n this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, InteractionType.Redirect, result);\n this.logger.verbose(\"handleRedirectResponse returned result, login success\");\n } else {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Redirect, result);\n this.logger.verbose(\"handleRedirectResponse returned result, acquire token success\");\n }\n }\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, InteractionType.Redirect);\n\n return result;\n })\n .catch((e) => {\n // Emit login event if there is an account\n if (loggedInAccounts.length > 0) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Redirect, null, e);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Redirect, null, e);\n }\n this.eventHandler.emitEvent(EventType.HANDLE_REDIRECT_END, InteractionType.Redirect);\n\n throw e;\n });\n this.redirectResponse.set(redirectResponseKey, response);\n } else {\n this.logger.verbose(\"handleRedirectPromise has been called previously, returning the result from the first call\");\n }\n \n return response;\n }\n this.logger.verbose(\"handleRedirectPromise returns null, not browser environment\");\n return null;\n }\n\n /**\n * Use when you want to obtain an access_token for your API by redirecting the user's browser window to the authorization endpoint. This function redirects\n * the page, so any code that follows this function will not execute.\n *\n * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current\n * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.\n *\n * @param request\n */\n async acquireTokenRedirect(request: RedirectRequest): Promise<void> {\n // Preflight request\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\n this.logger.verbose(\"acquireTokenRedirect called\");\n\n // If logged in, emit acquire token events\n const isLoggedIn = this.getAllAccounts().length > 0;\n if (isLoggedIn) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Redirect, request);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_START, InteractionType.Redirect, request);\n }\n \n const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\n return redirectClient.acquireToken(request).catch((e) => {\n // If logged in, emit acquire token events\n if (isLoggedIn) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Redirect, null, e);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Redirect, null, e);\n }\n throw e;\n });\n }\n\n // #endregion\n\n // #region Popup Flow\n\n /**\n * Use when you want to obtain an access_token for your API via opening a popup window in the user's browser\n *\n * @param request\n *\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult> {\n try {\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\n this.logger.verbose(\"acquireTokenPopup called\", request.correlationId);\n } catch (e) {\n // Since this function is syncronous we need to reject\n return Promise.reject(e);\n }\n\n // If logged in, emit acquire token events\n const loggedInAccounts = this.getAllAccounts();\n if (loggedInAccounts.length > 0) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Popup, request);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_START, InteractionType.Popup, request);\n }\n\n const popupClient = new PopupClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\n\n return popupClient.acquireToken(request).then((result) => {\n // If logged in, emit acquire token events\n const isLoggingIn = loggedInAccounts.length < this.getAllAccounts().length;\n if (isLoggingIn) {\n this.eventHandler.emitEvent(EventType.LOGIN_SUCCESS, InteractionType.Popup, result);\n } else {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Popup, result);\n }\n\n return result;\n }).catch((e) => {\n if (loggedInAccounts.length > 0) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Popup, null, e);\n } else {\n this.eventHandler.emitEvent(EventType.LOGIN_FAILURE, InteractionType.Popup, null, e);\n }\n // Since this function is syncronous we need to reject\n return Promise.reject(e);\n });\n }\n\n // #endregion\n\n // #region Silent Flow\n\n /**\n * This function uses a hidden iframe to fetch an authorization code from the eSTS. There are cases where this may not work:\n * - Any browser using a form of Intelligent Tracking Prevention\n * - If there is not an established session with the service\n *\n * In these cases, the request must be done inside a popup or full frame redirect.\n *\n * For the cases where interaction is required, you cannot send a request with prompt=none.\n *\n * If your refresh token has expired, you can use this function to fetch a new set of tokens silently as long as\n * you session on the server still exists.\n * @param request {@link SsoSilentRequest}\n *\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n async ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult> {\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n this.logger.verbose(\"ssoSilent called\", request.correlationId);\n this.eventHandler.emitEvent(EventType.SSO_SILENT_START, InteractionType.Silent, request);\n\n try {\n const silentIframeClient = new SilentIframeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.ssoSilent, request.correlationId);\n const silentTokenResult = await silentIframeClient.acquireToken(request);\n this.eventHandler.emitEvent(EventType.SSO_SILENT_SUCCESS, InteractionType.Silent, silentTokenResult);\n return silentTokenResult;\n } catch (e) {\n this.eventHandler.emitEvent(EventType.SSO_SILENT_FAILURE, InteractionType.Silent, null, e);\n throw e;\n }\n }\n\n /**\n * Use this function to obtain a token before every call to the API / resource provider\n *\n * MSAL return's a cached token when available\n * Or it send's a request to the STS to obtain a new token using a refresh token.\n *\n * @param {@link SilentRequest}\n *\n * To renew idToken, please pass clientId as the only scope in the Authentication Parameters\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n protected async acquireTokenByRefreshToken(request: CommonSilentFlowRequest): Promise<AuthenticationResult> {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_NETWORK_START, InteractionType.Silent, request);\n // block the reload if it occurred inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n\n const silentRefreshClient = new SilentRefreshClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\n\n return silentRefreshClient.acquireToken(request).catch(e => {\n const isServerError = e instanceof ServerError;\n const isInteractionRequiredError = e instanceof InteractionRequiredAuthError;\n const isInvalidGrantError = (e.errorCode === BrowserConstants.INVALID_GRANT_ERROR);\n if (isServerError && isInvalidGrantError && !isInteractionRequiredError) {\n this.logger.verbose(\"Refresh token expired or invalid, attempting acquire token by iframe\", request.correlationId);\n\n const silentIframeClient = new SilentIframeClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, ApiId.acquireTokenSilent_authCode, request.correlationId);\n return silentIframeClient.acquireToken(request);\n }\n throw e;\n });\n }\n\n // #endregion\n\n // #region Logout\n\n /**\n * Deprecated logout function. Use logoutRedirect or logoutPopup instead\n * @param logoutRequest \n * @deprecated\n */\n async logout(logoutRequest?: EndSessionRequest): Promise<void> {\n this.logger.warning(\"logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.\");\n return this.logoutRedirect(logoutRequest);\n }\n\n /**\n * Use to log out the current user, and redirect the user to the postLogoutRedirectUri.\n * Default behaviour is to redirect the user to `window.location.href`.\n * @param logoutRequest\n */\n async logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void> {\n this.preflightBrowserEnvironmentCheck(InteractionType.Redirect);\n const redirectClient = new RedirectClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, logoutRequest?.correlationId);\n return redirectClient.logout(logoutRequest);\n }\n\n /**\n * Clears local cache for the current user then opens a popup window prompting the user to sign-out of the server\n * @param logoutRequest \n */\n logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void> {\n try{\n this.preflightBrowserEnvironmentCheck(InteractionType.Popup);\n const popupClient = new PopupClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, logoutRequest?.correlationId);\n return popupClient.logout(logoutRequest);\n } catch (e) {\n // Since this function is syncronous we need to reject\n return Promise.reject(e);\n }\n }\n\n // #endregion\n\n // #region Account APIs\n\n /**\n * Returns all accounts that MSAL currently has data for.\n * (the account object is created at the time of successful login)\n * or empty array when no accounts are found\n * @returns Array of account objects in cache\n */\n getAllAccounts(): AccountInfo[] {\n this.logger.verbose(\"getAllAccounts called\");\n return this.isBrowserEnvironment ? this.browserStorage.getAllAccounts() : [];\n }\n\n /**\n * Returns the signed in account matching username.\n * (the account object is created at the time of successful login)\n * or null when no matching account is found.\n * This API is provided for convenience but getAccountById should be used for best reliability\n * @param userName\n * @returns The account object stored in MSAL\n */\n getAccountByUsername(userName: string): AccountInfo|null {\n const allAccounts = this.getAllAccounts();\n if (!StringUtils.isEmpty(userName) && allAccounts && allAccounts.length) {\n this.logger.verbose(\"Account matching username found, returning\");\n this.logger.verbosePii(`Returning signed-in accounts matching username: ${userName}`);\n return allAccounts.filter(accountObj => accountObj.username.toLowerCase() === userName.toLowerCase())[0] || null;\n } else {\n this.logger.verbose(\"getAccountByUsername: No matching account found, returning null\");\n return null;\n }\n }\n\n /**\n * Returns the signed in account matching homeAccountId.\n * (the account object is created at the time of successful login)\n * or null when no matching account is found\n * @param homeAccountId\n * @returns The account object stored in MSAL\n */\n getAccountByHomeId(homeAccountId: string): AccountInfo|null {\n const allAccounts = this.getAllAccounts();\n if (!StringUtils.isEmpty(homeAccountId) && allAccounts && allAccounts.length) {\n this.logger.verbose(\"Account matching homeAccountId found, returning\");\n this.logger.verbosePii(`Returning signed-in accounts matching homeAccountId: ${homeAccountId}`);\n return allAccounts.filter(accountObj => accountObj.homeAccountId === homeAccountId)[0] || null;\n } else {\n this.logger.verbose(\"getAccountByHomeId: No matching account found, returning null\");\n return null;\n }\n }\n\n /**\n * Returns the signed in account matching localAccountId.\n * (the account object is created at the time of successful login)\n * or null when no matching account is found\n * @param localAccountId\n * @returns The account object stored in MSAL\n */\n getAccountByLocalId(localAccountId: string): AccountInfo | null {\n const allAccounts = this.getAllAccounts();\n if (!StringUtils.isEmpty(localAccountId) && allAccounts && allAccounts.length) {\n this.logger.verbose(\"Account matching localAccountId found, returning\");\n this.logger.verbosePii(`Returning signed-in accounts matching localAccountId: ${localAccountId}`);\n return allAccounts.filter(accountObj => accountObj.localAccountId === localAccountId)[0] || null;\n } else {\n this.logger.verbose(\"getAccountByLocalId: No matching account found, returning null\");\n return null;\n }\n }\n\n /**\n * Sets the account to use as the active account. If no account is passed to the acquireToken APIs, then MSAL will use this active account.\n * @param account\n */\n setActiveAccount(account: AccountInfo | null): void {\n this.browserStorage.setActiveAccount(account);\n }\n\n /**\n * Gets the currently active account\n */\n getActiveAccount(): AccountInfo | null {\n return this.browserStorage.getActiveAccount();\n }\n\n // #endregion\n\n // #region Helpers\n\n /**\n * Helper to validate app environment before making an auth request\n * * @param interactionType\n */\n protected preflightBrowserEnvironmentCheck(interactionType: InteractionType): void {\n this.logger.verbose(\"preflightBrowserEnvironmentCheck started\");\n // Block request if not in browser environment\n BrowserUtils.blockNonBrowserEnvironment(this.isBrowserEnvironment);\n\n // Block redirects if in an iframe\n BrowserUtils.blockRedirectInIframe(interactionType, this.config.system.allowRedirectInIframe);\n\n // Block auth requests inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n\n // Block redirectUri opened in a popup from calling MSAL APIs\n BrowserUtils.blockAcquireTokenInPopups();\n\n // Block redirects if memory storage is enabled but storeAuthStateInCookie is not\n if (interactionType === InteractionType.Redirect &&\n this.config.cache.cacheLocation === BrowserCacheLocation.MemoryStorage &&\n !this.config.cache.storeAuthStateInCookie) {\n throw BrowserConfigurationAuthError.createInMemoryRedirectUnavailableError();\n }\n }\n\n /**\n * Adds event callbacks to array\n * @param callback\n */\n addEventCallback(callback: EventCallbackFunction): string | null {\n return this.eventHandler.addEventCallback(callback);\n }\n\n /**\n * Removes callback with provided id from callback array\n * @param callbackId\n */\n removeEventCallback(callbackId: string): void {\n this.eventHandler.removeEventCallback(callbackId);\n }\n\n /**\n * Adds event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\n */\n enableAccountStorageEvents(): void {\n this.eventHandler.enableAccountStorageEvents();\n }\n\n /**\n * Removes event listener that emits an event when a user account is added or removed from localstorage in a different browser tab or window\n */\n disableAccountStorageEvents(): void {\n this.eventHandler.disableAccountStorageEvents();\n }\n\n /**\n * Gets the token cache for the application.\n */\n getTokenCache(): ITokenCache {\n return this.tokenCache;\n }\n\n /**\n * Returns the logger instance\n */\n getLogger(): Logger {\n return this.logger;\n }\n\n /**\n * Replaces the default logger set in configurations with new Logger with new configurations\n * @param logger Logger instance\n */\n setLogger(logger: Logger): void {\n this.logger = logger;\n }\n\n /**\n * Called by wrapper libraries (Angular & React) to set SKU and Version passed down to telemetry, logger, etc.\n * @param sku\n * @param version\n */\n initializeWrapperLibrary(sku: WrapperSKU, version: string): void {\n // Validate the SKU passed in is one we expect\n this.browserStorage.setWrapperMetadata(sku, version);\n }\n\n /**\n * Sets navigation client\n * @param navigationClient\n */\n setNavigationClient(navigationClient: INavigationClient): void {\n this.navigationClient = navigationClient;\n }\n\n /**\n * Returns the configuration object\n */\n getConfiguration(): BrowserConfiguration {\n return this.config;\n }\n\n // #endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;IAiFI,2BAAY,aAA4B;;;;;;QAMpC,IAAI,CAAC,oBAAoB,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;;QAE1D,IAAI,CAAC,MAAM,GAAG,kBAAkB,CAAC,aAAa,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;;QAG3E,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;;QAG1E,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC;;QAGtD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC;;QAG5D,IAAI,CAAC,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;;QAGlC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,oBAAoB,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,6BAA6B,CAAC;QAE5G,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;;QAGtE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,oBAAoB;YAC3C,IAAI,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC;YACtG,6BAA6B,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,I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C,CAAC;KACxD;;;;;IAMD,+CAAmB,GAAnB,UAAoB,gBAAmC;QACnD,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;KAC5C;;;;IAKD,4CAAgB,GAAhB;QACI,OAAO,IAAI,CAAC,MAAM,CAAC;KACtB;IAGL,wBAAC;AAAD,CAAC;;;;"}
@@ -8,6 +8,7 @@ import { WrapperSKU } from "../utils/BrowserConstants";
8
8
  import { INavigationClient } from "../navigation/INavigationClient";
9
9
  import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest";
10
10
  import { ITokenCache } from "../cache/ITokenCache";
11
+ import { BrowserConfiguration } from "../config/Configuration";
11
12
  export interface IPublicClientApplication {
12
13
  acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;
13
14
  acquireTokenRedirect(request: RedirectRequest): Promise<void>;
@@ -34,6 +35,7 @@ export interface IPublicClientApplication {
34
35
  getActiveAccount(): AccountInfo | null;
35
36
  initializeWrapperLibrary(sku: WrapperSKU, version: string): void;
36
37
  setNavigationClient(navigationClient: INavigationClient): void;
38
+ getConfiguration(): BrowserConfiguration;
37
39
  }
38
40
  export declare const stubbedPublicClientApplication: IPublicClientApplication;
39
41
  //# sourceMappingURL=IPublicClientApplication.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IPublicClientApplication.d.ts","sourceRoot":"","sources":["../../src/app/IPublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,U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W,CAAC,aAAa,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACpE,aAAa,IAAI,WAAW,CAAC;IAC7B,SAAS,IAAI,MAAM,CAAC;IACpB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;IACpD,gBAAgB,IAAI,WAAW,GAAG,IAAI,CAAC;IACvC,wBAAwB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACjE,mBAAmB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC/D,gBAAgB,IAAI,oBAAoB,CAAC;CAC5C;AAED,eAAO,MAAM,8BAA8B,EAAE,wBA+E5C,CAAC"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.18.0 2021-10-05 */
1
+ /*! @azure/msal-browser v2.19.0 2021-11-02 */
2
2
  'use strict';
3
3
  import { BrowserConfigurationAuthError } from '../error/BrowserConfigurationAuthError.js';
4
4
 
@@ -81,6 +81,9 @@ var stubbedPublicClientApplication = {
81
81
  },
82
82
  setNavigationClient: function () {
83
83
  return;
84
+ },
85
+ getConfiguration: function () {
86
+ throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();
84
87
  }
85
88
  };
86
89
 
@@ -1 +1 @@
1
- {"version":3,"file":"IPublicClientApplication.js","sources":["../../src/app/IPublicClientApplication.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AuthenticationResult, AccountInfo, Logger } from \"@azure/msal-common\";\r\nimport { RedirectRequest } from \"../request/RedirectRequest\";\r\nimport { PopupRequest } from \"../request/PopupRequest\";\r\nimport { SilentRequest } from \"../request/SilentRequest\";\r\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\r\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\r\nimport { BrowserConfigurationAuthError } from \"../error/BrowserConfigurationAuthError\";\r\nimport { WrapperSKU } from \"../utils/BrowserConstants\";\r\nimport { INavigationClient } from \"../navigation/INavigationClient\";\r\nimport { EndSessionPopupRequest } from \"../request/EndSessionPopupRequest\";\r\nimport { ITokenCache } from \"../cache/ITokenCache\";\r\n\r\nexport interface IPublicClientApplication {\r\n acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;\r\n acquireTokenRedirect(request: RedirectRequest): Promise<void>;\r\n acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;\r\n addEventCallback(callback: Function): string | null;\r\n removeEventCallback(callbackId: string): void;\r\n enableAccountStorageEvents(): void;\r\n disableAccountStorageEvents(): void;\r\n getAccountByHomeId(homeAccountId: string): AccountInfo | null;\r\n getAccountByLocalId(localId: string): AccountInfo | null;\r\n getAccountByUsername(userName: string): AccountInfo | null;\r\n getAllAccounts(): AccountInfo[];\r\n handleRedirectPromise(hash?: string): Promise<AuthenticationResult | null>;\r\n loginPopup(request?: PopupRequest): Promise<AuthenticationResult>;\r\n loginRedirect(request?: RedirectRequest): Promise<void>;\r\n logout(logoutRequest?: EndSessionRequest): Promise<void>;\r\n logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;\r\n logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>;\r\n ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;\r\n getTokenCache(): ITokenCache;\r\n getLogger(): Logger;\r\n setLogger(logger: Logger): void;\r\n setActiveAccount(account: AccountInfo | null): void;\r\n getActiveAccount(): AccountInfo | null;\r\n initializeWrapperLibrary(sku: WrapperSKU, version: string): void;\r\n setNavigationClient(navigationClient: INavigationClient): void;\r\n}\r\n\r\nexport const stubbedPublicClientApplication: IPublicClientApplication = {\r\n acquireTokenPopup: () => {\r\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\r\n },\r\n acquireTokenRedirect: () => {\t\r\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\r\n },\t\r\n acquireTokenSilent: () => {\t\r\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\r\n },\t\r\n getAllAccounts: () => {\r\n return [];\t\r\n },\t\r\n getAccountByHomeId: () => {\r\n return null;\r\n },\r\n getAccountByUsername: () => {\t\r\n return null;\t\r\n },\t\r\n getAccountByLocalId: () => {\r\n return null;\r\n },\r\n handleRedirectPromise: () => {\t\r\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\r\n },\t\r\n loginPopup: () => {\t\r\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\r\n },\t\r\n loginRedirect: () => {\t\r\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\r\n },\t\r\n logout: () => {\t\r\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\r\n },\t\r\n logoutRedirect: () => {\t\r\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\r\n },\r\n logoutPopup: () => {\t\r\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\r\n },\r\n ssoSilent: () => {\t\r\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\r\n },\r\n addEventCallback: () => {\r\n return null;\r\n },\r\n removeEventCallback: () => {\r\n return;\r\n },\r\n enableAccountStorageEvents: () => {\r\n return;\r\n },\r\n disableAccountStorageEvents: () => {\r\n return;\r\n },\r\n getTokenCache: () => {\r\n throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();\r\n },\r\n getLogger: () => {\r\n throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();\r\n },\r\n setLogger: () => {\r\n return;\r\n },\r\n setActiveAccount: () => {\r\n return;\r\n },\r\n getActiveAccount: () => {\r\n return null;\r\n },\r\n initializeWrapperLibrary: () => {\r\n return;\r\n },\r\n setNavigationClient: () => {\r\n return;\r\n }\r\n};\r\n"],"names":[],"mappings":";;;;AAAA;;;;IA6Ca,8BAA8B,GAA6B;IACpE,iBAAiB,EAAE;QACf,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,oBAAoB,EAAE;QAClB,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,kBAAkB,EAAE;QAChB,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,cAAc,EAAE;QACZ,OAAO,EAAE,CAAC;KACb;IACD,kBAAkB,EAAE;QAChB,OAAO,IAAI,CAAC;KACf;IACD,oBAAoB,EAAE;QAClB,OAAO,IAAI,CAAC;KACf;IACD,mBAAmB,EAAE;QACjB,OAAO,IAAI,CAAC;KACf;IACD,qBAAqB,EAAE;QACnB,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,UAAU,EAAE;QACR,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,aAAa,EAAE;QACX,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,MAAM,EAAE;QACJ,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,cAAc,EAAE;QACZ,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,WAAW,EAAE;QACT,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,SAAS,EAAE;QACP,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,gBAAgB,EAAE;QACd,OAAO,IAAI,CAAC;KACf;IACD,mBAAmB,EAAE;QACjB,OAAO;KACV;IACD,0BAA0B,EAAE;QACxB,OAAO;KACV;IACD,2BAA2B,EAAE;QACzB,OAAO;KACV;IACD,aAAa,EAAE;QACX,MAAM,6BAA6B,CAAC,gCAAgC,EAAE,CAAC;KAC1E;IACD,SAAS,EAAE;QACP,MAAM,6BAA6B,CAAC,gCAAgC,EAAE,CAAC;KAC1E;IACD,SAAS,EAAE;QACP,OAAO;KACV;IACD,gBAAgB,EAAE;QACd,OAAO;KACV;IACD,gBAAgB,EAAE;QACd,OAAO,IAAI,CAAC;KACf;IACD,wBAAwB,EAAE;QACtB,OAAO;KACV;IACD,mBAAmB,EAAE;QACjB,OAAO;KACV;;;;;"}
1
+ {"version":3,"file":"IPublicClientApplication.js","sources":["../../src/app/IPublicClientApplication.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthenticationResult, AccountInfo, Logger } from \"@azure/msal-common\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SilentRequest } from \"../request/SilentRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { BrowserConfigurationAuthError } from \"../error/BrowserConfigurationAuthError\";\nimport { WrapperSKU } from \"../utils/BrowserConstants\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { EndSessionPopupRequest } from \"../request/EndSessionPopupRequest\";\nimport { ITokenCache } from \"../cache/ITokenCache\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\n\nexport interface IPublicClientApplication {\n acquireTokenPopup(request: PopupRequest): Promise<AuthenticationResult>;\n acquireTokenRedirect(request: RedirectRequest): Promise<void>;\n acquireTokenSilent(silentRequest: SilentRequest): Promise<AuthenticationResult>;\n addEventCallback(callback: Function): string | null;\n removeEventCallback(callbackId: string): void;\n enableAccountStorageEvents(): void;\n disableAccountStorageEvents(): void;\n getAccountByHomeId(homeAccountId: string): AccountInfo | null;\n getAccountByLocalId(localId: string): AccountInfo | null;\n getAccountByUsername(userName: string): AccountInfo | null;\n getAllAccounts(): AccountInfo[];\n handleRedirectPromise(hash?: string): Promise<AuthenticationResult | null>;\n loginPopup(request?: PopupRequest): Promise<AuthenticationResult>;\n loginRedirect(request?: RedirectRequest): Promise<void>;\n logout(logoutRequest?: EndSessionRequest): Promise<void>;\n logoutRedirect(logoutRequest?: EndSessionRequest): Promise<void>;\n logoutPopup(logoutRequest?: EndSessionPopupRequest): Promise<void>;\n ssoSilent(request: SsoSilentRequest): Promise<AuthenticationResult>;\n getTokenCache(): ITokenCache;\n getLogger(): Logger;\n setLogger(logger: Logger): void;\n setActiveAccount(account: AccountInfo | null): void;\n getActiveAccount(): AccountInfo | null;\n initializeWrapperLibrary(sku: WrapperSKU, version: string): void;\n setNavigationClient(navigationClient: INavigationClient): void;\n getConfiguration(): BrowserConfiguration;\n}\n\nexport const stubbedPublicClientApplication: IPublicClientApplication = {\n acquireTokenPopup: () => {\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\n },\n acquireTokenRedirect: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n acquireTokenSilent: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n getAllAccounts: () => {\n return [];\t\n },\t\n getAccountByHomeId: () => {\n return null;\n },\n getAccountByUsername: () => {\t\n return null;\t\n },\t\n getAccountByLocalId: () => {\n return null;\n },\n handleRedirectPromise: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n loginPopup: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n loginRedirect: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n logout: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\t\n logoutRedirect: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\n logoutPopup: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\n ssoSilent: () => {\t\n return Promise.reject(BrowserConfigurationAuthError.createStubPcaInstanceCalledError());\t\n },\n addEventCallback: () => {\n return null;\n },\n removeEventCallback: () => {\n return;\n },\n enableAccountStorageEvents: () => {\n return;\n },\n disableAccountStorageEvents: () => {\n return;\n },\n getTokenCache: () => {\n throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();\n },\n getLogger: () => {\n throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();\n },\n setLogger: () => {\n return;\n },\n setActiveAccount: () => {\n return;\n },\n getActiveAccount: () => {\n return null;\n },\n initializeWrapperLibrary: () => {\n return;\n },\n setNavigationClient: () => {\n return;\n },\n getConfiguration: () => {\n throw BrowserConfigurationAuthError.createStubPcaInstanceCalledError();\n }\n};\n"],"names":[],"mappings":";;;;AAAA;;;;IA+Ca,8BAA8B,GAA6B;IACpE,iBAAiB,EAAE;QACf,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,oBAAoB,EAAE;QAClB,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,kBAAkB,EAAE;QAChB,OAAO,OAAO,CAAC,MAAM,CAAC,6BAA6B,CAAC,gCAAgC,EAAE,CAAC,CAAC;KAC3F;IACD,cAAc,EAAE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AAO;KACV;IACD,gBAAgB,EAAE;QACd,OAAO,IAAI,CAAC;KACf;IACD,wBAAwB,EAAE;QACtB,OAAO;KACV;IACD,mBAAmB,EAAE;QACjB,OAAO;KACV;IACD,gBAAgB,EAAE;QACd,MAAM,6BAA6B,CAAC,gCAAgC,EAAE,CAAC;KAC1E;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../src/app/PublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAe,oBAAoB,EAAqB,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAKzD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,iBAAkB,YAAW,wBAAwB;IAG9F,OAAO,CAAC,yBAAyB,CAA6C;IAE9E;;;;;;;;;;;;;;;;;;;;OAoBG;gBACS,aAAa,EAAE,aAAa;IAMxC;;;;;;;;OAQG;IACG,aAAa,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAK7D;;;;;;OAMG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAKjE;;;;;OAKG;IACG,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAsC/E;;;;;OAKG;YACW,uBAAuB;CAgBxC"}
1
+ {"version":3,"file":"PublicClientApplication.d.ts","sourceRoot":"","sources":["../../src/app/PublicClientApplication.ts"],"names":[],"mappings":"AAKA,OAAO,EAAe,oBAAoB,EAAqB,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAKzD;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,iBAAkB,YAAW,wBAAwB;IAG9F,OAAO,CAAC,yBAAyB,CAA6C;IAE9E;;;;;;;;;;;;;;;;;;;;OAoBG;gBACS,aAAa,EAAE,aAAa;IAMxC;;;;;;;;OAQG;IACG,aAAa,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAK7D;;;;;;OAMG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAKjE;;;;;OAKG;IACG,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAwC/E;;;;;OAKG;YACW,uBAAuB;CAgBxC"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.18.0 2021-10-05 */
1
+ /*! @azure/msal-browser v2.19.0 2021-11-02 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { DEFAULT_REQUEST, InteractionType } from '../utils/BrowserConstants.js';
@@ -96,7 +96,9 @@ var PublicClientApplication = /** @class */ (function (_super) {
96
96
  authenticationScheme: request.authenticationScheme,
97
97
  resourceRequestMethod: request.resourceRequestMethod,
98
98
  resourceRequestUri: request.resourceRequestUri,
99
- shrClaims: request.shrClaims
99
+ shrClaims: request.shrClaims,
100
+ sshJwk: request.sshJwk,
101
+ sshKid: request.sshKid
100
102
  };
101
103
  silentRequestKey = JSON.stringify(thumbprint);
102
104
  cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey);
@@ -132,7 +134,7 @@ var PublicClientApplication = /** @class */ (function (_super) {
132
134
  var silentCacheClient, silentRequest;
133
135
  var _this = this;
134
136
  return __generator(this, function (_a) {
135
- silentCacheClient = new SilentCacheClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient);
137
+ silentCacheClient = new SilentCacheClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);
136
138
  silentRequest = silentCacheClient.initializeSilentRequest(request, account);
137
139
  this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);
138
140
  return [2 /*return*/, silentCacheClient.acquireToken(silentRequest).catch(function () { return __awaiter(_this, void 0, void 0, function () {
@@ -1 +1 @@
1
- {"version":3,"file":"PublicClientApplication.js","sources":["../../src/app/PublicClientApplication.ts"],"sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\n\r\nimport { AccountInfo, AuthenticationResult, RequestThumbprint } from \"@azure/msal-common\";\r\nimport { Configuration } from \"../config/Configuration\";\r\nimport { DEFAULT_REQUEST, InteractionType } from \"../utils/BrowserConstants\";\r\nimport { IPublicClientApplication } from \"./IPublicClientApplication\";\r\nimport { RedirectRequest } from \"../request/RedirectRequest\";\r\nimport { PopupRequest } from \"../request/PopupRequest\";\r\nimport { ClientApplication } from \"./ClientApplication\";\r\nimport { SilentRequest } from \"../request/SilentRequest\";\r\nimport { EventType } from \"../event/EventType\";\r\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\r\nimport { SilentCacheClient } from \"../interaction_client/SilentCacheClient\";\r\n\r\n/**\r\n * The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications\r\n * to obtain JWT tokens as described in the OAuth 2.0 Authorization Code Flow with PKCE specification.\r\n */\r\nexport class PublicClientApplication extends ClientApplication implements IPublicClientApplication {\r\n\r\n // Active requests\r\n private activeSilentTokenRequests: Map<string, Promise<AuthenticationResult>>;\r\n\r\n /**\r\n * @constructor\r\n * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object\r\n *\r\n * Important attributes in the Configuration object for auth are:\r\n * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview\r\n * - authority: the authority URL for your application.\r\n * - redirect_uri: the uri of your application registered in the portal.\r\n *\r\n * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.\r\n * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}\r\n * If your application supports Accounts in one organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).\r\n * If your application supports Accounts in any organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with organizations.\r\n * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace \"Enter_the_Tenant_Info_Here\" value with common.\r\n * To restrict support to Personal Microsoft accounts only, replace \"Enter_the_Tenant_Info_Here\" value with consumers.\r\n *\r\n * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/\r\n * Full B2C functionality will be available in this library in future versions.\r\n *\r\n * @param configuration object for the MSAL PublicClientApplication instance\r\n */\r\n constructor(configuration: Configuration) {\r\n super(configuration);\r\n\r\n this.activeSilentTokenRequests = new Map();\r\n }\r\n\r\n /**\r\n * Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so\r\n * any code that follows this function will not execute.\r\n *\r\n * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current\r\n * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.\r\n *\r\n * @param request\r\n */\r\n async loginRedirect(request?: RedirectRequest): Promise<void> {\r\n this.logger.verbose(\"loginRedirect called\");\r\n return this.acquireTokenRedirect(request || DEFAULT_REQUEST);\r\n }\r\n\r\n /**\r\n * Use when initiating the login process via opening a popup window in the user's browser\r\n *\r\n * @param request\r\n *\r\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\r\n */\r\n loginPopup(request?: PopupRequest): Promise<AuthenticationResult> {\r\n this.logger.verbose(\"loginPopup called\");\r\n return this.acquireTokenPopup(request || DEFAULT_REQUEST);\r\n }\r\n\r\n /**\r\n * Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.\r\n *\r\n * @param {@link (SilentRequest:type)}\r\n * @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} object\r\n */\r\n async acquireTokenSilent(request: SilentRequest): Promise<AuthenticationResult> {\r\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\r\n this.logger.verbose(\"acquireTokenSilent called\", request.correlationId);\r\n const account = request.account || this.getActiveAccount();\r\n if (!account) {\r\n throw BrowserAuthError.createNoAccountError();\r\n }\r\n const thumbprint: RequestThumbprint = {\r\n clientId: this.config.auth.clientId,\r\n authority: request.authority || \"\",\r\n scopes: request.scopes,\r\n homeAccountIdentifier: account.homeAccountId,\r\n authenticationScheme: request.authenticationScheme,\r\n resourceRequestMethod: request.resourceRequestMethod,\r\n resourceRequestUri: request.resourceRequestUri,\r\n shrClaims: request.shrClaims\r\n };\r\n const silentRequestKey = JSON.stringify(thumbprint);\r\n const cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey);\r\n if (typeof cachedResponse === \"undefined\") {\r\n this.logger.verbose(\"acquireTokenSilent called for the first time, storing active request\", request.correlationId);\r\n const response = this.acquireTokenSilentAsync(request, account)\r\n .then((result) => {\r\n this.activeSilentTokenRequests.delete(silentRequestKey);\r\n return result;\r\n })\r\n .catch((error) => {\r\n this.activeSilentTokenRequests.delete(silentRequestKey);\r\n throw error;\r\n });\r\n this.activeSilentTokenRequests.set(silentRequestKey, response);\r\n return response;\r\n } else {\r\n this.logger.verbose(\"acquireTokenSilent has been called previously, returning the result from the first call\", request.correlationId);\r\n return cachedResponse;\r\n }\r\n }\r\n\r\n /**\r\n * Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token.\r\n * @param {@link (SilentRequest:type)}\r\n * @param {@link (AccountInfo:type)}\r\n * @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} \r\n */\r\n private async acquireTokenSilentAsync(request: SilentRequest, account: AccountInfo): Promise<AuthenticationResult>{\r\n const silentCacheClient = new SilentCacheClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient);\r\n const silentRequest = silentCacheClient.initializeSilentRequest(request, account);\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);\r\n\r\n return silentCacheClient.acquireToken(silentRequest).catch(async () => {\r\n try {\r\n const tokenRenewalResult = await this.acquireTokenByRefreshToken(silentRequest);\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, tokenRenewalResult);\r\n return tokenRenewalResult;\r\n } catch (tokenRenewalError) {\r\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError);\r\n throw tokenRenewalError;\r\n }\r\n });\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;AAiBA;;;;;IAI6C,2CAAiB;;;;;;;;;;;;;;;;;;;;;;IA0B1D,iCAAY,aAA4B;QAAxC,YACI,kBAAM,aAAa,CAAC,SAGvB;QADG,KAAI,CAAC,yBAAyB,GAAG,IAAI,GAAG,EAAE,CAAC;;KAC9C;;;;;;;;;;IAWK,+CAAa,GAAnB,UAAoB,OAAyB;;;gBACzC,IAAI,CAAC,MAAM,CAA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,CAAC,0BAA0B,CAAC,aAAa,CAAC,EAAA;;oCAAzE,kBAAkB,GAAG,SAAoD;oCAC/E,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,qBAAqB,EAAE,eAAe,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;oCACzG,sBAAO,kBAAkB,EAAC;;;oCAE1B,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,qBAAqB,EAAE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,mBAAiB,CAAC,CAAC;oCAC9G,MAAM,mBAAiB,CAAC;;;;yBAE/B,CAAC,EAAC;;;KACN;IACL,8BAAC;AAAD,CA5HA,CAA6C,iBAAiB;;;;"}
1
+ {"version":3,"file":"PublicClientApplication.js","sources":["../../src/app/PublicClientApplication.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AccountInfo, AuthenticationResult, RequestThumbprint } from \"@azure/msal-common\";\nimport { Configuration } from \"../config/Configuration\";\nimport { DEFAULT_REQUEST, InteractionType } from \"../utils/BrowserConstants\";\nimport { IPublicClientApplication } from \"./IPublicClientApplication\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { ClientApplication } from \"./ClientApplication\";\nimport { SilentRequest } from \"../request/SilentRequest\";\nimport { EventType } from \"../event/EventType\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { SilentCacheClient } from \"../interaction_client/SilentCacheClient\";\n\n/**\n * The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications\n * to obtain JWT tokens as described in the OAuth 2.0 Authorization Code Flow with PKCE specification.\n */\nexport class PublicClientApplication extends ClientApplication implements IPublicClientApplication {\n\n // Active requests\n private activeSilentTokenRequests: Map<string, Promise<AuthenticationResult>>;\n\n /**\n * @constructor\n * Constructor for the PublicClientApplication used to instantiate the PublicClientApplication object\n *\n * Important attributes in the Configuration object for auth are:\n * - clientID: the application ID of your application. You can obtain one by registering your application with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview\n * - authority: the authority URL for your application.\n * - redirect_uri: the uri of your application registered in the portal.\n *\n * In Azure AD, authority is a URL indicating the Azure active directory that MSAL uses to obtain tokens.\n * It is of the form https://login.microsoftonline.com/{Enter_the_Tenant_Info_Here}\n * If your application supports Accounts in one organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with the Tenant Id or Tenant name (for example, contoso.microsoft.com).\n * If your application supports Accounts in any organizational directory, replace \"Enter_the_Tenant_Info_Here\" value with organizations.\n * If your application supports Accounts in any organizational directory and personal Microsoft accounts, replace \"Enter_the_Tenant_Info_Here\" value with common.\n * To restrict support to Personal Microsoft accounts only, replace \"Enter_the_Tenant_Info_Here\" value with consumers.\n *\n * In Azure B2C, authority is of the form https://{instance}/tfp/{tenant}/{policyName}/\n * Full B2C functionality will be available in this library in future versions.\n *\n * @param configuration object for the MSAL PublicClientApplication instance\n */\n constructor(configuration: Configuration) {\n super(configuration);\n\n this.activeSilentTokenRequests = new Map();\n }\n\n /**\n * Use when initiating the login process by redirecting the user's browser to the authorization endpoint. This function redirects the page, so\n * any code that follows this function will not execute.\n *\n * IMPORTANT: It is NOT recommended to have code that is dependent on the resolution of the Promise. This function will navigate away from the current\n * browser window. It currently returns a Promise in order to reflect the asynchronous nature of the code running in this function.\n *\n * @param request\n */\n async loginRedirect(request?: RedirectRequest): Promise<void> {\n this.logger.verbose(\"loginRedirect called\");\n return this.acquireTokenRedirect(request || DEFAULT_REQUEST);\n }\n\n /**\n * Use when initiating the login process via opening a popup window in the user's browser\n *\n * @param request\n *\n * @returns A promise that is fulfilled when this function has completed, or rejected if an error was raised.\n */\n loginPopup(request?: PopupRequest): Promise<AuthenticationResult> {\n this.logger.verbose(\"loginPopup called\");\n return this.acquireTokenPopup(request || DEFAULT_REQUEST);\n }\n\n /**\n * Silently acquire an access token for a given set of scopes. Returns currently processing promise if parallel requests are made.\n *\n * @param {@link (SilentRequest:type)}\n * @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} object\n */\n async acquireTokenSilent(request: SilentRequest): Promise<AuthenticationResult> {\n this.preflightBrowserEnvironmentCheck(InteractionType.Silent);\n this.logger.verbose(\"acquireTokenSilent called\", request.correlationId);\n const account = request.account || this.getActiveAccount();\n if (!account) {\n throw BrowserAuthError.createNoAccountError();\n }\n const thumbprint: RequestThumbprint = {\n clientId: this.config.auth.clientId,\n authority: request.authority || \"\",\n scopes: request.scopes,\n homeAccountIdentifier: account.homeAccountId,\n authenticationScheme: request.authenticationScheme,\n resourceRequestMethod: request.resourceRequestMethod,\n resourceRequestUri: request.resourceRequestUri,\n shrClaims: request.shrClaims,\n sshJwk: request.sshJwk,\n sshKid: request.sshKid\n };\n const silentRequestKey = JSON.stringify(thumbprint);\n const cachedResponse = this.activeSilentTokenRequests.get(silentRequestKey);\n if (typeof cachedResponse === \"undefined\") {\n this.logger.verbose(\"acquireTokenSilent called for the first time, storing active request\", request.correlationId);\n const response = this.acquireTokenSilentAsync(request, account)\n .then((result) => {\n this.activeSilentTokenRequests.delete(silentRequestKey);\n return result;\n })\n .catch((error) => {\n this.activeSilentTokenRequests.delete(silentRequestKey);\n throw error;\n });\n this.activeSilentTokenRequests.set(silentRequestKey, response);\n return response;\n } else {\n this.logger.verbose(\"acquireTokenSilent has been called previously, returning the result from the first call\", request.correlationId);\n return cachedResponse;\n }\n }\n\n /**\n * Silently acquire an access token for a given set of scopes. Will use cached token if available, otherwise will attempt to acquire a new token from the network via refresh token.\n * @param {@link (SilentRequest:type)}\n * @param {@link (AccountInfo:type)}\n * @returns {Promise.<AuthenticationResult>} - a promise that is fulfilled when this function has completed, or rejected if an error was raised. Returns the {@link AuthResponse} \n */\n private async acquireTokenSilentAsync(request: SilentRequest, account: AccountInfo): Promise<AuthenticationResult>{\n const silentCacheClient = new SilentCacheClient(this.config, this.browserStorage, this.browserCrypto, this.logger, this.eventHandler, this.navigationClient, request.correlationId);\n const silentRequest = silentCacheClient.initializeSilentRequest(request, account);\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_START, InteractionType.Silent, request);\n\n return silentCacheClient.acquireToken(silentRequest).catch(async () => {\n try {\n const tokenRenewalResult = await this.acquireTokenByRefreshToken(silentRequest);\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_SUCCESS, InteractionType.Silent, tokenRenewalResult);\n return tokenRenewalResult;\n } catch (tokenRenewalError) {\n this.eventHandler.emitEvent(EventType.ACQUIRE_TOKEN_FAILURE, InteractionType.Silent, null, tokenRenewalError);\n throw tokenRenewalError;\n }\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;AAiBA;;;;;IAI6C,2CAAiB;;;;;;;;;;;;;;;;;;;;;;IA0B1D,iCAAY,aAA4B;QAAxC,YACI,kBAAM,aAAa,CAAC,SAGvB;QADG,KAAI,CAAC,yBAAyB,GAAG,IAAI,GAAG,EAAE,CAAC;;KAC9C;;;;;;;;;;IAWK,+CAAa,GAAnB,UAAoB,OAAyB;;;gBACzC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;gBAC5C,sBAAO,IAAI,CAAC,oBAAoB,CAAC,OAAO,IAAI,eAAe,CAAC,EAAC;;;KAChE;;;;;;;;IASD,4CAAU,GAAV,UAAW,OAAsB;QAC7B,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,IAAI,eAAe,CAAC,CAAC;KAC7D;;;;;;;IAQK,oDAAkB,GAAxB,UAAyB,OAAsB;;;;;gBAC3C,IAAI,CAAC,gCAAgC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;gBAC9D,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,2B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AM,mBAAiB,CAAC;;;;yBAE/B,CAAC,EAAC;;;KACN;IACL,8BAAC;AAAD,CA9HA,CAA6C,iBAAiB;;;;"}
@@ -0,0 +1,46 @@
1
+ import { Logger } from "..";
2
+ import { IAsyncStorage } from "./IAsyncMemoryStorage";
3
+ /**
4
+ * This class allows MSAL to store artifacts asynchronously using the DatabaseStorage IndexedDB wrapper,
5
+ * backed up with the more volatile MemoryStorage object for cases in which IndexedDB may be unavailable.
6
+ */
7
+ export declare class AsyncMemoryStorage<T> implements IAsyncStorage<T> {
8
+ private inMemoryCache;
9
+ private indexedDBCache;
10
+ private logger;
11
+ constructor(logger: Logger);
12
+ private handleDatabaseAccessError;
13
+ /**
14
+ * Get the item matching the given key. Tries in-memory cache first, then in the asynchronous
15
+ * storage object if item isn't found in-memory.
16
+ * @param key
17
+ */
18
+ getItem(key: string): Promise<T | null>;
19
+ /**
20
+ * Sets the item in the in-memory cache and then tries to set it in the asynchronous
21
+ * storage object with the given key.
22
+ * @param key
23
+ * @param value
24
+ */
25
+ setItem(key: string, value: T): Promise<void>;
26
+ /**
27
+ * Removes the item matching the key from the in-memory cache, then tries to remove it from the asynchronous storage object.
28
+ * @param key
29
+ */
30
+ removeItem(key: string): Promise<void>;
31
+ /**
32
+ * Get all the keys from the in-memory cache as an iterable array of strings. If no keys are found, query the keys in the
33
+ * asynchronous storage object.
34
+ */
35
+ getKeys(): Promise<string[]>;
36
+ /**
37
+ * Returns true or false if the given key is present in the cache.
38
+ * @param key
39
+ */
40
+ containsKey(key: string): Promise<boolean>;
41
+ /**
42
+ * Clears in-memory Map and tries to delete the IndexedDB database.
43
+ */
44
+ clear(): Promise<void>;
45
+ }
46
+ //# sourceMappingURL=AsyncMemoryStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncMemoryStorage.d.ts","sourceRoot":"","sources":["../../src/cache/AsyncMemoryStorage.ts"],"names":[],"mappings":"AAKA,OAAO,EAA6C,MAAM,EAAE,MAAM,IAAI,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD;;;GAGG;AACH,qBAAa,kBAAkB,CAAC,CAAC,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,aAAa,CAAmB;IACxC,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,MAAM;IAM1B,OAAO,CAAC,yBAAyB;IAKjC;;;;OAIG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAa7C;;;;;OAKG;IACG,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IASnD;;;OAGG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5C;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAalC;;;OAGG;IACG,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAahD;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ/B"}