@azure/msal-browser 2.31.0 → 2.32.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 (70) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_tslib.js +1 -1
  3. package/dist/app/ClientApplication.js +1 -1
  4. package/dist/app/IPublicClientApplication.js +1 -1
  5. package/dist/app/PublicClientApplication.js +1 -1
  6. package/dist/broker/nativeBroker/NativeMessageHandler.js +1 -1
  7. package/dist/cache/AsyncMemoryStorage.js +1 -1
  8. package/dist/cache/BrowserCacheManager.js +1 -1
  9. package/dist/cache/BrowserStorage.js +1 -1
  10. package/dist/cache/CryptoKeyStore.js +1 -1
  11. package/dist/cache/DatabaseStorage.js +1 -1
  12. package/dist/cache/MemoryStorage.js +1 -1
  13. package/dist/cache/TokenCache.js +2 -2
  14. package/dist/cache/TokenCache.js.map +1 -1
  15. package/dist/config/Configuration.js +1 -1
  16. package/dist/crypto/BrowserCrypto.js +1 -1
  17. package/dist/crypto/CryptoOps.js +1 -1
  18. package/dist/crypto/GuidGenerator.js +1 -1
  19. package/dist/crypto/ModernBrowserCrypto.js +1 -1
  20. package/dist/crypto/MsBrowserCrypto.js +1 -1
  21. package/dist/crypto/MsrBrowserCrypto.js +1 -1
  22. package/dist/crypto/PkceGenerator.js +1 -1
  23. package/dist/crypto/SignedHttpRequest.js +1 -1
  24. package/dist/encode/Base64Decode.js +1 -1
  25. package/dist/encode/Base64Encode.js +1 -1
  26. package/dist/error/BrowserAuthError.js +1 -1
  27. package/dist/error/BrowserConfigurationAuthError.js +1 -1
  28. package/dist/error/NativeAuthError.js +1 -1
  29. package/dist/event/EventHandler.js +1 -1
  30. package/dist/event/EventMessage.js +1 -1
  31. package/dist/event/EventType.js +1 -1
  32. package/dist/index.cjs.js +104 -79
  33. package/dist/index.cjs.js.map +1 -1
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/interaction_client/BaseInteractionClient.js +3 -3
  38. package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
  39. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
  40. package/dist/interaction_client/NativeInteractionClient.js +1 -1
  41. package/dist/interaction_client/PopupClient.js +1 -1
  42. package/dist/interaction_client/RedirectClient.js +1 -1
  43. package/dist/interaction_client/SilentAuthCodeClient.js +1 -1
  44. package/dist/interaction_client/SilentCacheClient.js +1 -1
  45. package/dist/interaction_client/SilentIframeClient.js +1 -1
  46. package/dist/interaction_client/SilentRefreshClient.js +1 -1
  47. package/dist/interaction_client/StandardInteractionClient.js +2 -2
  48. package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
  49. package/dist/interaction_handler/InteractionHandler.js +2 -2
  50. package/dist/interaction_handler/InteractionHandler.js.map +1 -1
  51. package/dist/interaction_handler/RedirectHandler.js +1 -1
  52. package/dist/interaction_handler/SilentHandler.js +1 -1
  53. package/dist/internals.js +1 -1
  54. package/dist/navigation/NavigationClient.js +1 -1
  55. package/dist/network/FetchClient.js +1 -1
  56. package/dist/network/XhrClient.js +1 -1
  57. package/dist/packageMetadata.d.ts +1 -1
  58. package/dist/packageMetadata.js +2 -2
  59. package/dist/packageMetadata.js.map +1 -1
  60. package/dist/telemetry/BrowserPerformanceClient.js +1 -1
  61. package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
  62. package/dist/utils/BrowserConstants.js +1 -1
  63. package/dist/utils/BrowserProtocolUtils.js +1 -1
  64. package/dist/utils/BrowserStringUtils.js +1 -1
  65. package/dist/utils/BrowserUtils.js +1 -1
  66. package/dist/utils/MathUtils.js +1 -1
  67. package/lib/msal-browser.js +104 -79
  68. package/lib/msal-browser.js.map +1 -1
  69. package/lib/msal-browser.min.js +33 -33
  70. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -30,6 +30,7 @@ export { LoadTokenOptions } from "./cache/TokenCache";
30
30
  export { EventMessage, EventPayload, EventError, EventCallbackFunction, EventMessageUtils, PopupEvent } from "./event/EventMessage";
31
31
  export { EventType } from "./event/EventType";
32
32
  export { SignedHttpRequest, SignedHttpRequestOptions } from "./crypto/SignedHttpRequest";
33
+ export { PopupWindowAttributes } from "./request/PopupWindowAttributes";
33
34
  export { AuthenticationScheme, AccountInfo, AccountEntity, AuthenticationResult, AuthError, AuthErrorMessage, ClientAuthError, ClientAuthErrorMessage, ClientConfigurationError, ClientConfigurationErrorMessage, InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, ServerError, INetworkModule, NetworkResponse, NetworkRequestOptions, ILoggerCallback, Logger, LogLevel, ProtocolMode, ExternalTokenResponse, StringUtils, UrlString, AzureCloudInstance, AzureCloudOptions, AuthenticationHeaderParser, OIDC_DEFAULT_SCOPES, PerformanceCallbackFunction, PerformanceEvent, PerformanceEvents } from "@azure/msal-common";
34
35
  export { version } from "./packageMetadata";
35
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;GAGG;AACH,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,YAAY,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAChK,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,UAAU,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC1I,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,6BAA6B,EAAE,oCAAoC,EAAE,M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*/
2
2
  'use strict';
3
3
  import * as internals from './internals.js';
4
4
  export { internals };
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator, __spread, __assign } from '../_virtual/_tslib.js';
4
4
  import { AccountEntity, AuthenticationScheme, ClientConfigurationError, StringUtils, UrlString, ServerTelemetryManager, AuthorityFactory } from '@azure/msal-common';
@@ -161,11 +161,11 @@ var BaseInteractionClient = /** @class */ (function () {
161
161
  };
162
162
  if (!requestAuthority) return [3 /*break*/, 2];
163
163
  this.logger.verbose("Creating discovered authority with request authority");
164
- return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(requestAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions)];
164
+ return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(requestAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger)];
165
165
  case 1: return [2 /*return*/, _a.sent()];
166
166
  case 2:
167
167
  this.logger.verbose("Creating discovered authority with configured authority");
168
- return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(this.config.auth.authority, this.config.system.networkClient, this.browserStorage, authorityOptions)];
168
+ return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(this.config.auth.authority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger)];
169
169
  case 3: return [2 /*return*/, _a.sent()];
170
170
  }
171
171
  });
