@azure/msal-browser 2.20.0 → 2.22.1

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 (127) hide show
  1. package/README.md +3 -3
  2. package/dist/_virtual/_tslib.js +1 -1
  3. package/dist/app/ClientApplication.d.ts +7 -1
  4. package/dist/app/ClientApplication.d.ts.map +1 -1
  5. package/dist/app/ClientApplication.js +18 -3
  6. package/dist/app/ClientApplication.js.map +1 -1
  7. package/dist/app/IPublicClientApplication.js +1 -1
  8. package/dist/app/PublicClientApplication.d.ts +2 -2
  9. package/dist/app/PublicClientApplication.d.ts.map +1 -1
  10. package/dist/app/PublicClientApplication.js +29 -24
  11. package/dist/app/PublicClientApplication.js.map +1 -1
  12. package/dist/cache/AsyncMemoryStorage.js +1 -1
  13. package/dist/cache/BrowserCacheManager.d.ts +19 -13
  14. package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
  15. package/dist/cache/BrowserCacheManager.js +31 -7
  16. package/dist/cache/BrowserCacheManager.js.map +1 -1
  17. package/dist/cache/BrowserStorage.js +1 -1
  18. package/dist/cache/DatabaseStorage.js +1 -1
  19. package/dist/cache/MemoryStorage.js +1 -1
  20. package/dist/cache/TokenCache.d.ts.map +1 -1
  21. package/dist/cache/TokenCache.js +4 -3
  22. package/dist/cache/TokenCache.js.map +1 -1
  23. package/dist/config/Configuration.d.ts +10 -9
  24. package/dist/config/Configuration.d.ts.map +1 -1
  25. package/dist/config/Configuration.js +7 -3
  26. package/dist/config/Configuration.js.map +1 -1
  27. package/dist/crypto/BrowserCrypto.js +1 -1
  28. package/dist/crypto/CryptoOps.d.ts +5 -0
  29. package/dist/crypto/CryptoOps.d.ts.map +1 -1
  30. package/dist/crypto/CryptoOps.js +22 -5
  31. package/dist/crypto/CryptoOps.js.map +1 -1
  32. package/dist/crypto/GuidGenerator.js +1 -1
  33. package/dist/crypto/PkceGenerator.js +1 -1
  34. package/dist/crypto/SignedHttpRequest.js +1 -1
  35. package/dist/encode/Base64Decode.js +1 -1
  36. package/dist/encode/Base64Encode.js +1 -1
  37. package/dist/error/BrowserAuthError.js +1 -1
  38. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  39. package/dist/event/EventHandler.js +1 -1
  40. package/dist/event/EventMessage.js +1 -1
  41. package/dist/event/EventType.js +1 -1
  42. package/dist/index.cjs.js +615 -346
  43. package/dist/index.cjs.js.map +1 -1
  44. package/dist/index.d.ts +14 -2
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +14 -3
  47. package/dist/index.js.map +1 -1
  48. package/dist/interaction_client/BaseInteractionClient.d.ts +2 -2
  49. package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
  50. package/dist/interaction_client/BaseInteractionClient.js +37 -23
  51. package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
  52. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  53. package/dist/interaction_client/PopupClient.d.ts +4 -3
  54. package/dist/interaction_client/PopupClient.d.ts.map +1 -1
  55. package/dist/interaction_client/PopupClient.js +22 -20
  56. package/dist/interaction_client/PopupClient.js.map +1 -1
  57. package/dist/interaction_client/RedirectClient.d.ts +3 -3
  58. package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
  59. package/dist/interaction_client/RedirectClient.js +32 -19
  60. package/dist/interaction_client/RedirectClient.js.map +1 -1
  61. package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
  62. package/dist/interaction_client/SilentAuthCodeClient.js +11 -8
  63. package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -1
  64. package/dist/interaction_client/SilentCacheClient.d.ts +3 -3
  65. package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
  66. package/dist/interaction_client/SilentCacheClient.js +15 -5
  67. package/dist/interaction_client/SilentCacheClient.js.map +1 -1
  68. package/dist/interaction_client/SilentIframeClient.d.ts +3 -3
  69. package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
  70. package/dist/interaction_client/SilentIframeClient.js +15 -12
  71. package/dist/interaction_client/SilentIframeClient.js.map +1 -1
  72. package/dist/interaction_client/SilentRefreshClient.d.ts +2 -2
  73. package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
  74. package/dist/interaction_client/SilentRefreshClient.js +13 -10
  75. package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
  76. package/dist/interaction_client/StandardInteractionClient.d.ts +11 -11
  77. package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
  78. package/dist/interaction_client/StandardInteractionClient.js +90 -57
  79. package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
  80. package/dist/interaction_handler/InteractionHandler.js +1 -1
  81. package/dist/interaction_handler/PopupHandler.d.ts.map +1 -1
  82. package/dist/interaction_handler/PopupHandler.js +1 -3
  83. package/dist/interaction_handler/PopupHandler.js.map +1 -1
  84. package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
  85. package/dist/interaction_handler/RedirectHandler.js +1 -2
  86. package/dist/interaction_handler/RedirectHandler.js.map +1 -1
  87. package/dist/interaction_handler/SilentHandler.js +1 -1
  88. package/dist/navigation/NavigationClient.js +1 -1
  89. package/dist/network/FetchClient.js +1 -1
  90. package/dist/network/XhrClient.js +1 -1
  91. package/dist/packageMetadata.d.ts +1 -1
  92. package/dist/packageMetadata.js +2 -2
  93. package/dist/packageMetadata.js.map +1 -1
  94. package/dist/request/AuthorizationCodeRequest.d.ts +1 -1
  95. package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
  96. package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
  97. package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
  98. package/dist/request/EndSessionPopupRequest.d.ts +1 -0
  99. package/dist/request/EndSessionPopupRequest.d.ts.map +1 -1
  100. package/dist/request/EndSessionRequest.d.ts +1 -0
  101. package/dist/request/EndSessionRequest.d.ts.map +1 -1
  102. package/dist/request/PopupRequest.d.ts +1 -1
  103. package/dist/request/PopupRequest.d.ts.map +1 -1
  104. package/dist/request/RedirectRequest.d.ts +1 -1
  105. package/dist/request/RedirectRequest.d.ts.map +1 -1
  106. package/dist/request/SilentRequest.d.ts +1 -1
  107. package/dist/request/SilentRequest.d.ts.map +1 -1
  108. package/dist/request/SsoSilentRequest.d.ts +1 -1
  109. package/dist/request/SsoSilentRequest.d.ts.map +1 -1
  110. package/dist/utils/BrowserConstants.d.ts +2 -1
  111. package/dist/utils/BrowserConstants.d.ts.map +1 -1
  112. package/dist/utils/BrowserConstants.js +2 -1
  113. package/dist/utils/BrowserConstants.js.map +1 -1
  114. package/dist/utils/BrowserProtocolUtils.js +1 -1
  115. package/dist/utils/BrowserStringUtils.js +1 -1
  116. package/dist/utils/BrowserUtils.js +1 -1
  117. package/dist/utils/MathUtils.js +1 -1
  118. package/dist/utils/PopupUtils.d.ts +1 -2
  119. package/dist/utils/PopupUtils.d.ts.map +1 -1
  120. package/dist/utils/PopupUtils.js +3 -3
  121. package/dist/utils/PopupUtils.js.map +1 -1
  122. package/lib/msal-browser.js +615 -346
  123. package/lib/msal-browser.js.map +1 -1
  124. package/lib/msal-browser.min.js +34 -29
  125. package/package.json +2 -2
  126. package/CHANGELOG.json +0 -1656
  127. package/CHANGELOG.md +0 -523
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.js","sources":["../../src/config/Configuration.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SystemOptions, LoggerOptions, INetworkModule, DEFAULT_SYSTEM_OPTIONS, Constants, ProtocolMode, LogLevel, StubbedNetworkModule } from \"@azure/msal-common\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { BrowserCacheLocation } from \"../utils/BrowserConstants\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { NavigationClient } from \"../navigation/NavigationClient\";\n\n// Default timeout for popup windows and iframes in milliseconds\nexport const DEFAULT_POPUP_TIMEOUT_MS = 60000;\nexport const DEFAULT_IFRAME_TIMEOUT_MS = 6000;\nexport const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;\n\n/**\n * Use this to configure the auth options in the Configuration object\n *\n * - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform\n * - authority - You can configure a specific authority, defaults to \" \" or \"https://login.microsoftonline.com/common\"\n * - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios.\n * - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios.\n * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.\n * - postLogoutRedirectUri - The redirect URI where the window navigates after a successful logout.\n * - navigateToLoginRequestUrl - Boolean indicating whether to navigate to the original request URL after the auth server navigates to the redirect URL.\n * - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.\n * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.\n */\nexport type BrowserAuthOptions = {\n clientId: string;\n authority?: string;\n knownAuthorities?: Array<string>;\n cloudDiscoveryMetadata?: string;\n authorityMetadata?: string;\n redirectUri?: string;\n postLogoutRedirectUri?: string | null;\n navigateToLoginRequestUrl?: boolean;\n clientCapabilities?: Array<string>;\n protocolMode?: ProtocolMode;\n};\n\n/**\n * Use this to configure the below cache configuration options:\n *\n * - cacheLocation - Used to specify the cacheLocation user wants to set. Valid values are \"localStorage\" and \"sessionStorage\"\n * - storeAuthStateInCookie - If set, MSAL stores the auth request state required for validation of the auth flows in the browser cookies. By default this flag is set to false.\n * - secureCookies - If set, MSAL sets the \"Secure\" flag on cookies so they can only be sent over HTTPS. By default this flag is set to false.\n */\nexport type CacheOptions = {\n cacheLocation?: BrowserCacheLocation | string;\n storeAuthStateInCookie?: boolean;\n secureCookies?: boolean;\n};\n\n/**\n * Library Specific Options\n *\n * - tokenRenewalOffsetSeconds - Sets the window of offset needed to renew the token before expiry\n * - loggerOptions - Used to initialize the Logger object (See ClientConfiguration.ts)\n * - networkClient - Network interface implementation\n * - windowHashTimeout - Sets the timeout for waiting for a response hash in a popup. Will take precedence over loadFrameTimeout if both are set.\n * - iframeHashTimeout - Sets the timeout for waiting for a response hash in an iframe. Will take precedence over loadFrameTimeout if both are set.\n * - loadFrameTimeout - Sets the timeout for waiting for a response hash in an iframe or popup\n * - navigateFrameWait - Maximum time the library should wait for a frame to load\n * - redirectNavigationTimeout - Time to wait for redirection to occur before resolving promise\n * - asyncPopups - Sets whether popups are opened asynchronously. By default, this flag is set to false. When set to false, blank popups are opened before anything else happens. When set to true, popups are opened when making the network request.\n * - allowRedirectInIframe - Flag to enable redirect opertaions when the app is rendered in an iframe (to support scenarios such as embedded B2C login).\n */\nexport type BrowserSystemOptions = SystemOptions & {\n loggerOptions?: LoggerOptions;\n networkClient?: INetworkModule;\n navigationClient?: INavigationClient;\n windowHashTimeout?: number;\n iframeHashTimeout?: number;\n loadFrameTimeout?: number;\n navigateFrameWait?: number;\n redirectNavigationTimeout?: number;\n asyncPopups?: boolean;\n allowRedirectInIframe?: boolean;\n};\n\n/**\n * Use the configuration object to configure MSAL and initialize the UserAgentApplication.\n *\n * This object allows you to configure important elements of MSAL functionality:\n * - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform\n * - cache: this is where you configure cache location and whether to store cache in cookies\n * - system: this is where you can configure the network client, logger, token renewal offset\n */\nexport type Configuration = {\n auth: BrowserAuthOptions,\n cache?: CacheOptions,\n system?: BrowserSystemOptions\n};\n\nexport type BrowserConfiguration = {\n auth: Required<BrowserAuthOptions>,\n cache: Required<CacheOptions>,\n system: Required<BrowserSystemOptions>\n};\n\n/**\n * MSAL function that sets the default options when not explicitly configured from app developer\n *\n * @param auth\n * @param cache\n * @param system\n *\n * @returns Configuration object\n */\nexport function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system: userInputSystem }: Configuration, isBrowserEnvironment: boolean): BrowserConfiguration {\n\n // Default auth options for browser\n const DEFAULT_AUTH_OPTIONS: Required<BrowserAuthOptions> = {\n clientId: \"\",\n authority: `${Constants.DEFAULT_AUTHORITY}`,\n knownAuthorities: [],\n cloudDiscoveryMetadata: \"\",\n authorityMetadata: \"\",\n redirectUri: \"\",\n postLogoutRedirectUri: \"\",\n navigateToLoginRequestUrl: true,\n clientCapabilities: [],\n protocolMode: ProtocolMode.AAD\n };\n\n // Default cache options for browser\n const DEFAULT_CACHE_OPTIONS: Required<CacheOptions> = {\n cacheLocation: BrowserCacheLocation.SessionStorage,\n storeAuthStateInCookie: false,\n secureCookies: false\n };\n\n // Default logger options for browser\n const DEFAULT_LOGGER_OPTIONS: LoggerOptions = {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n loggerCallback: (): void => {},\n logLevel: LogLevel.Info,\n piiLoggingEnabled: false\n };\n\n // Default system options for browser\n const DEFAULT_BROWSER_SYSTEM_OPTIONS: Required<BrowserSystemOptions> = {\n ...DEFAULT_SYSTEM_OPTIONS,\n loggerOptions: DEFAULT_LOGGER_OPTIONS,\n networkClient: isBrowserEnvironment ? BrowserUtils.getBrowserNetworkClient() : StubbedNetworkModule,\n navigationClient: new NavigationClient(),\n loadFrameTimeout: 0,\n // If loadFrameTimeout is provided, use that as default.\n windowHashTimeout: (userInputSystem && userInputSystem.loadFrameTimeout) || DEFAULT_POPUP_TIMEOUT_MS,\n iframeHashTimeout: (userInputSystem && userInputSystem.loadFrameTimeout) || DEFAULT_IFRAME_TIMEOUT_MS,\n navigateFrameWait: isBrowserEnvironment && BrowserUtils.detectIEOrEdge() ? 500 : 0,\n redirectNavigationTimeout: DEFAULT_REDIRECT_TIMEOUT_MS,\n asyncPopups: false,\n allowRedirectInIframe: false\n };\n\n const overlayedConfig: BrowserConfiguration = {\n auth: { ...DEFAULT_AUTH_OPTIONS, ...userInputAuth },\n cache: { ...DEFAULT_CACHE_OPTIONS, ...userInputCache },\n system: { ...DEFAULT_BROWSER_SYSTEM_OPTIONS, ...userInputSyst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,oBAAoB,IAAI,YAAY,CAAC,cAAc,EAAE,GAAG,GAAG,GAAG,CAAC,EAClF,yBAAyB,EAAE,2BAA2B,EACtD,WAAW,EAAE,KAAK,EAClB,qBAAqB,EAAE,KAAK,GAC/B,CAAC;IAEF,IAAM,eAAe,GAAyB;QAC1C,IAAI,wBAAO,oBAAoB,GAAK,aAAa,CAAE;QACnD,KAAK,wBAAO,qBAAqB,GAAK,cAAc,CAAE;QACtD,MAAM,wBAAO,8BAA8B,GAAK,eAAe,CAAE;KACpE,CAAC;IACF,OAAO,eAAe,CAAC;AAC3B;;;;"}
1
+ {"version":3,"file":"Configuration.js","sources":["../../src/config/Configuration.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { SystemOptions, LoggerOptions, INetworkModule, DEFAULT_SYSTEM_OPTIONS, Constants, ProtocolMode, LogLevel, StubbedNetworkModule, AzureCloudInstance, AzureCloudOptions } from \"@azure/msal-common\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { BrowserCacheLocation } from \"../utils/BrowserConstants\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { NavigationClient } from \"../navigation/NavigationClient\";\n\n// Default timeout for popup windows and iframes in milliseconds\nexport const DEFAULT_POPUP_TIMEOUT_MS = 60000;\nexport const DEFAULT_IFRAME_TIMEOUT_MS = 6000;\nexport const DEFAULT_REDIRECT_TIMEOUT_MS = 30000;\n\n/**\n * Use this to configure the auth options in the Configuration object\n *\n * - clientId - Client ID of your app registered with our Application registration portal : https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview in Microsoft Identity Platform\n * - authority - You can configure a specific authority, defaults to \" \" or \"https://login.microsoftonline.com/common\"\n * - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios.\n * - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios.\n * - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.\n * - postLogoutRedirectUri - The redirect URI where the window navigates after a successful logout.\n * - navigateToLoginRequestUrl - Boolean indicating whether to navigate to the original request URL after the auth server navigates to the redirect URL.\n * - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.\n * - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.\n */\nexport type BrowserAuthOptions = {\n clientId: string;\n authority?: string;\n knownAuthorities?: Array<string>;\n cloudDiscoveryMetadata?: string;\n authorityMetadata?: string;\n redirectUri?: string;\n postLogoutRedirectUri?: string | null;\n navigateToLoginRequestUrl?: boolean;\n clientCapabilities?: Array<string>;\n protocolMode?: ProtocolMode;\n azureCloudOptions?: AzureCloudOptions;\n};\n\n/**\n * Use this to configure the below cache configuration options:\n *\n * - cacheLocation - Used to specify the cacheLocation user wants to set. Valid values are \"localStorage\" and \"sessionStorage\"\n * - storeAuthStateInCookie - If set, MSAL stores the auth request state required for validation of the auth flows in the browser cookies. By default this flag is set to false.\n * - secureCookies - If set, MSAL sets the \"Secure\" flag on cookies so they can only be sent over HTTPS. By default this flag is set to false.\n */\nexport type CacheOptions = {\n cacheLocation?: BrowserCacheLocation | string;\n storeAuthStateInCookie?: boolean;\n secureCookies?: boolean;\n};\n\n/**\n * Library Specific Options\n *\n * - tokenRenewalOffsetSeconds - Sets the window of offset needed to renew the token before expiry\n * - loggerOptions - Used to initialize the Logger object (See ClientConfiguration.ts)\n * - networkClient - Network interface implementation\n * - windowHashTimeout - Sets the timeout for waiting for a response hash in a popup. Will take precedence over loadFrameTimeout if both are set.\n * - iframeHashTimeout - Sets the timeout for waiting for a response hash in an iframe. Will take precedence over loadFrameTimeout if both are set.\n * - loadFrameTimeout - Sets the timeout for waiting for a response hash in an iframe or popup\n * - navigateFrameWait - Maximum time the library should wait for a frame to load\n * - redirectNavigationTimeout - Time to wait for redirection to occur before resolving promise\n * - asyncPopups - Sets whether popups are opened asynchronously. By default, this flag is set to false. When set to false, blank popups are opened before anything else happens. When set to true, popups are opened when making the network request.\n * - allowRedirectInIframe - Flag to enable redirect opertaions when the app is rendered in an iframe (to support scenarios such as embedded B2C login).\n */\nexport type BrowserSystemOptions = SystemOptions & {\n loggerOptions?: LoggerOptions;\n networkClient?: INetworkModule;\n navigationClient?: INavigationClient;\n windowHashTimeout?: number;\n iframeHashTimeout?: number;\n loadFrameTimeout?: number;\n navigateFrameWait?: number;\n redirectNavigationTimeout?: number;\n asyncPopups?: boolean;\n allowRedirectInIframe?: boolean;\n};\n\n/**\n * Use the configuration object to configure MSAL and initialize the UserAgentApplication.\n *\n * This object allows you to configure important elements of MSAL functionality:\n * - auth: this is where you configure auth elements like clientID, authority used for authenticating against the Microsoft Identity Platform\n * - cache: this is where you configure cache location and whether to store cache in cookies\n * - system: this is where you can configure the network client, logger, token renewal offset\n */\nexport type Configuration = {\n auth: BrowserAuthOptions,\n cache?: CacheOptions,\n system?: BrowserSystemOptions\n};\n\nexport type BrowserConfiguration = {\n auth: Required<BrowserAuthOptions>,\n cache: Required<CacheOptions>,\n system: Required<BrowserSystemOptions>\n};\n\n/**\n * MSAL function that sets the default options when not explicitly configured from app developer\n *\n * @param auth\n * @param cache\n * @param system\n *\n * @returns Configuration object\n */\nexport function buildConfiguration({ auth: userInputAuth, cache: userInputCache, system: userInputSystem }: Configuration, isBrowserEnvironment: boolean): BrowserConfiguration {\n\n // Default auth options for browser\n const DEFAULT_AUTH_OPTIONS: Required<BrowserAuthOptions> = {\n clientId: \"\",\n authority: `${Constants.DEFAULT_AUTHORITY}`,\n knownAuthorities: [],\n cloudDiscoveryMetadata: \"\",\n authorityMetadata: \"\",\n redirectUri: \"\",\n postLogoutRedirectUri: \"\",\n navigateToLoginRequestUrl: true,\n clientCapabilities: [],\n protocolMode: ProtocolMode.AAD,\n azureCloudOptions: {\n azureCloudInstance: AzureCloudInstance.None,\n tenant: \"\"\n },\n };\n\n // Default cache options for browser\n const DEFAULT_CACHE_OPTIONS: Required<CacheOptions> = {\n cacheLocation: BrowserCacheLocation.SessionStorage,\n storeAuthStateInCookie: false,\n secureCookies: false\n };\n\n // Default logger options for browser\n const DEFAULT_LOGGER_OPTIONS: LoggerOptions = {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n loggerCallback: (): void => {},\n logLevel: LogLevel.Info,\n piiLoggingEnabled: false\n };\n\n // Default system options for browser\n const DEFAULT_BROWSER_SYSTEM_OPTIONS: Required<BrowserSystemOptions> = {\n ...DEFAULT_SYSTEM_OPTIONS,\n loggerOptions: DEFAULT_LOGGER_OPTIONS,\n networkClient: isBrowserEnvironment ? BrowserUtils.getBrowserNetworkClient() : StubbedNetworkModule,\n navigationClient: new NavigationClient(),\n loadFrameTimeout: 0,\n // If loadFrameTimeout is provided, use that as default.\n windowHashTimeout: (userInputSystem && userInputSystem.loadFrameTimeout) || DEFAULT_POPUP_TIMEOUT_MS,\n iframeHashTimeout: (userInputSystem && userInputSystem.loadFrameTimeout) || DEFAULT_IFRAME_TIMEOUT_MS,\n navigateFrameWait: isBrowserEnvironment && BrowserUtils.detectIEOrEdge() ? 500 : 0,\n redirectNavigationTimeout: DEFAULT_REDIRECT_TIMEOUT_MS,\n asyncPopups: false,\n allowRedirectInIframe: false\n };\n\n const overlayedConfig: BrowserConfiguration = {\n auth: { ...DEFAULT_AUTH_OPTIONS, ...userInputAuth },\n cache: { ...DEFAULT_CACHE_OPTIONS, ...userInputCache },\n system: { ...DEFAULT_BROWSER_SYSTEM_OPTIONS, ...userInputSystem }\n };\n return overlayedConfig;\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;AAWA;IACa,wBAAwB,GAAG,MAAM;IACjC,yBAAyB,GAAG,KAAK;IACjC,2BAA2B,GAAG,MAAM;AAyFjD;;;;;;;;;SASgB,kBAAkB,CAAC,EAAsF,EAAE,oBAA6B;QAA7G,aAAa,UAAA,EAAS,cAAc,WAAA,EAAU,eAAe,YAAA;;IAGpG,IAAM,oBAAoB,GAAiC;QACvD,QAA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oB,GAAK,aAAa,CAAE;QACnD,KAAK,wBAAO,qBAAqB,GAAK,cAAc,CAAE;QACtD,MAAM,wBAAO,8BAA8B,GAAK,eAAe,CAAE;KACpE,CAAC;IACF,OAAO,eAAe,CAAC;AAC3B;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BrowserStringUtils } from '../utils/BrowserStringUtils.js';
@@ -67,5 +67,10 @@ export declare class CryptoOps implements ICrypto {
67
67
  * @param kid
68
68
  */
69
69
  signJwt(payload: SignedHttpRequest, kid: string): Promise<string>;
70
+ /**
71
+ * Returns the SHA-256 hash of an input string
72
+ * @param plainText
73
+ */
74
+ hashString(plainText: string): Promise<string>;
70
75
  }
71
76
  //# sourceMappingURL=CryptoOps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CryptoOps.d.ts","sourceRoot":"","sources":["../../src/crypto/CryptoOps.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAShH,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,oBAAY,aAAa,GAAG;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC;AAEF;;GAEG;AACH,oBAAY,cAAc,GAAG;IACzB,cAAc,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAClD,aAAa,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;CAChD,CAAC;AAEF;;;GAGG;AACH,qBAAa,SAAU,YAAW,OAAO;IAErC,OAAO,CAAC,aAAa,CA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1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { GuidGenerator } from './GuidGenerator.js';
@@ -70,7 +70,7 @@ var CryptoOps = /** @class */ (function () {
70
70
  */
71
71
  CryptoOps.prototype.getPublicKeyThumbprint = function (request) {
72
72
  return __awaiter(this, void 0, void 0, function () {
73
- var keyPair, publicKeyJwk, pubKeyThumprintObj, publicJwkString, publicJwkBuffer, publicJwkHash, privateKeyJwk, unextractablePrivateKey;
73
+ var keyPair, publicKeyJwk, pubKeyThumprintObj, publicJwkString, publicJwkHash, privateKeyJwk, unextractablePrivateKey;
74
74
  return __generator(this, function (_a) {
75
75
  switch (_a.label) {
76
76
  case 0: return [4 /*yield*/, this.browserCrypto.generateKeyPair(CryptoOps.EXTRACTABLE, CryptoOps.POP_KEY_USAGES)];
@@ -85,10 +85,9 @@ var CryptoOps = /** @class */ (function () {
85
85
  n: publicKeyJwk.n
86
86
  };
87
87
  publicJwkString = BrowserCrypto.getJwkString(pubKeyThumprintObj);
88
- return [4 /*yield*/, this.browserCrypto.sha256Digest(publicJwkString)];
88
+ return [4 /*yield*/, this.hashString(publicJwkString)];
89
89
  case 3:
90
- publicJwkBuffer = _a.sent();
91
- publicJwkHash = this.b64Encode.urlEncodeArr(new Uint8Array(publicJwkBuffer));
90
+ publicJwkHash = _a.sent();
92
91
  return [4 /*yield*/, this.browserCrypto.exportJwk(keyPair.privateKey)];
93
92
  case 4:
94
93
  privateKeyJwk = _a.sent();
@@ -195,6 +194,24 @@ var CryptoOps = /** @class */ (function () {
195
194
  });
196
195
  });
197
196
  };
197
+ /**
198
+ * Returns the SHA-256 hash of an input string
199
+ * @param plainText
200
+ */
201
+ CryptoOps.prototype.hashString = function (plainText) {
202
+ return __awaiter(this, void 0, void 0, function () {
203
+ var hashBuffer, hashBytes;
204
+ return __generator(this, function (_a) {
205
+ switch (_a.label) {
206
+ case 0: return [4 /*yield*/, this.browserCrypto.sha256Digest(plainText)];
207
+ case 1:
208
+ hashBuffer = _a.sent();
209
+ hashBytes = new Uint8Array(hashBuffer);
210
+ return [2 /*return*/, this.b64Encode.urlEncodeArr(hashBytes)];
211
+ }
212
+ });
213
+ });
214
+ };
198
215
  CryptoOps.POP_KEY_USAGES = ["sign", "verify"];
199
216
  CryptoOps.EXTRACTABLE = true;
200
217
  return CryptoOps;
@@ -1 +1 @@
1
- {"version":3,"file":"CryptoOps.js","sources":["../../src/crypto/CryptoOps.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICrypto, Logger, PkceCodes, SignedHttpRequest, SignedHttpRequestParameters } from \"@azure/msal-common\";\nimport { GuidGenerator } from \"./GuidGenerator\";\nimport { Base64Encode } from \"../encode/Base64Encode\";\nimport { Base64Decode } from \"../encode/Base64Decode\";\nimport { PkceGenerator } from \"./PkceGenerator\";\nimport { BrowserCrypto } from \"./BrowserCrypto\";\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\nimport { KEY_FORMAT_JWK } from \"../utils/BrowserConstants\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { AsyncMemoryStorage } from \"../cache/AsyncMemoryStorage\";\n\nexport type CachedKeyPair = {\n publicKey: CryptoKey,\n privateKey: CryptoKey,\n requestMethod?: string,\n requestUri?: string\n};\n\n/**\n * MSAL CryptoKeyStore DB Version 2\n */\nexport type CryptoKeyStore = {\n asymmetricKeys: AsyncMemoryStorage<CachedKeyPair>;\n symmetricKeys: AsyncMemoryStorage<CryptoKey>;\n};\n\n/**\n * This class implements MSAL's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and \n * implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636).\n */\nexport class CryptoOps implements ICrypto {\n\n private browserCrypto: BrowserCrypto;\n private guidGenerator: GuidGenerator;\n private b64Encode: Base64Encode;\n private b64Decode: Base64Decode;\n private pkceGenerator: PkceGenerator;\n private logger: Logger;\n\n private static POP_KEY_USAGES: Array<KeyUsage> = [\"sign\", \"verify\"];\n private static EXTRACTABLE: boolean = true;\n private cache: CryptoKeyStore;\n\n constructor(logger: Logger) {\n this.logger = logger;\n // Browser crypto needs to be validated first before any other classes can be set.\n this.browserCrypto = new BrowserCrypto(this.logger);\n this.b64Encode = new Base64Encode();\n this.b64Decode = new Base64Decode();\n this.guidGenerator = new GuidGenerator(this.browserCrypto);\n this.pkceGenerator = new PkceGenerator(this.browserCrypto);\n this.cache = {\n asymmetricKeys: new AsyncMemoryStorage<CachedKeyPair>(this.logger),\n symmetricKeys: new AsyncMemoryStorage<CryptoKey>(this.logger)\n };\n }\n\n /**\n * Creates a new random GUID - used to populate state and nonce.\n * @returns string (GUID)\n */\n createNewGuid(): string {\n return this.guidGenerator.generateGuid();\n }\n\n /**\n * Encodes input string to base64.\n * @param input \n */\n base64Encode(input: string): string {\n return this.b64Encode.encode(input);\n } \n \n /**\n * Decodes input string from base64.\n * @param input \n */\n base64Decode(input: string): string {\n return this.b64Decode.decode(input);\n }\n\n /**\n * Generates PKCE codes used in Authorization Code Flow.\n */\n async generatePkceCodes(): Promise<PkceCodes> {\n return this.pkceGenerator.generateCodes();\n }\n\n /**\n * Generates a keypair, stores it and returns a thumbprint\n * @param request\n */\n async getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise<string> {\n // Generate Keypair\n const keyPair: CryptoKeyPair = await this.browserCrypto.generateKeyPair(CryptoOps.EXTRACTABLE, CryptoOps.POP_KEY_USAGES);\n\n // Generate Thumbprint for Public Key\n const publicKeyJwk: JsonWebKey = await this.browserCrypto.exportJwk(keyPair.publicKey);\n \n const pubKeyThumprintObj: JsonWebKey = {\n e: publicKeyJwk.e,\n kty: publicKeyJwk.kty,\n n: publicKeyJwk.n\n };\n\n const publicJwkString: string = BrowserCrypto.getJwkString(pubKeyThumprintObj);\n const publicJwkBuffer: ArrayBuffer = await this.browserCrypto.sha256Digest(publicJwkString);\n const publicJwkHash: string = this.b64Encode.urlEncodeArr(new Uint8Array(publicJwkBuffer));\n\n // Generate Thumbprint for Private Key\n const privateKeyJwk: JsonWebKey = await this.browserCrypto.exportJwk(keyPair.privateKey);\n // Re-import private key to make it unextractable\n const unextractablePrivateKey: CryptoKey = await this.browserCrypto.importJwk(privateKeyJwk, false, [\"sign\"]);\n\n // Store Keypair data in keystore\n await this.cache.asymmetricKeys.setItem(\n publicJwkHash, \n {\n privateKey: unextractablePrivateKey,\n publicKey: keyPair.publicKey,\n requestMethod: request.resourceRequestMethod,\n requestUri: request.resourceRequestUri\n }\n );\n\n return publicJwkHash;\n }\n\n /**\n * Removes cryptographic keypair from key store matching the keyId passed in\n * @param kid \n */\n async removeTokenBindingKey(kid: string): Promise<boolean> {\n await this.cache.asymmetricKeys.removeItem(kid);\n const keyFound = await this.cache.asymmetricKeys.containsKey(kid);\n return !keyFound;\n }\n\n /**\n * Removes all cryptographic keys from IndexedDB storage\n */\n async clearKeystore(): Promise<boolean> {\n const dataStoreNames = Object.keys(this.cache);\n const databaseStorage = this.cache[dataStoreNames[0]];\n return databaseStorage ? await databaseStorage.deleteDatabase() : false;\n }\n\n /**\n * Signs the given object as a jwt payload with private key retrieved by given kid.\n * @param payload \n * @param kid \n */\n async signJwt(payload: SignedHttpRequest, kid: string): Promise<string> {\n const cachedKeyPair = await this.cache.asymmetricKeys.getItem(kid);\n \n if (!cachedKeyPair) {\n throw BrowserAuthError.createSigningKeyNotFoundInStorageError(kid);\n }\n\n // Get public key as JWK\n const publicKeyJwk = await this.browserCrypto.exportJwk(cachedKeyPair.publicKey);\n const publicKeyJwkString = BrowserCrypto.getJwkString(publicKeyJwk);\n\n // Generate header\n const header = {\n alg: publicKeyJwk.alg,\n type: KEY_FORMAT_JWK\n };\n const encodedHeader = this.b64Encode.urlEncode(JSON.stringify(header));\n\n // Generate payload\n payload.cnf = {\n jwk: JSON.parse(publicKeyJwkString)\n };\n const encodedPayload = this.b64Encode.urlEncode(JSON.stringify(payload));\n\n // Form token string\n const tokenString = `${encodedHeader}.${encodedPayload}`;\n\n // Sign token\n const tokenBuffer = BrowserStringUtils.stringToArrayBuffer(tokenString);\n const signatureBuffer = await this.browserCrypto.sign(cachedKeyPair.privateKey, tokenBuffer);\n const encodedSignature = this.b64Encode.urlEncodeArr(new Uint8Array(signatureBuffer));\n\n return `${tokenString}.${encodedSignature}`;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;AA+BA;;;;;IAiBI,mBAAY,MAAc;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;QAErB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,SAAS,GAAG,IAAI,YAAY,EAAE,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,YAAY,EAAE,CAAC;QACpC,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3D,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3D,IAAI,CAAC,KAAK,GAAG;YACT,cAAc,EAAE,IAAI,kBAAkB,CAAgB,IAAI,CAAC,MAAM,CAAC;YAClE,aAAa,EAAE,IAAI,kBAAkB,CAAY,IAAI,CAAC,MAAM,CAAC;SAChE,CAAC;KACL;;;;;IAMD,iCAAa,GAAb;QACI,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;KAC5C;;;;;IAMD,gCAAY,GAAZ,UAAa,KAAa;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;KACvC;;;;;IAMD,gCAAY,GAAZ,UAAa,KAAa;QACtB,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM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M,GAAG;4BACX,GAAG,EAAE,YAAY,CAAC,GAAG;4BACrB,IAAI,EAAE,cAAc;yBACvB,CAAC;wBACI,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;;wBAGvE,OAAO,CAAC,GAAG,GAAG;4BACV,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC;yBACtC,CAAC;wBACI,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;wBAGnE,WAAW,GAAM,aAAa,SAAI,cAAgB,CAAC;wBAGnD,WAAW,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC;wBAChD,qBAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,WAAW,CAAC,EAAA;;wBAAtF,eAAe,GAAG,SAAoE;wBACtF,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC;wBAEtF,sBAAU,WAAW,SAAI,gBAAkB,EAAC;;;;KAC/C;IAlJc,wBAAc,GAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACrD,qBAAW,GAAY,IAAI,CAAC;IAkJ/C,gBAAC;CA5JD;;;;"}
1
+ {"version":3,"file":"CryptoOps.js","sources":["../../src/crypto/CryptoOps.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICrypto, Logger, PkceCodes, SignedHttpRequest, SignedHttpRequestParameters } from \"@azure/msal-common\";\nimport { GuidGenerator } from \"./GuidGenerator\";\nimport { Base64Encode } from \"../encode/Base64Encode\";\nimport { Base64Decode } from \"../encode/Base64Decode\";\nimport { PkceGenerator } from \"./PkceGenerator\";\nimport { BrowserCrypto } from \"./BrowserCrypto\";\nimport { BrowserStringUtils } from \"../utils/BrowserStringUtils\";\nimport { KEY_FORMAT_JWK } from \"../utils/BrowserConstants\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { AsyncMemoryStorage } from \"../cache/AsyncMemoryStorage\";\n\nexport type CachedKeyPair = {\n publicKey: CryptoKey,\n privateKey: CryptoKey,\n requestMethod?: string,\n requestUri?: string\n};\n\n/**\n * MSAL CryptoKeyStore DB Version 2\n */\nexport type CryptoKeyStore = {\n asymmetricKeys: AsyncMemoryStorage<CachedKeyPair>;\n symmetricKeys: AsyncMemoryStorage<CryptoKey>;\n};\n\n/**\n * This class implements MSAL's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and \n * implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636).\n */\nexport class CryptoOps implements ICrypto {\n\n private browserCrypto: BrowserCrypto;\n private guidGenerator: GuidGenerator;\n private b64Encode: Base64Encode;\n private b64Decode: Base64Decode;\n private pkceGenerator: PkceGenerator;\n private logger: Logger;\n\n private static POP_KEY_USAGES: Array<KeyUsage> = [\"sign\", \"verify\"];\n private static EXTRACTABLE: boolean = true;\n private cache: CryptoKeyStore;\n\n constructor(logger: Logger) {\n this.logger = logger;\n // Browser crypto needs to be validated first before any other classes can be set.\n this.browserCrypto = new BrowserCrypto(this.logger);\n this.b64Encode = new Base64Encode();\n this.b64Decode = new Base64Decode();\n this.guidGenerator = new GuidGenerator(this.browserCrypto);\n this.pkceGenerator = new PkceGenerator(this.browserCrypto);\n this.cache = {\n asymmetricKeys: new AsyncMemoryStorage<CachedKeyPair>(this.logger),\n symmetricKeys: new AsyncMemoryStorage<CryptoKey>(this.logger)\n };\n }\n\n /**\n * Creates a new random GUID - used to populate state and nonce.\n * @returns string (GUID)\n */\n createNewGuid(): string {\n return this.guidGenerator.generateGuid();\n }\n\n /**\n * Encodes input string to base64.\n * @param input \n */\n base64Encode(input: string): string {\n return this.b64Encode.encode(input);\n } \n \n /**\n * Decodes input string from base64.\n * @param input \n */\n base64Decode(input: string): string {\n return this.b64Decode.decode(input);\n }\n\n /**\n * Generates PKCE codes used in Authorization Code Flow.\n */\n async generatePkceCodes(): Promise<PkceCodes> {\n return this.pkceGenerator.generateCodes();\n }\n\n /**\n * Generates a keypair, stores it and returns a thumbprint\n * @param request\n */\n async getPublicKeyThumbprint(request: SignedHttpRequestParameters): Promise<string> {\n // Generate Keypair\n const keyPair: CryptoKeyPair = await this.browserCrypto.generateKeyPair(CryptoOps.EXTRACTABLE, CryptoOps.POP_KEY_USAGES);\n\n // Generate Thumbprint for Public Key\n const publicKeyJwk: JsonWebKey = await this.browserCrypto.exportJwk(keyPair.publicKey);\n \n const pubKeyThumprintObj: JsonWebKey = {\n e: publicKeyJwk.e,\n kty: publicKeyJwk.kty,\n n: publicKeyJwk.n\n };\n\n const publicJwkString: string = BrowserCrypto.getJwkString(pubKeyThumprintObj);\n const publicJwkHash = await this.hashString(publicJwkString);\n\n // Generate Thumbprint for Private Key\n const privateKeyJwk: JsonWebKey = await this.browserCrypto.exportJwk(keyPair.privateKey);\n // Re-import private key to make it unextractable\n const unextractablePrivateKey: CryptoKey = await this.browserCrypto.importJwk(privateKeyJwk, false, [\"sign\"]);\n\n // Store Keypair data in keystore\n await this.cache.asymmetricKeys.setItem(\n publicJwkHash, \n {\n privateKey: unextractablePrivateKey,\n publicKey: keyPair.publicKey,\n requestMethod: request.resourceRequestMethod,\n requestUri: request.resourceRequestUri\n }\n );\n\n return publicJwkHash;\n }\n\n /**\n * Removes cryptographic keypair from key store matching the keyId passed in\n * @param kid \n */\n async removeTokenBindingKey(kid: string): Promise<boolean> {\n await this.cache.asymmetricKeys.removeItem(kid);\n const keyFound = await this.cache.asymmetricKeys.containsKey(kid);\n return !keyFound;\n }\n\n /**\n * Removes all cryptographic keys from IndexedDB storage\n */\n async clearKeystore(): Promise<boolean> {\n const dataStoreNames = Object.keys(this.cache);\n const databaseStorage = this.cache[dataStoreNames[0]];\n return databaseStorage ? await databaseStorage.deleteDatabase() : false;\n }\n\n /**\n * Signs the given object as a jwt payload with private key retrieved by given kid.\n * @param payload \n * @param kid \n */\n async signJwt(payload: SignedHttpRequest, kid: string): Promise<string> {\n const cachedKeyPair = await this.cache.asymmetricKeys.getItem(kid);\n \n if (!cachedKeyPair) {\n throw BrowserAuthError.createSigningKeyNotFoundInStorageError(kid);\n }\n\n // Get public key as JWK\n const publicKeyJwk = await this.browserCrypto.exportJwk(cachedKeyPair.publicKey);\n const publicKeyJwkString = BrowserCrypto.getJwkString(publicKeyJwk);\n\n // Generate header\n const header = {\n alg: publicKeyJwk.alg,\n type: KEY_FORMAT_JWK\n };\n const encodedHeader = this.b64Encode.urlEncode(JSON.stringify(header));\n\n // Generate payload\n payload.cnf = {\n jwk: JSON.parse(publicKeyJwkString)\n };\n const encodedPayload = this.b64Encode.urlEncode(JSON.stringify(payload));\n\n // Form token string\n const tokenString = `${encodedHeader}.${encodedPayload}`;\n\n // Sign token\n const tokenBuffer = BrowserStringUtils.stringToArrayBuffer(tokenString);\n const signatureBuffer = await this.browserCrypto.sign(cachedKeyPair.privateKey, tokenBuffer);\n const encodedSignature = this.b64Encode.urlEncodeArr(new Uint8Array(signatureBuffer));\n\n return `${tokenString}.${encodedSignature}`;\n }\n\n /**\n * Returns the SHA-256 hash of an input string\n * @param plainText\n */\n async hashString(plainText: string): Promise<string> {\n const hashBuffer: ArrayBuffer = await this.browserCrypto.sha256Digest(plainText);\n const hashBytes = new Uint8Array(hashBuffer);\n return this.b64Encode.urlEncodeArr(hashBytes);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;AA+BA;;;;;IAiBI,mBAAY,MAAc;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;QAErB,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,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AI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC;wBAEtF,sBAAU,WAAW,SAAI,gBAAkB,EAAC;;;;KAC/C;;;;;IAMK,8BAAU,GAAhB,UAAiB,SAAiB;;;;;4BACE,qBAAM,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,SAAS,CAAC,EAAA;;wBAA1E,UAAU,GAAgB,SAAgD;wBAC1E,SAAS,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC;wBAC7C,sBAAO,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,CAAC,EAAC;;;;KACjD;IA3Jc,wBAAc,GAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACrD,qBAAW,GAAY,IAAI,CAAC;IA2J/C,gBAAC;CArKD;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  import { MathUtils } from '../utils/MathUtils.js';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BrowserAuthError } from '../error/BrowserAuthError.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { CryptoOps } from './CryptoOps.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  import { BrowserStringUtils } from '../utils/BrowserStringUtils.js';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  import { BrowserStringUtils } from '../utils/BrowserStringUtils.js';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { StringUtils, AuthError } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { AuthError } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  import { AccountEntity, CacheManager } from '@azure/msal-common';
4
4
  import { EventType } from './EventType.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  import { EventType } from './EventType.js';
4
4
  import { InteractionType, InteractionStatus } from '../utils/BrowserConstants.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.20.0 2021-12-07 */
1
+ /*! @azure/msal-browser v2.22.1 2022-03-07 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.