@@ -1 +1 @@
1
- {"version":3,"file":"BaseInteractionClient.js","sources":["../../src/interaction_client/BaseInteractionClient.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICrypto, INetworkModule, Logger, AuthenticationResult, AccountInfo, AccountEntity, BaseAuthRequest, AuthenticationScheme, UrlString, ServerTelemetryManager, ServerTelemetryRequest, ClientConfigurationError, StringUtils, Authority, AuthorityOptions, AuthorityFactory, IPerformanceClient } from \"@azure/msal-common\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { EventHandler } from \"../event/EventHandler\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\nimport { version } from \"../packageMetadata\";\nimport { BrowserConstants } from \"../utils/BrowserConstants\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { NativeMessageHandler } from \"../broker/nativeBroker/NativeMessageHandler\";\n\nexport abstract class BaseInteractionClient {\n\n protected config: BrowserConfiguration;\n protected browserStorage: BrowserCacheManager;\n protected browserCrypto: ICrypto;\n protected networkClient: INetworkModule;\n protected logger: Logger;\n protected eventHandler: EventHandler;\n protected navigationClient: INavigationClient;\n protected nativeMessageHandler: NativeMessageHandler | undefined;\n protected correlationId: string;\n protected performanceClient: IPerformanceClient;\n\n constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, performanceClient: IPerformanceClient, nativeMessageHandler?: NativeMessageHandler, correlationId?: string) {\n this.config = config;\n this.browserStorage = storageImpl;\n this.browserCrypto = browserCrypto;\n this.networkClient = this.config.system.networkClient;\n this.eventHandler = eventHandler;\n this.navigationClient = navigationClient;\n this.nativeMessageHandler = nativeMessageHandler;\n this.correlationId = correlationId || this.browserCrypto.createNewGuid();\n this.logger = logger.clone(BrowserConstants.MSAL_SKU, version, this.correlationId);\n this.performanceClient = performanceClient;\n }\n\n abstract acquireToken(request: RedirectRequest|PopupRequest|SsoSilentRequest): Promise<AuthenticationResult|void>;\n\n abstract logout(request: EndSessionRequest): Promise<void>;\n\n protected async clearCacheOnLogout(account?: AccountInfo| null): Promise<void> {\n if (account) {\n if (AccountEntity.accountInfoIsEqual(account, this.browserStorage.getActiveAccount(), false)) {\n this.logger.verbose(\"Setting active account to null\");\n this.browserStorage.setActiveAccount(null);\n }\n // Clear given account.\n try {\n await this.browserStorage.removeAccount(AccountEntity.generateAccountCacheKey(account));\n this.logger.verbose(\"Cleared cache items belonging to the account provided in the logout request.\");\n } catch (error) {\n this.logger.error(\"Account provided in logout request was not found. Local cache unchanged.\");\n }\n } else {\n try {\n this.logger.verbose(\"No account provided in logout request, clearing all cache items.\", this.correlationId);\n // Clear all accounts and tokens\n await this.browserStorage.clear();\n // Clear any stray keys from IndexedDB\n await this.browserCrypto.clearKeystore();\n } catch(e) {\n this.logger.error(\"Attempted to clear all MSAL cache items and failed. Local cache unchanged.\");\n }\n }\n }\n\n /**\n * Initializer function for all request APIs\n * @param request\n */\n protected async initializeBaseRequest(request: Partial<BaseAuthRequest>): Promise<BaseAuthRequest> {\n this.logger.verbose(\"Initializing BaseAuthRequest\");\n const authority = request.authority || this.config.auth.authority;\n\n const scopes = [...((request && request.scopes) || [])];\n\n const validatedRequest: BaseAuthRequest = {\n ...request,\n correlationId: this.correlationId,\n authority,\n scopes\n };\n\n // Set authenticationScheme to BEARER if not explicitly set in the request\n if (!validatedRequest.authenticationScheme) {\n validatedRequest.authenticationScheme = AuthenticationScheme.BEARER;\n this.logger.verbose(\"Authentication Scheme wasn't explicitly set in request, defaulting to \\\"Bearer\\\" request\");\n } else {\n if (validatedRequest.authenticationScheme === AuthenticationScheme.SSH) {\n if (!request.sshJwk) {\n throw ClientConfigurationError.createMissingSshJwkError();\n }\n if(!request.sshKid) {\n throw ClientConfigurationError.createMissingSshKidError();\n }\n }\n this.logger.verbose(`Authentication Scheme set to \"${validatedRequest.authenticationScheme}\" as configured in Auth request`);\n }\n\n // Set requested claims hash if claims were requested\n if (request.claims && !StringUtils.isEmpty(request.claims)) {\n validatedRequest.requestedClaimsHash = await this.browserCrypto.hashString(request.claims);\n }\n\n return validatedRequest;\n }\n\n /**\n *\n * Use to get the redirect uri configured in MSAL or null.\n * @param requestRedirectUri\n * @returns Redirect URL\n *\n */\n getRedirectUri(requestRedirectUri?: string): string {\n this.logger.verbose(\"getRedirectUri called\");\n const redirectUri = requestRedirectUri || this.config.auth.redirectUri || BrowserUtils.getCurrentUri();\n return UrlString.getAbsoluteUrl(redirectUri, BrowserUtils.getCurrentUri());\n }\n\n /**\n *\n * @param apiId\n * @param correlationId\n * @param forceRefresh\n */\n protected initializeServerTelemetryManager(apiId: number, forceRefresh?: boolean): ServerTelemetryManager {\n this.logger.verbose(\"initializeServerTelemetryManager called\");\n const telemetryPayload: ServerTelemetryRequest = {\n clientId: this.config.auth.clientId,\n correlationId: this.correlationId,\n apiId: apiId,\n forceRefresh: forceRefresh || false,\n wrapperSKU: this.browserStorage.getWrapperMetadata()[0],\n wrapperVer: this.browserStorage.getWrapperMetadata()[1]\n };\n\n return new ServerTelemetryManager(telemetryPayload, this.browserStorage);\n }\n\n /**\n * Used to get a discovered version of the default authority.\n * @param requestAuthority\n * @param requestCorrelationId\n */\n protected async getDiscoveredAuthority(requestAuthority?: string): Promise<Authority> {\n this.logger.verbose(\"getDiscoveredAuthority called\");\n const authorityOptions: AuthorityOptions = {\n protocolMode: this.config.auth.protocolMode,\n knownAuthorities: this.config.auth.knownAuthorities,\n cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,\n authorityMetadata: this.config.auth.authorityMetadata\n };\n\n if (requestAuthority) {\n this.logger.verbose(\"Creating discovered authority with request authority\");\n return await AuthorityFactory.createDiscoveredInstance(requestAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions);\n }\n\n this.logger.verbose(\"Creating discovered authority with configured authority\");\n return await AuthorityFactory.createDiscoveredInstance(this.config.auth.authority, this.config.system.networkClient, this.browserStorage, authorityOptions);\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;IAgCI,+BAAY,MAA4B,EAAE,WAAgC,EAAE,aAAsB,EAAE,MAAc,EAAE,YAA0B,EAAE,gBAAmC,EAAE,iBAAq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AsB,GAAtC,UAAuC,gBAAyB;;;;;;wBAC5D,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC;wBAC/C,gBAAgB,GAAqB;4BACvC,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY;4BAC3C,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB;4BACnD,sBAAsB,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,sBAAsB;4BAC/D,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB;yBACxD,CAAC;6BAEE,gBAAgB,EAAhB,wBAAgB;wBAChB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,sDAAsD,CAAC,CAAC;wBACrE,qBAAM,gBAAgB,CAAC,wBAAwB,CAAC,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,EAAA;4BAAjJ,sBAAO,SAA0I,EAAC;;wBAGtJ,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,yDAAyD,CAAC,CAAC;wBACxE,qBAAM,gBAAgB,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,EAAA;4BAA3J,sBAAO,SAAoJ,EAAC;;;;KAC/J;IACL,4BAAC;AAAD,CAAC;;;;"}
1
+ {"version":3,"file":"BaseInteractionClient.js","sources":["../../src/interaction_client/BaseInteractionClient.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICrypto, INetworkModule, Logger, AuthenticationResult, AccountInfo, AccountEntity, BaseAuthRequest, AuthenticationScheme, UrlString, ServerTelemetryManager, ServerTelemetryRequest, ClientConfigurationError, StringUtils, Authority, AuthorityOptions, AuthorityFactory, IPerformanceClient } from \"@azure/msal-common\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { EventHandler } from \"../event/EventHandler\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\nimport { version } from \"../packageMetadata\";\nimport { BrowserConstants } from \"../utils/BrowserConstants\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { NativeMessageHandler } from \"../broker/nativeBroker/NativeMessageHandler\";\n\nexport abstract class BaseInteractionClient {\n\n protected config: BrowserConfiguration;\n protected browserStorage: BrowserCacheManager;\n protected browserCrypto: ICrypto;\n protected networkClient: INetworkModule;\n protected logger: Logger;\n protected eventHandler: EventHandler;\n protected navigationClient: INavigationClient;\n protected nativeMessageHandler: NativeMessageHandler | undefined;\n protected correlationId: string;\n protected performanceClient: IPerformanceClient;\n\n constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, performanceClient: IPerformanceClient, nativeMessageHandler?: NativeMessageHandler, correlationId?: string) {\n this.config = config;\n this.browserStorage = storageImpl;\n this.browserCrypto = browserCrypto;\n this.networkClient = this.config.system.networkClient;\n this.eventHandler = eventHandler;\n this.navigationClient = navigationClient;\n this.nativeMessageHandler = nativeMessageHandler;\n this.correlationId = correlationId || this.browserCrypto.createNewGuid();\n this.logger = logger.clone(BrowserConstants.MSAL_SKU, version, this.correlationId);\n this.performanceClient = performanceClient;\n }\n\n abstract acquireToken(request: RedirectRequest|PopupRequest|SsoSilentRequest): Promise<AuthenticationResult|void>;\n\n abstract logout(request: EndSessionRequest): Promise<void>;\n\n protected async clearCacheOnLogout(account?: AccountInfo| null): Promise<void> {\n if (account) {\n if (AccountEntity.accountInfoIsEqual(account, this.browserStorage.getActiveAccount(), false)) {\n this.logger.verbose(\"Setting active account to null\");\n this.browserStorage.setActiveAccount(null);\n }\n // Clear given account.\n try {\n await this.browserStorage.removeAccount(AccountEntity.generateAccountCacheKey(account));\n this.logger.verbose(\"Cleared cache items belonging to the account provided in the logout request.\");\n } catch (error) {\n this.logger.error(\"Account provided in logout request was not found. Local cache unchanged.\");\n }\n } else {\n try {\n this.logger.verbose(\"No account provided in logout request, clearing all cache items.\", this.correlationId);\n // Clear all accounts and tokens\n await this.browserStorage.clear();\n // Clear any stray keys from IndexedDB\n await this.browserCrypto.clearKeystore();\n } catch(e) {\n this.logger.error(\"Attempted to clear all MSAL cache items and failed. Local cache unchanged.\");\n }\n }\n }\n\n /**\n * Initializer function for all request APIs\n * @param request\n */\n protected async initializeBaseRequest(request: Partial<BaseAuthRequest>): Promise<BaseAuthRequest> {\n this.logger.verbose(\"Initializing BaseAuthRequest\");\n const authority = request.authority || this.config.auth.authority;\n\n const scopes = [...((request && request.scopes) || [])];\n\n const validatedRequest: BaseAuthRequest = {\n ...request,\n correlationId: this.correlationId,\n authority,\n scopes\n };\n\n // Set authenticationScheme to BEARER if not explicitly set in the request\n if (!validatedRequest.authenticationScheme) {\n validatedRequest.authenticationScheme = AuthenticationScheme.BEARER;\n this.logger.verbose(\"Authentication Scheme wasn't explicitly set in request, defaulting to \\\"Bearer\\\" request\");\n } else {\n if (validatedRequest.authenticationScheme === AuthenticationScheme.SSH) {\n if (!request.sshJwk) {\n throw ClientConfigurationError.createMissingSshJwkError();\n }\n if(!request.sshKid) {\n throw ClientConfigurationError.createMissingSshKidError();\n }\n }\n this.logger.verbose(`Authentication Scheme set to \"${validatedRequest.authenticationScheme}\" as configured in Auth request`);\n }\n\n // Set requested claims hash if claims were requested\n if (request.claims && !StringUtils.isEmpty(request.claims)) {\n validatedRequest.requestedClaimsHash = await this.browserCrypto.hashString(request.claims);\n }\n\n return validatedRequest;\n }\n\n /**\n *\n * Use to get the redirect uri configured in MSAL or null.\n * @param requestRedirectUri\n * @returns Redirect URL\n *\n */\n getRedirectUri(requestRedirectUri?: string): string {\n this.logger.verbose(\"getRedirectUri called\");\n const redirectUri = requestRedirectUri || this.config.auth.redirectUri || BrowserUtils.getCurrentUri();\n return UrlString.getAbsoluteUrl(redirectUri, BrowserUtils.getCurrentUri());\n }\n\n /**\n *\n * @param apiId\n * @param correlationId\n * @param forceRefresh\n */\n protected initializeServerTelemetryManager(apiId: number, forceRefresh?: boolean): ServerTelemetryManager {\n this.logger.verbose(\"initializeServerTelemetryManager called\");\n const telemetryPayload: ServerTelemetryRequest = {\n clientId: this.config.auth.clientId,\n correlationId: this.correlationId,\n apiId: apiId,\n forceRefresh: forceRefresh || false,\n wrapperSKU: this.browserStorage.getWrapperMetadata()[0],\n wrapperVer: this.browserStorage.getWrapperMetadata()[1]\n };\n\n return new ServerTelemetryManager(telemetryPayload, this.browserStorage);\n }\n\n /**\n * Used to get a discovered version of the default authority.\n * @param requestAuthority\n * @param requestCorrelationId\n */\n protected async getDiscoveredAuthority(requestAuthority?: string): Promise<Authority> {\n this.logger.verbose(\"getDiscoveredAuthority called\");\n const authorityOptions: AuthorityOptions = {\n protocolMode: this.config.auth.protocolMode,\n knownAuthorities: this.config.auth.knownAuthorities,\n cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,\n authorityMetadata: this.config.auth.authorityMetadata\n };\n\n if (requestAuthority) {\n this.logger.verbose(\"Creating discovered authority with request authority\");\n return await AuthorityFactory.createDiscoveredInstance(requestAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger);\n }\n\n this.logger.verbose(\"Creating discovered authority with configured authority\");\n return await AuthorityFactory.createDiscoveredInstance(this.config.auth.authority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger);\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;IAgCI,+B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
  'use strict';
3
3
  import { __extends } from '../_virtual/_tslib.js';
4
4
  import { AuthorizationCodeClient } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __rest, __assign } from '../_virtual/_tslib.js';
4
4
  import { PerformanceEvents, TimeUtils, ScopeSet, ClientAuthError, IdTokenEntity, Constants, AccessTokenEntity, AuthenticationScheme, PopTokenGenerator, AccountEntity, AuthorityType, AuthToken, UrlString, OIDC_DEFAULT_SCOPES, PromptValue } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { OIDC_DEFAULT_SCOPES, StringUtils, UrlString, Constants, AuthError, ThrottlingUtils, ProtocolUtils, PerformanceEvents } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { UrlString, AuthError, Constants, ThrottlingUtils, ProtocolUtils } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { AuthError, Constants } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { StandardInteractionClient } from './StandardInteractionClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { AuthError, Constants, PerformanceEvents, StringUtils, PromptValue, UrlString, ProtocolUtils } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { StandardInteractionClient } from './StandardInteractionClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
4
4
  import { UrlString, Constants, AuthorizationCodeClient, PerformanceEvents, Authority, AuthorityFactory, ResponseMode, StringUtils, ProtocolUtils } from '@azure/msal-common';
@@ -229,7 +229,7 @@ var StandardInteractionClient = /** @class */ (function (_super) {
229
229
  userAuthority = requestAuthority ? requestAuthority : this.config.auth.authority;
230
230
  builtAuthority = Authority.generateAuthority(userAuthority, requestAzureCloudOptions || this.config.auth.azureCloudOptions);
231
231
  this.logger.verbose("Creating discovered authority with configured authority", this.correlationId);
232
- return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions)
232
+ return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger)
233
233
  .then(function (result) {
234
234
  getAuthorityMeasurement.endMeasurement({
235
235
  success: true
@@ -1 +1 @@
1
- {"version":3,"file":"StandardInteractionClient.js","sources":["../../src/interaction_client/StandardInteractionClient.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ServerTelemetryManager, CommonAuthorizationCodeRequest, Constants, AuthorizationCodeClient, ClientConfiguration, AuthorityOptions, Authority, AuthorityFactory, ServerAuthorizationCodeResponse, UrlString, CommonEndSessionRequest, ProtocolUtils, ResponseMode, StringUtils, IdTokenClaims, AccountInfo, AzureCloudOptions, PerformanceEvents, AuthError } from \"@azure/msal-common\";\nimport { BaseInteractionClient } from \"./BaseInteractionClient\";\nimport { AuthorizationUrlRequest } from \"../request/AuthorizationUrlRequest\";\nimport { BrowserConstants, InteractionType } from \"../utils/BrowserConstants\";\nimport { version } from \"../packageMetadata\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { BrowserProtocolUtils, BrowserStateObject } from \"../utils/BrowserProtocolUtils\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\n\n/**\n * Defines the class structure and helper functions used by the \"standard\", non-brokered auth flows (popup, redirect, silent (RT), silent (iframe))\n */\nexport abstract class StandardInteractionClient extends BaseInteractionClient {\n /**\n * Generates an auth code request tied to the url request.\n * @param request\n */\n protected async initializeAuthorizationCodeRequest(request: AuthorizationUrlRequest): Promise<CommonAuthorizationCodeRequest> {\n this.logger.verbose(\"initializeAuthorizationRequest called\", request.correlationId);\n const generatedPkceParams = await this.browserCrypto.generatePkceCodes();\n\n const authCodeRequest: CommonAuthorizationCodeRequest = {\n ...request,\n redirectUri: request.redirectUri,\n code: Constants.EMPTY_STRING,\n codeVerifier: generatedPkceParams.verifier\n };\n\n request.codeChallenge = generatedPkceParams.challenge;\n request.codeChallengeMethod = Constants.S256_CODE_CHALLENGE_METHOD;\n\n return authCodeRequest;\n }\n\n /**\n * Initializer for the logout request.\n * @param logoutRequest\n */\n protected initializeLogoutRequest(logoutRequest?: EndSessionRequest): CommonEndSessionRequest {\n this.logger.verbose(\"initializeLogoutRequest called\", logoutRequest?.correlationId);\n\n const validLogoutRequest: CommonEndSessionRequest = {\n correlationId: this.correlationId || this.browserCrypto.createNewGuid(),\n ...logoutRequest\n };\n\n /**\n * Set logout_hint to be login_hint from ID Token Claims if present\n * and logoutHint attribute wasn't manually set in logout request\n */\n if (logoutRequest) {\n // If logoutHint isn't set and an account was passed in, try to extract logoutHint from ID Token Claims\n if (!logoutRequest.logoutHint) {\n if(logoutRequest.account) {\n const logoutHint = this.getLogoutHintFromIdTokenClaims(logoutRequest.account);\n if (logoutHint) {\n this.logger.verbose(\"Setting logoutHint to login_hint ID Token Claim value for the account provided\");\n validLogoutRequest.logoutHint = logoutHint;\n }\n } else {\n this.logger.verbose(\"logoutHint was not set and account was not passed into logout request, logoutHint will not be set\");\n }\n } else {\n this.logger.verbose(\"logoutHint has already been set in logoutRequest\");\n }\n } else {\n this.logger.verbose(\"logoutHint will not be set since no logout request was configured\");\n }\n\n /*\n * Only set redirect uri if logout request isn't provided or the set uri isn't null.\n * Otherwise, use passed uri, config, or current page.\n */\n if (!logoutRequest || logoutRequest.postLogoutRedirectUri !== null) {\n if (logoutRequest && logoutRequest.postLogoutRedirectUri) {\n this.logger.verbose(\"Setting postLogoutRedirectUri to uri set on logout request\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(logoutRequest.postLogoutRedirectUri, BrowserUtils.getCurrentUri());\n } else if (this.config.auth.postLogoutRedirectUri === null) {\n this.logger.verbose(\"postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect\", validLogoutRequest.correlationId);\n } else if (this.config.auth.postLogoutRedirectUri) {\n this.logger.verbose(\"Setting postLogoutRedirectUri to configured uri\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri, BrowserUtils.getCurrentUri());\n } else {\n this.logger.verbose(\"Setting postLogoutRedirectUri to current page\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(BrowserUtils.getCurrentUri(), BrowserUtils.getCurrentUri());\n }\n } else {\n this.logger.verbose(\"postLogoutRedirectUri passed as null, not setting post logout redirect uri\", validLogoutRequest.correlationId);\n }\n\n return validLogoutRequest;\n }\n\n /**\n * Parses login_hint ID Token Claim out of AccountInfo object to be used as\n * logout_hint in end session request.\n * @param account\n */\n protected getLogoutHintFromIdTokenClaims(account: AccountInfo): string | null {\n const idTokenClaims: IdTokenClaims | undefined = account.idTokenClaims;\n if (idTokenClaims) {\n if (idTokenClaims.login_hint) {\n return idTokenClaims.login_hint;\n } else {\n this.logger.verbose(\"The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request\");\n }\n } else {\n this.logger.verbose(\"The provided account does not contain ID Token Claims, logoutHint will not be added to logout request\");\n }\n\n return null;\n }\n\n /**\n * Creates an Authorization Code Client with the given authority, or the default authority.\n * @param serverTelemetryManager\n * @param authorityUrl\n */\n protected async createAuthCodeClient(serverTelemetryManager: ServerTelemetryManager, authorityUrl?: string, requestAzureCloudOptions?: AzureCloudOptions): Promise<AuthorizationCodeClient> {\n // Create auth module.\n const clientConfig = await this.getClientConfiguration(serverTelemetryManager, authorityUrl, requestAzureCloudOptions);\n return new AuthorizationCodeClient(clientConfig);\n }\n\n /**\n * Creates a Client Configuration object with the given request authority, or the default authority.\n * @param serverTelemetryManager\n * @param requestAuthority\n * @param requestCorrelationId\n */\n protected async getClientConfiguration(serverTelemetryManager: ServerTelemetryManager, requestAuthority?: string, requestAzureCloudOptions?: AzureCloudOptions): Promise<ClientConfiguration> {\n this.logger.verbose(\"getClientConfiguration called\", this.correlationId);\n const discoveredAuthority = await this.getDiscoveredAuthority(requestAuthority, requestAzureCloudOptions);\n\n return {\n authOptions: {\n clientId: this.config.auth.clientId,\n authority: discoveredAuthority,\n clientCapabilities: this.config.auth.clientCapabilities\n },\n systemOptions: {\n tokenRenewalOffsetSeconds: this.config.system.tokenRenewalOffsetSeconds,\n preventCorsPreflight: true\n },\n loggerOptions: {\n loggerCallback: this.config.system.loggerOptions.loggerCallback,\n piiLoggingEnabled: this.config.system.loggerOptions.piiLoggingEnabled,\n logLevel: this.config.system.loggerOptions.logLevel,\n correlationId: this.correlationId\n },\n cryptoInterface: this.browserCrypto,\n networkInterface: this.networkClient,\n storageInterface: this.browserStorage,\n serverTelemetryManager: serverTelemetryManager,\n libraryInfo: {\n sku: BrowserConstants.MSAL_SKU,\n version: version,\n cpu: Constants.EMPTY_STRING,\n os: Constants.EMPTY_STRING\n },\n telemetry: this.config.telemetry\n };\n }\n\n /**\n * @param hash\n * @param interactionType\n */\n protected validateAndExtractStateFromHash(serverParams: ServerAuthorizationCodeResponse, interactionType: InteractionType, requestCorrelationId?: string): string {\n this.logger.verbose(\"validateAndExtractStateFromHash called\", requestCorrelationId);\n if (!serverParams.state) {\n throw BrowserAuthError.createHashDoesNotContainStateError();\n }\n\n const platformStateObj = BrowserProtocolUtils.extractBrowserRequestState(this.browserCrypto, serverParams.state);\n if (!platformStateObj) {\n throw BrowserAuthError.createUnableToParseStateError();\n }\n\n if (platformStateObj.interactionType !== interactionType) {\n throw BrowserAuthError.createStateInteractionTypeMismatchError();\n }\n\n this.logger.verbose(\"Returning state from hash\", requestCorrelationId);\n return serverParams.state;\n }\n\n /**\n * Used to get a discovered version of the default authority.\n * @param requestAuthority\n * @param requestCorrelationId\n */\n protected async getDiscoveredAuthority(requestAuthority?: string, requestAzureCloudOptions?: AzureCloudOptions): Promise<Authority> {\n this.logger.verbose(\"getDiscoveredAuthority called\", this.correlationId);\n const getAuthorityMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);\n const authorityOptions: AuthorityOptions = {\n protocolMode: this.config.auth.protocolMode,\n knownAuthorities: this.config.auth.knownAuthorities,\n cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,\n authorityMetadata: this.config.auth.authorityMetadata,\n skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache\n };\n\n // build authority string based on auth params, precedence - azureCloudInstance + tenant >> authority\n const userAuthority = requestAuthority ? requestAuthority : this.config.auth.authority;\n\n // fall back to the authority from config\n const builtAuthority = Authority.generateAuthority( userAuthority, requestAzureCloudOptions || this.config.auth.azureCloudOptions);\n this.logger.verbose(\"Creating discovered authority with configured authority\", this.correlationId);\n return await AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions)\n .then((result: Authority) => {\n getAuthorityMeasurement.endMeasurement({\n success: true\n });\n\n return result;\n })\n .catch((error:AuthError) => {\n getAuthorityMeasurement.endMeasurement({\n errorCode: error.errorCode,\n subErrorCode: error.subError,\n success: false\n });\n\n throw error;\n });\n }\n\n /**\n * Helper to initialize required request parameters for interactive APIs and ssoSilent()\n * @param request\n * @param interactionType\n */\n protected async initializeAuthorizationRequest(request: RedirectRequest|PopupRequest|SsoSilentRequest, interactionType: InteractionType): Promise<AuthorizationUrlRequest> {\n this.logger.verbose(\"initializeAuthorizationRequest called\", this.correlationId);\n const redirectUri = this.getRedirectUri(request.redirectUri);\n const browserState: BrowserStateObject = {\n interactionType: interactionType\n };\n const state = ProtocolUtils.setRequestState(\n this.browserCrypto,\n (request && request.state)|| Constants.EMPTY_STRING,\n browserState\n );\n\n const validatedRequest: AuthorizationUrlRequest = {\n ...await this.initializeBaseRequest(request),\n redirectUri: redirectUri,\n state: state,\n nonce: request.nonce || this.browserCrypto.createNewGuid(),\n responseMode: ResponseMode.FRAGMENT\n };\n\n const account = request.account || this.browserStorage.getActiveAccount();\n if (account) {\n this.logger.verbose(\"Setting validated request account\", this.correlationId);\n this.logger.verbosePii(`Setting validated request account: ${account.homeAccountId}`, this.correlationId);\n validatedRequest.account = account;\n }\n\n // Check for ADAL/MSAL v1 SSO\n if (StringUtils.isEmpty(validatedRequest.loginHint) && !account) {\n const legacyLoginHint = this.browserStorage.getLegacyLoginHint();\n if (legacyLoginHint) {\n validatedRequest.loginHint = legacyLoginHint;\n }\n }\n\n return validatedRequest;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;AAkBA;;;;IAGwD,6CAAqB;IAA7E;;KAkQC;;;;;IA7PmB,sEAAkC,GAAlD,UAAmD,OAAgC;;;;;;wBAC/E,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,uCAAuC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;wBACxD,qBAAM,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE,EAAA;;wBAAlE,mBAAmB,GAAG,SAA4C;wBAElE,eAAe,yBACd,OAAO,KACV,WAAW,EAAE,OAAO,CAAC,WAAW,EAChC,IAAI,EAAE,SAAS,CAAC,YAAY,EAC5B,YAAY,EAAE,mBAAmB,CAAC,QAAQ,GAC7C,CAAC;wBAEF,OAAO,CAAC,aAAa,GAAG,mBAAmB,CAAC,SAAS,CAAC;wBACtD,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,0BAA0B,CAAC;wBAEnE,sBAAO,eAAe,EAAC;;;;KAC1B;;;;;IAMS,2DAAuB,GAAjC,UAAkC,aAAiC;QAC/D,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,gCAAgC,EAAE,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,aAAa,CAAC,CAAC;QAEpF,IAAM,kBAAkB,cACpB,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,IACpE,aAAa,CACnB,CAAC;;;;;QAMF,IAAI,aAAa,EAAE;;YAEf,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE;gBAC3B,IAAG,aAAa,CAAC,OAAO,EAAE;oBACtB,IAAM,UAAU,GAAG,IAAI,CAAC,8BAA8B,CAAC,aAA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,CAAC,OAAO,CAAC,EAAA;;wBAD1C,gBAAgB,6DACf,SAAyC,OAC5C,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,EAC1D,YAAY,EAAE,YAAY,CAAC,QAAQ,IACtC;wBAEK,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,gBAAgB,EAAE,CAAC;wBAC1E,IAAI,OAAO,EAAE;4BACT,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,mCAAmC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;4BAC7E,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,wCAAsC,OAAO,CAAC,aAAe,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;4BAC1G,gBAAgB,CAAC,OAAO,GAAG,OAAO,CAAC;yBACtC;;wBAGD,IAAI,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE;4BACvD,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,kBAAkB,EAAE,CAAC;4BACjE,IAAI,eAAe,EAAE;gCACjB,gBAAgB,CAAC,SAAS,GAAG,eAAe,CAAC;6BAChD;yBACJ;wBAED,sBAAO,gBAAgB,EAAC;;;;KAC3B;IACL,gCAAC;AAAD,CAlQA,CAAwD,qBAAqB;;;;"}
1
+ {"version":3,"file":"StandardInteractionClient.js","sources":["../../src/interaction_client/StandardInteractionClient.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ServerTelemetryManager, CommonAuthorizationCodeRequest, Constants, AuthorizationCodeClient, ClientConfiguration, AuthorityOptions, Authority, AuthorityFactory, ServerAuthorizationCodeResponse, UrlString, CommonEndSessionRequest, ProtocolUtils, ResponseMode, StringUtils, IdTokenClaims, AccountInfo, AzureCloudOptions, PerformanceEvents, AuthError } from \"@azure/msal-common\";\nimport { BaseInteractionClient } from \"./BaseInteractionClient\";\nimport { AuthorizationUrlRequest } from \"../request/AuthorizationUrlRequest\";\nimport { BrowserConstants, InteractionType } from \"../utils/BrowserConstants\";\nimport { version } from \"../packageMetadata\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { BrowserProtocolUtils, BrowserStateObject } from \"../utils/BrowserProtocolUtils\";\nimport { EndSessionRequest } from \"../request/EndSessionRequest\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\n\n/**\n * Defines the class structure and helper functions used by the \"standard\", non-brokered auth flows (popup, redirect, silent (RT), silent (iframe))\n */\nexport abstract class StandardInteractionClient extends BaseInteractionClient {\n /**\n * Generates an auth code request tied to the url request.\n * @param request\n */\n protected async initializeAuthorizationCodeRequest(request: AuthorizationUrlRequest): Promise<CommonAuthorizationCodeRequest> {\n this.logger.verbose(\"initializeAuthorizationRequest called\", request.correlationId);\n const generatedPkceParams = await this.browserCrypto.generatePkceCodes();\n\n const authCodeRequest: CommonAuthorizationCodeRequest = {\n ...request,\n redirectUri: request.redirectUri,\n code: Constants.EMPTY_STRING,\n codeVerifier: generatedPkceParams.verifier\n };\n\n request.codeChallenge = generatedPkceParams.challenge;\n request.codeChallengeMethod = Constants.S256_CODE_CHALLENGE_METHOD;\n\n return authCodeRequest;\n }\n\n /**\n * Initializer for the logout request.\n * @param logoutRequest\n */\n protected initializeLogoutRequest(logoutRequest?: EndSessionRequest): CommonEndSessionRequest {\n this.logger.verbose(\"initializeLogoutRequest called\", logoutRequest?.correlationId);\n\n const validLogoutRequest: CommonEndSessionRequest = {\n correlationId: this.correlationId || this.browserCrypto.createNewGuid(),\n ...logoutRequest\n };\n\n /**\n * Set logout_hint to be login_hint from ID Token Claims if present\n * and logoutHint attribute wasn't manually set in logout request\n */\n if (logoutRequest) {\n // If logoutHint isn't set and an account was passed in, try to extract logoutHint from ID Token Claims\n if (!logoutRequest.logoutHint) {\n if(logoutRequest.account) {\n const logoutHint = this.getLogoutHintFromIdTokenClaims(logoutRequest.account);\n if (logoutHint) {\n this.logger.verbose(\"Setting logoutHint to login_hint ID Token Claim value for the account provided\");\n validLogoutRequest.logoutHint = logoutHint;\n }\n } else {\n this.logger.verbose(\"logoutHint was not set and account was not passed into logout request, logoutHint will not be set\");\n }\n } else {\n this.logger.verbose(\"logoutHint has already been set in logoutRequest\");\n }\n } else {\n this.logger.verbose(\"logoutHint will not be set since no logout request was configured\");\n }\n\n /*\n * Only set redirect uri if logout request isn't provided or the set uri isn't null.\n * Otherwise, use passed uri, config, or current page.\n */\n if (!logoutRequest || logoutRequest.postLogoutRedirectUri !== null) {\n if (logoutRequest && logoutRequest.postLogoutRedirectUri) {\n this.logger.verbose(\"Setting postLogoutRedirectUri to uri set on logout request\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(logoutRequest.postLogoutRedirectUri, BrowserUtils.getCurrentUri());\n } else if (this.config.auth.postLogoutRedirectUri === null) {\n this.logger.verbose(\"postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect\", validLogoutRequest.correlationId);\n } else if (this.config.auth.postLogoutRedirectUri) {\n this.logger.verbose(\"Setting postLogoutRedirectUri to configured uri\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri, BrowserUtils.getCurrentUri());\n } else {\n this.logger.verbose(\"Setting postLogoutRedirectUri to current page\", validLogoutRequest.correlationId);\n validLogoutRequest.postLogoutRedirectUri = UrlString.getAbsoluteUrl(BrowserUtils.getCurrentUri(), BrowserUtils.getCurrentUri());\n }\n } else {\n this.logger.verbose(\"postLogoutRedirectUri passed as null, not setting post logout redirect uri\", validLogoutRequest.correlationId);\n }\n\n return validLogoutRequest;\n }\n\n /**\n * Parses login_hint ID Token Claim out of AccountInfo object to be used as\n * logout_hint in end session request.\n * @param account\n */\n protected getLogoutHintFromIdTokenClaims(account: AccountInfo): string | null {\n const idTokenClaims: IdTokenClaims | undefined = account.idTokenClaims;\n if (idTokenClaims) {\n if (idTokenClaims.login_hint) {\n return idTokenClaims.login_hint;\n } else {\n this.logger.verbose(\"The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request\");\n }\n } else {\n this.logger.verbose(\"The provided account does not contain ID Token Claims, logoutHint will not be added to logout request\");\n }\n\n return null;\n }\n\n /**\n * Creates an Authorization Code Client with the given authority, or the default authority.\n * @param serverTelemetryManager\n * @param authorityUrl\n */\n protected async createAuthCodeClient(serverTelemetryManager: ServerTelemetryManager, authorityUrl?: string, requestAzureCloudOptions?: AzureCloudOptions): Promise<AuthorizationCodeClient> {\n // Create auth module.\n const clientConfig = await this.getClientConfiguration(serverTelemetryManager, authorityUrl, requestAzureCloudOptions);\n return new AuthorizationCodeClient(clientConfig);\n }\n\n /**\n * Creates a Client Configuration object with the given request authority, or the default authority.\n * @param serverTelemetryManager\n * @param requestAuthority\n * @param requestCorrelationId\n */\n protected async getClientConfiguration(serverTelemetryManager: ServerTelemetryManager, requestAuthority?: string, requestAzureCloudOptions?: AzureCloudOptions): Promise<ClientConfiguration> {\n this.logger.verbose(\"getClientConfiguration called\", this.correlationId);\n const discoveredAuthority = await this.getDiscoveredAuthority(requestAuthority, requestAzureCloudOptions);\n\n return {\n authOptions: {\n clientId: this.config.auth.clientId,\n authority: discoveredAuthority,\n clientCapabilities: this.config.auth.clientCapabilities\n },\n systemOptions: {\n tokenRenewalOffsetSeconds: this.config.system.tokenRenewalOffsetSeconds,\n preventCorsPreflight: true\n },\n loggerOptions: {\n loggerCallback: this.config.system.loggerOptions.loggerCallback,\n piiLoggingEnabled: this.config.system.loggerOptions.piiLoggingEnabled,\n logLevel: this.config.system.loggerOptions.logLevel,\n correlationId: this.correlationId\n },\n cryptoInterface: this.browserCrypto,\n networkInterface: this.networkClient,\n storageInterface: this.browserStorage,\n serverTelemetryManager: serverTelemetryManager,\n libraryInfo: {\n sku: BrowserConstants.MSAL_SKU,\n version: version,\n cpu: Constants.EMPTY_STRING,\n os: Constants.EMPTY_STRING\n },\n telemetry: this.config.telemetry\n };\n }\n\n /**\n * @param hash\n * @param interactionType\n */\n protected validateAndExtractStateFromHash(serverParams: ServerAuthorizationCodeResponse, interactionType: InteractionType, requestCorrelationId?: string): string {\n this.logger.verbose(\"validateAndExtractStateFromHash called\", requestCorrelationId);\n if (!serverParams.state) {\n throw BrowserAuthError.createHashDoesNotContainStateError();\n }\n\n const platformStateObj = BrowserProtocolUtils.extractBrowserRequestState(this.browserCrypto, serverParams.state);\n if (!platformStateObj) {\n throw BrowserAuthError.createUnableToParseStateError();\n }\n\n if (platformStateObj.interactionType !== interactionType) {\n throw BrowserAuthError.createStateInteractionTypeMismatchError();\n }\n\n this.logger.verbose(\"Returning state from hash\", requestCorrelationId);\n return serverParams.state;\n }\n\n /**\n * Used to get a discovered version of the default authority.\n * @param requestAuthority\n * @param requestCorrelationId\n */\n protected async getDiscoveredAuthority(requestAuthority?: string, requestAzureCloudOptions?: AzureCloudOptions): Promise<Authority> {\n this.logger.verbose(\"getDiscoveredAuthority called\", this.correlationId);\n const getAuthorityMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.StandardInteractionClientGetDiscoveredAuthority, this.correlationId);\n const authorityOptions: AuthorityOptions = {\n protocolMode: this.config.auth.protocolMode,\n knownAuthorities: this.config.auth.knownAuthorities,\n cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,\n authorityMetadata: this.config.auth.authorityMetadata,\n skipAuthorityMetadataCache: this.config.auth.skipAuthorityMetadataCache\n };\n\n // build authority string based on auth params, precedence - azureCloudInstance + tenant >> authority\n const userAuthority = requestAuthority ? requestAuthority : this.config.auth.authority;\n\n // fall back to the authority from config\n const builtAuthority = Authority.generateAuthority( userAuthority, requestAzureCloudOptions || this.config.auth.azureCloudOptions);\n this.logger.verbose(\"Creating discovered authority with configured authority\", this.correlationId);\n return await AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions, this.logger)\n .then((result: Authority) => {\n getAuthorityMeasurement.endMeasurement({\n success: true\n });\n\n return result;\n })\n .catch((error:AuthError) => {\n getAuthorityMeasurement.endMeasurement({\n errorCode: error.errorCode,\n subErrorCode: error.subError,\n success: false\n });\n\n throw error;\n });\n }\n\n /**\n * Helper to initialize required request parameters for interactive APIs and ssoSilent()\n * @param request\n * @param interactionType\n */\n protected async initializeAuthorizationRequest(request: RedirectRequest|PopupRequest|SsoSilentRequest, interactionType: InteractionType): Promise<AuthorizationUrlRequest> {\n this.logger.verbose(\"initializeAuthorizationRequest called\", this.correlationId);\n const redirectUri = this.getRedirectUri(request.redirectUri);\n const browserState: BrowserStateObject = {\n interactionType: interactionType\n };\n const state = ProtocolUtils.setRequestState(\n this.browserCrypto,\n (request && request.state)|| Constants.EMPTY_STRING,\n browserState\n );\n\n const validatedRequest: AuthorizationUrlRequest = {\n ...await this.initializeBaseRequest(request),\n redirectUri: redirectUri,\n state: state,\n nonce: request.nonce || this.browserCrypto.createNewGuid(),\n responseMode: ResponseMode.FRAGMENT\n };\n\n const account = request.account || this.browserStorage.getActiveAccount();\n if (account) {\n this.logger.verbose(\"Setting validated request account\", this.correlationId);\n this.logger.verbosePii(`Setting validated request account: ${account.homeAccountId}`, this.correlationId);\n validatedRequest.account = account;\n }\n\n // Check for ADAL/MSAL v1 SSO\n if (StringUtils.isEmpty(validatedRequest.loginHint) && !account) {\n const legacyLoginHint = this.browserStorage.getLegacyLoginHint();\n if (legacyLoginHint) {\n validatedRequest.loginHint = legacyLoginHint;\n }\n }\n\n return validatedRequest;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;AAkBA;;;;IAGwD,6CAAqB;IAA7E;;KAkQC;;;;;IA7Pm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O,GAAG,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,gBAAgB,EAAE,CAAC;wBAC1E,IAAI,OAAO,EAAE;4BACT,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,mCAAmC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;4BAC7E,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,wCAAsC,OAAO,CAAC,aAAe,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;4BAC1G,gBAAgB,CAAC,OAAO,GAAG,OAAO,CAAC;yBACtC;;wBAGD,IAAI,WAAW,CAAC,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE;4BACvD,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,kBAAkB,EAAE,CAAC;4BACjE,IAAI,eAAe,EAAE;gCACjB,gBAAgB,CAAC,SAAS,GAAG,eAAe,CAAC;6BAChD;yBACJ;wBAED,sBAAO,gBAAgB,EAAC;;;;KAC3B;IACL,gCAAC;AAAD,CAlQA,CAAwD,qBAAqB;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { StringUtils, ClientAuthError, ServerError, AuthorityFactory } from '@azure/msal-common';
@@ -121,7 +121,7 @@ var InteractionHandler = /** @class */ (function () {
121
121
  switch (_a.label) {
122
122
  case 0:
123
123
  cloudInstanceAuthorityUri = "https://" + cloudInstanceHostname + "/" + authority.tenant + "/";
124
- return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(cloudInstanceAuthorityUri, networkModule, this.browserStorage, authority.options)];
124
+ return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(cloudInstanceAuthorityUri, networkModule, this.browserStorage, authority.options, this.logger)];
125
125
  case 1:
126
126
  cloudInstanceAuthority = _a.sent();
127
127
  this.authModule.updateAuthority(cloudInstanceAuthority);
@@ -1 +1 @@
1
- {"version":3,"file":"InteractionHandler.js","sources":["../../src/interaction_handler/InteractionHandler.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthorizationCodePayload , StringUtils, CommonAuthorizationCodeRequest, AuthenticationResult, AuthorizationCodeClient, AuthorityFactory, Authority, INetworkModule, ClientAuthError, CcsCredential, Logger, ServerError } from \"@azure/msal-common\";\n\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { BrowserAuthError, BrowserAuthErrorMessage } from \"../error/BrowserAuthError\";\nimport { TemporaryCacheKeys } from \"../utils/BrowserConstants\";\n\nexport type InteractionParams = {};\n\n/**\n * Abstract class which defines operations for a browser interaction handling class.\n */\nexport class InteractionHandler {\n\n protected authModule: AuthorizationCodeClient;\n protected browserStorage: BrowserCacheManager;\n protected authCodeRequest: CommonAuthorizationCodeRequest;\n protected logger: Logger;\n\n constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserCacheManager, authCodeRequest: CommonAuthorizationCodeRequest, logger: Logger) {\n this.authModule = authCodeModule;\n this.browserStorage = storageImpl;\n this.authCodeRequest = authCodeRequest;\n this.logger = logger;\n }\n\n /**\n * Function to handle response parameters from hash.\n * @param locationHash\n */\n async handleCodeResponseFromHash(locationHash: string, state: string, authority: Authority, networkModule: INetworkModule): Promise<AuthenticationResult> {\n this.logger.verbose(\"InteractionHandler.handleCodeResponse called\");\n // Check that location hash isn't empty.\n if (StringUtils.isEmpty(locationHash)) {\n throw BrowserAuthError.createEmptyHashError(locationHash);\n }\n\n // Handle code response.\n const stateKey = this.browserStorage.generateStateKey(state);\n const requestState = this.browserStorage.getTemporaryCache(stateKey);\n if (!requestState) {\n throw ClientAuthError.createStateNotFoundError(\"Cached State\");\n }\n\n let authCodeResponse;\n try {\n authCodeResponse = this.authModule.handleFragmentResponse(locationHash, requestState);\n } catch (e) {\n if (e instanceof ServerError && e.subError === BrowserAuthErrorMessage.userCancelledError.code) {\n // Translate server error caused by user closing native prompt to corresponding first class MSAL error\n throw BrowserAuthError.createUserCancelledError();\n } else {\n throw e;\n }\n }\n\n return this.handleCodeResponseFromServer(authCodeResponse, state, authority, networkModule);\n }\n\n /**\n * Process auth code response from AAD\n * @param authCodeResponse \n * @param state \n * @param authority \n * @param networkModule \n * @returns \n */\n async handleCodeResponseFromServer(authCodeResponse: AuthorizationCodePayload, state: string, authority: Authority, networkModule: INetworkModule, validateNonce: boolean = true): Promise<AuthenticationResult> {\n this.logger.trace(\"InteractionHandler.handleCodeResponseFromServer called\");\n\n // Handle code response.\n const stateKey = this.browserStorage.generateStateKey(state);\n const requestState = this.browserStorage.getTemporaryCache(stateKey);\n if (!requestState) {\n throw ClientAuthError.createStateNotFoundError(\"Cached State\");\n }\n \n // Get cached items\n const nonceKey = this.browserStorage.generateNonceKey(requestState);\n const cachedNonce = this.browserStorage.getTemporaryCache(nonceKey);\n\n // Assign code to request\n this.authCodeRequest.code = authCodeResponse.code;\n\n // Check for new cloud instance\n if (authCodeResponse.cloud_instance_host_name) {\n await this.updateTokenEndpointAuthority(authCodeResponse.cloud_instance_host_name, authority, networkModule);\n }\n\n // Nonce validation not needed when redirect not involved (e.g. hybrid spa, renewing token via rt)\n if (validateNonce) {\n authCodeResponse.nonce = cachedNonce || undefined;\n }\n \n authCodeResponse.state = requestState;\n\n // Add CCS parameters if available\n if (authCodeResponse.client_info) {\n this.authCodeRequest.clientInfo = authCodeResponse.client_info;\n } else {\n const cachedCcsCred = this.checkCcsCredentials();\n if (cachedCcsCred) {\n this.authCodeRequest.ccsCredential = cachedCcsCred;\n }\n }\n\n // Acquire token with retrieved code.\n const tokenResponse = await this.authModule.acquireToken(this.authCodeRequest, authCodeResponse);\n this.browserStorage.cleanRequestByState(state);\n return tokenResponse;\n }\n\n /**\n * Updates authority based on cloudInstanceHostname\n * @param cloudInstanceHostname \n * @param authority \n * @param networkModule \n */\n protected async updateTokenEndpointAuthority(cloudInstanceHostname: string, authority: Authority, networkModule: INetworkModule): Promise<void> {\n const cloudInstanceAuthorityUri = `https://${cloudInstanceHostname}/${authority.tenant}/`;\n const cloudInstanceAuthority = await AuthorityFactory.createDiscoveredInstance(cloudInstanceAuthorityUri, networkModule, this.browserStorage, authority.options);\n this.authModule.updateAuthority(cloudInstanceAuthority);\n }\n\n /**\n * Looks up ccs creds in the cache\n */\n protected checkCcsCredentials(): CcsCredential | null {\n // Look up ccs credential in temp cache\n const cachedCcsCred = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CCS_CREDENTIAL, true);\n if (cachedCcsCred) {\n try {\n return JSON.parse(cachedCcsCred) as CcsCredential;\n } catch (e) {\n this.authModule.logger.error(\"Cache credential could not be parsed\");\n this.authModule.logger.errorPii(`Cache credential could not be parsed: ${cachedCcsCred}`);\n }\n }\n return null;\n }\n}\n"],"names":[],"mappings":";;;;;;;AAAA;;;;AAaA;;;;IAUI,4BAAY,cAAuC,EAAE,WAAgC,EAAE,eAA+C,EAAE,MAAc;QAClJ,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC;QACjC,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC;QAClC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;KACxB;;;;;IAMK,uDAA0B,GAAhC,UAAiC,YAAoB,EAAE,KAAa,EAAE,SAAoB,EAAE,aAA6B;;;;gBACrH,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,8CAA8C,CAAC,CAAC;;gBAEpE,IAAI,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;oBACnC,MAAM,gBAAgB,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC;iBAC7D;gBAGK,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;gBACvD,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,i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AEI,IAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QACrG,IAAI,aAAa,EAAE;YACf,IAAI;gBACA,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAkB,CAAC;aACrD;YAAC,OAAO,CAAC,EAAE;gBACR,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;gBACrE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,2CAAyC,aAAe,CAAC,CAAC;aAC7F;SACJ;QACD,OAAO,IAAI,CAAC;KACf;IACL,yBAAC;AAAD,CAAC;;;;"}
1
+ {"version":3,"file":"InteractionHandler.js","sources":["../../src/interaction_handler/InteractionHandler.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthorizationCodePayload , StringUtils, CommonAuthorizationCodeRequest, AuthenticationResult, AuthorizationCodeClient, AuthorityFactory, Authority, INetworkModule, ClientAuthError, CcsCredential, Logger, ServerError } from \"@azure/msal-common\";\n\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { BrowserAuthError, BrowserAuthErrorMessage } from \"../error/BrowserAuthError\";\nimport { TemporaryCacheKeys } from \"../utils/BrowserConstants\";\n\nexport type InteractionParams = {};\n\n/**\n * Abstract class which defines operations for a browser interaction handling class.\n */\nexport class InteractionHandler {\n\n protected authModule: AuthorizationCodeClient;\n protected browserStorage: BrowserCacheManager;\n protected authCodeRequest: CommonAuthorizationCodeRequest;\n protected logger: Logger;\n\n constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserCacheManager, authCodeRequest: CommonAuthorizationCodeRequest, logger: Logger) {\n this.authModule = authCodeModule;\n this.browserStorage = storageImpl;\n this.authCodeRequest = authCodeRequest;\n this.logger = logger;\n }\n\n /**\n * Function to handle response parameters from hash.\n * @param locationHash\n */\n async handleCodeResponseFromHash(locationHash: string, state: string, authority: Authority, networkModule: INetworkModule): Promise<AuthenticationResult> {\n this.logger.verbose(\"InteractionHandler.handleCodeResponse called\");\n // Check that location hash isn't empty.\n if (StringUtils.isEmpty(locationHash)) {\n throw BrowserAuthError.createEmptyHashError(locationHash);\n }\n\n // Handle code response.\n const stateKey = this.browserStorage.generateStateKey(state);\n const requestState = this.browserStorage.getTemporaryCache(stateKey);\n if (!requestState) {\n throw ClientAuthError.createStateNotFoundError(\"Cached State\");\n }\n\n let authCodeResponse;\n try {\n authCodeResponse = this.authModule.handleFragmentResponse(locationHash, requestState);\n } catch (e) {\n if (e instanceof ServerError && e.subError === BrowserAuthErrorMessage.userCancelledError.code) {\n // Translate server error caused by user closing native prompt to corresponding first class MSAL error\n throw BrowserAuthError.createUserCancelledError();\n } else {\n throw e;\n }\n }\n\n return this.handleCodeResponseFromServer(authCodeResponse, state, authority, networkModule);\n }\n\n /**\n * Process auth code response from AAD\n * @param authCodeResponse \n * @param state \n * @param authority \n * @param networkModule \n * @returns \n */\n async handleCodeResponseFromServer(authCodeResponse: AuthorizationCodePayload, state: string, authority: Authority, networkModule: INetworkModule, validateNonce: boolean = true): Promise<AuthenticationResult> {\n this.logger.trace(\"InteractionHandler.handleCodeResponseFromServer called\");\n\n // Handle code response.\n const stateKey = this.browserStorage.generateStateKey(state);\n const requestState = this.browserStorage.getTemporaryCache(stateKey);\n if (!requestState) {\n throw ClientAuthError.createStateNotFoundError(\"Cached State\");\n }\n \n // Get cached items\n const nonceKey = this.browserStorage.generateNonceKey(requestState);\n const cachedNonce = this.browserStorage.getTemporaryCache(nonceKey);\n\n // Assign code to request\n this.authCodeRequest.code = authCodeResponse.code;\n\n // Check for new cloud instance\n if (authCodeResponse.cloud_instance_host_name) {\n await this.updateTokenEndpointAuthority(authCodeResponse.cloud_instance_host_name, authority, networkModule);\n }\n\n // Nonce validation not needed when redirect not involved (e.g. hybrid spa, renewing token via rt)\n if (validateNonce) {\n authCodeResponse.nonce = cachedNonce || undefined;\n }\n \n authCodeResponse.state = requestState;\n\n // Add CCS parameters if available\n if (authCodeResponse.client_info) {\n this.authCodeRequest.clientInfo = authCodeResponse.client_info;\n } else {\n const cachedCcsCred = this.checkCcsCredentials();\n if (cachedCcsCred) {\n this.authCodeRequest.ccsCredential = cachedCcsCred;\n }\n }\n\n // Acquire token with retrieved code.\n const tokenResponse = await this.authModule.acquireToken(this.authCodeRequest, authCodeResponse);\n this.browserStorage.cleanRequestByState(state);\n return tokenResponse;\n }\n\n /**\n * Updates authority based on cloudInstanceHostname\n * @param cloudInstanceHostname \n * @param authority \n * @param networkModule \n */\n protected async updateTokenEndpointAuthority(cloudInstanceHostname: string, authority: Authority, networkModule: INetworkModule): Promise<void> {\n const cloudInstanceAuthorityUri = `https://${cloudInstanceHostname}/${authority.tenant}/`;\n const cloudInstanceAuthority = await AuthorityFactory.createDiscoveredInstance(cloudInstanceAuthorityUri, networkModule, this.browserStorage, authority.options, this.logger);\n this.authModule.updateAuthority(cloudInstanceAuthority);\n }\n\n /**\n * Looks up ccs creds in the cache\n */\n protected checkCcsCredentials(): CcsCredential | null {\n // Look up ccs credential in temp cache\n const cachedCcsCred = this.browserStorage.getTemporaryCache(TemporaryCacheKeys.CCS_CREDENTIAL, true);\n if (cachedCcsCred) {\n try {\n return JSON.parse(cachedCcsCred) as CcsCredential;\n } catch (e) {\n this.authModule.logger.error(\"Cache credential could not be parsed\");\n this.authModule.logger.errorPii(`Cache credential could not be parsed: ${cachedCcsCred}`);\n }\n }\n return null;\n }\n}\n"],"names":[],"mappings":";;;;;;;AAAA;;;;AAaA;;;;IAUI,4BAAY,cAAuC,EAAE,WAAgC,EAAE,eAA+C,EAAE,MAAc;QAClJ,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC;QACjC,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC;QAClC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG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ACxB;;;;;;;IAQe,yDAA4B,GAA5C,UAA6C,qBAA6B,EAAE,SAAoB,EAAE,aAA6B;;;;;;wBACrH,yBAAyB,GAAG,aAAW,qBAAqB,SAAI,SAAS,CAAC,MAAM,MAAG,CAAC;wBAC3D,qBAAM,gBAAgB,CAAC,wBAAwB,CAAC,yBAAyB,EAAE,aAAa,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,EAAA;;wBAAvK,sBAAsB,GAAG,SAA8I;wBAC7K,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;;;;;KAC3D;;;;IAKS,gDAAmB,GAA7B;;QAEI,IAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QACrG,IAAI,aAAa,EAAE;YACf,IAAI;gBACA,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAkB,CAAC;aACrD;YAAC,OAAO,CAAC,EAAE;gBACR,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;gBACrE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,2CAAyC,aAAe,CAAC,CAAC;aAC7F;SACJ;QACD,OAAO,IAAI,CAAC;KACf;IACL,yBAAC;AAAD,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { StringUtils, ClientAuthError, ServerError } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { StringUtils, Constants, UrlString } from '@azure/msal-common';
package/dist/internals.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  export { BrowserCacheManager } from './cache/BrowserCacheManager.js';
4
4
  export { StandardInteractionClient } from './interaction_client/StandardInteractionClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { Constants } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __awaiter, __generator } from '../_virtual/_tslib.js';
4
4
  import { BrowserAuthError } from '../error/BrowserAuthError.js';
@@ -1,3 +1,3 @@
1
1
  export declare const name = "@azure/msal-browser";
2
- export declare const version = "2.31.0";
2
+ export declare const version = "2.32.0";
3
3
  //# sourceMappingURL=packageMetadata.d.ts.map
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  /* eslint-disable header/header */
4
4
  var name = "@azure/msal-browser";
5
- var version = "2.31.0";
5
+ var version = "2.32.0";
6
6
 
7
7
  export { name, version };
8
8
  //# sourceMappingURL=packageMetadata.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageMetadata.js","sources":["../src/packageMetadata.ts"],"sourcesContent":["/* eslint-disable header/header */\nexport const name = \"@azure/msal-browser\";\nexport const version = \"2.31.0\";\n"],"names":[],"mappings":";;AAAA;IACa,IAAI,GAAG,sBAAsB;IAC7B,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"packageMetadata.js","sources":["../src/packageMetadata.ts"],"sourcesContent":["/* eslint-disable header/header */\nexport const name = \"@azure/msal-browser\";\nexport const version = \"2.32.0\";\n"],"names":[],"mappings":";;AAAA;IACa,IAAI,GAAG,sBAAsB;IAC7B,OAAO,GAAG;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { __extends, __assign } from '../_virtual/_tslib.js';
4
4
  import { PerformanceClient } from '@azure/msal-common';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { OIDC_DEFAULT_SCOPES } from '@azure/msal-common';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { StringUtils, ProtocolUtils, ClientAuthError, UrlString } from '@azure/msal-common';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { Constants } from '@azure/msal-common';
4
4
 
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  import { Constants, UrlString } from '@azure/msal-common';
4
4
  import { FetchClient } from '../network/FetchClient.js';
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v2.31.0 2022-11-07 */
1
+ /*! @azure/msal-browser v2.32.0 2022-11-22 */
2
2
  'use strict';
3
3
  /*
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.