@azure/msal-browser 2.21.0 → 2.22.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.
- package/CHANGELOG.json +73 -0
- package/CHANGELOG.md +18 -1
- package/README.md +1 -1
- package/dist/_virtual/_tslib.js +1 -1
- package/dist/app/ClientApplication.d.ts +7 -1
- package/dist/app/ClientApplication.d.ts.map +1 -1
- package/dist/app/ClientApplication.js +18 -3
- package/dist/app/ClientApplication.js.map +1 -1
- package/dist/app/IPublicClientApplication.js +1 -1
- package/dist/app/PublicClientApplication.d.ts +2 -2
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.js +1 -1
- package/dist/app/PublicClientApplication.js.map +1 -1
- package/dist/cache/AsyncMemoryStorage.js +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +14 -12
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.js +11 -7
- package/dist/cache/BrowserCacheManager.js.map +1 -1
- package/dist/cache/BrowserStorage.js +1 -1
- package/dist/cache/DatabaseStorage.js +1 -1
- package/dist/cache/MemoryStorage.js +1 -1
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.js +4 -3
- package/dist/cache/TokenCache.js.map +1 -1
- package/dist/config/Configuration.d.ts +10 -9
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.js +7 -3
- package/dist/config/Configuration.js.map +1 -1
- package/dist/crypto/BrowserCrypto.js +1 -1
- package/dist/crypto/CryptoOps.js +1 -1
- package/dist/crypto/GuidGenerator.js +1 -1
- package/dist/crypto/PkceGenerator.js +1 -1
- package/dist/crypto/SignedHttpRequest.js +1 -1
- package/dist/encode/Base64Decode.js +1 -1
- package/dist/encode/Base64Encode.js +1 -1
- package/dist/error/BrowserAuthError.js +1 -1
- package/dist/error/BrowserConfigurationAuthError.js +1 -1
- package/dist/event/EventHandler.js +1 -1
- package/dist/event/EventMessage.js +1 -1
- package/dist/event/EventType.js +1 -1
- package/dist/index.cjs.js +355 -234
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +14 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.js +1 -1
- package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
- package/dist/interaction_client/PopupClient.d.ts +4 -3
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.js +52 -60
- package/dist/interaction_client/PopupClient.js.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts +3 -3
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.js +9 -8
- package/dist/interaction_client/RedirectClient.js.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.js +2 -1
- package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -1
- package/dist/interaction_client/SilentCacheClient.d.ts +2 -2
- package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentCacheClient.js +4 -4
- package/dist/interaction_client/SilentCacheClient.js.map +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts +3 -3
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.js +3 -2
- package/dist/interaction_client/SilentIframeClient.js.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.d.ts +2 -2
- package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.js +4 -4
- package/dist/interaction_client/SilentRefreshClient.js.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.d.ts +10 -10
- package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.js +58 -44
- package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
- package/dist/interaction_handler/InteractionHandler.js +1 -1
- package/dist/interaction_handler/PopupHandler.d.ts.map +1 -1
- package/dist/interaction_handler/PopupHandler.js +1 -3
- package/dist/interaction_handler/PopupHandler.js.map +1 -1
- package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
- package/dist/interaction_handler/RedirectHandler.js +1 -2
- package/dist/interaction_handler/RedirectHandler.js.map +1 -1
- package/dist/interaction_handler/SilentHandler.js +1 -1
- package/dist/navigation/NavigationClient.js +1 -1
- package/dist/network/FetchClient.js +1 -1
- package/dist/network/XhrClient.js +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.js +2 -2
- package/dist/packageMetadata.js.map +1 -1
- package/dist/request/EndSessionPopupRequest.d.ts +1 -0
- package/dist/request/EndSessionPopupRequest.d.ts.map +1 -1
- package/dist/request/EndSessionRequest.d.ts +1 -0
- package/dist/request/EndSessionRequest.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.d.ts +2 -1
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.js +2 -1
- package/dist/utils/BrowserConstants.js.map +1 -1
- package/dist/utils/BrowserProtocolUtils.js +1 -1
- package/dist/utils/BrowserStringUtils.js +1 -1
- package/dist/utils/BrowserUtils.js +1 -1
- package/dist/utils/MathUtils.js +1 -1
- package/dist/utils/PopupUtils.d.ts +1 -2
- package/dist/utils/PopupUtils.d.ts.map +1 -1
- package/dist/utils/PopupUtils.js +3 -3
- package/dist/utils/PopupUtils.js.map +1 -1
- package/lib/msal-browser.js +355 -234
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +35 -30
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @azure/msal-browser v2.
|
|
1
|
+
/*! @azure/msal-browser v2.22.0 2022-02-08 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
|
|
4
|
-
import {
|
|
4
|
+
import { UrlString, Constants, AuthorizationCodeClient, Authority, AuthorityFactory, ResponseMode, StringUtils, ProtocolUtils } from '@azure/msal-common';
|
|
5
5
|
import { BaseInteractionClient } from './BaseInteractionClient.js';
|
|
6
6
|
import { BrowserConstants } from '../utils/BrowserConstants.js';
|
|
7
7
|
import { version } from '../packageMetadata.js';
|
|
@@ -51,11 +51,32 @@ var StandardInteractionClient = /** @class */ (function (_super) {
|
|
|
51
51
|
*/
|
|
52
52
|
StandardInteractionClient.prototype.initializeLogoutRequest = function (logoutRequest) {
|
|
53
53
|
this.logger.verbose("initializeLogoutRequest called", logoutRequest === null || logoutRequest === void 0 ? void 0 : logoutRequest.correlationId);
|
|
54
|
-
// Check if interaction is in progress. Throw error if true.
|
|
55
|
-
if (this.browserStorage.isInteractionInProgress()) {
|
|
56
|
-
throw BrowserAuthError.createInteractionInProgressError();
|
|
57
|
-
}
|
|
58
54
|
var validLogoutRequest = __assign({ correlationId: this.browserCrypto.createNewGuid() }, logoutRequest);
|
|
55
|
+
/**
|
|
56
|
+
* Set logout_hint to be login_hint from ID Token Claims if present
|
|
57
|
+
* and logoutHint attribute wasn't manually set in logout request
|
|
58
|
+
*/
|
|
59
|
+
if (logoutRequest) {
|
|
60
|
+
// If logoutHint isn't set and an account was passed in, try to extract logoutHint from ID Token Claims
|
|
61
|
+
if (!logoutRequest.logoutHint) {
|
|
62
|
+
if (logoutRequest.account) {
|
|
63
|
+
var logoutHint = this.getLogoutHintFromIdTokenClaims(logoutRequest.account);
|
|
64
|
+
if (logoutHint) {
|
|
65
|
+
this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided");
|
|
66
|
+
validLogoutRequest.logoutHint = logoutHint;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
this.logger.verbose("logoutHint has already been set in logoutRequest");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.logger.verbose("logoutHint will not be set since no logout request was configured");
|
|
79
|
+
}
|
|
59
80
|
/*
|
|
60
81
|
* Only set redirect uri if logout request isn't provided or the set uri isn't null.
|
|
61
82
|
* Otherwise, use passed uri, config, or current page.
|
|
@@ -82,17 +103,37 @@ var StandardInteractionClient = /** @class */ (function (_super) {
|
|
|
82
103
|
}
|
|
83
104
|
return validLogoutRequest;
|
|
84
105
|
};
|
|
106
|
+
/**
|
|
107
|
+
* Parses login_hint ID Token Claim out of AccountInfo object to be used as
|
|
108
|
+
* logout_hint in end session request.
|
|
109
|
+
* @param account
|
|
110
|
+
*/
|
|
111
|
+
StandardInteractionClient.prototype.getLogoutHintFromIdTokenClaims = function (account) {
|
|
112
|
+
var idTokenClaims = account.idTokenClaims;
|
|
113
|
+
if (idTokenClaims) {
|
|
114
|
+
if (idTokenClaims.login_hint) {
|
|
115
|
+
return idTokenClaims.login_hint;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
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");
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");
|
|
123
|
+
}
|
|
124
|
+
return null;
|
|
125
|
+
};
|
|
85
126
|
/**
|
|
86
127
|
* Creates an Authorization Code Client with the given authority, or the default authority.
|
|
87
128
|
* @param serverTelemetryManager
|
|
88
129
|
* @param authorityUrl
|
|
89
130
|
*/
|
|
90
|
-
StandardInteractionClient.prototype.createAuthCodeClient = function (serverTelemetryManager, authorityUrl) {
|
|
131
|
+
StandardInteractionClient.prototype.createAuthCodeClient = function (serverTelemetryManager, authorityUrl, requestAzureCloudOptions) {
|
|
91
132
|
return __awaiter(this, void 0, void 0, function () {
|
|
92
133
|
var clientConfig;
|
|
93
134
|
return __generator(this, function (_a) {
|
|
94
135
|
switch (_a.label) {
|
|
95
|
-
case 0: return [4 /*yield*/, this.getClientConfiguration(serverTelemetryManager, authorityUrl)];
|
|
136
|
+
case 0: return [4 /*yield*/, this.getClientConfiguration(serverTelemetryManager, authorityUrl, requestAzureCloudOptions)];
|
|
96
137
|
case 1:
|
|
97
138
|
clientConfig = _a.sent();
|
|
98
139
|
return [2 /*return*/, new AuthorizationCodeClient(clientConfig)];
|
|
@@ -106,14 +147,14 @@ var StandardInteractionClient = /** @class */ (function (_super) {
|
|
|
106
147
|
* @param requestAuthority
|
|
107
148
|
* @param requestCorrelationId
|
|
108
149
|
*/
|
|
109
|
-
StandardInteractionClient.prototype.getClientConfiguration = function (serverTelemetryManager, requestAuthority) {
|
|
150
|
+
StandardInteractionClient.prototype.getClientConfiguration = function (serverTelemetryManager, requestAuthority, requestAzureCloudOptions) {
|
|
110
151
|
return __awaiter(this, void 0, void 0, function () {
|
|
111
152
|
var discoveredAuthority;
|
|
112
153
|
return __generator(this, function (_a) {
|
|
113
154
|
switch (_a.label) {
|
|
114
155
|
case 0:
|
|
115
156
|
this.logger.verbose("getClientConfiguration called");
|
|
116
|
-
return [4 /*yield*/, this.getDiscoveredAuthority(requestAuthority)];
|
|
157
|
+
return [4 /*yield*/, this.getDiscoveredAuthority(requestAuthority, requestAzureCloudOptions)];
|
|
117
158
|
case 1:
|
|
118
159
|
discoveredAuthority = _a.sent();
|
|
119
160
|
return [2 /*return*/, {
|
|
@@ -173,9 +214,9 @@ var StandardInteractionClient = /** @class */ (function (_super) {
|
|
|
173
214
|
* @param requestAuthority
|
|
174
215
|
* @param requestCorrelationId
|
|
175
216
|
*/
|
|
176
|
-
StandardInteractionClient.prototype.getDiscoveredAuthority = function (requestAuthority) {
|
|
217
|
+
StandardInteractionClient.prototype.getDiscoveredAuthority = function (requestAuthority, requestAzureCloudOptions) {
|
|
177
218
|
return __awaiter(this, void 0, void 0, function () {
|
|
178
|
-
var authorityOptions;
|
|
219
|
+
var authorityOptions, userAuthority, builtAuthority;
|
|
179
220
|
return __generator(this, function (_a) {
|
|
180
221
|
switch (_a.label) {
|
|
181
222
|
case 0:
|
|
@@ -184,38 +225,12 @@ var StandardInteractionClient = /** @class */ (function (_super) {
|
|
|
184
225
|
protocolMode: this.config.auth.protocolMode,
|
|
185
226
|
knownAuthorities: this.config.auth.knownAuthorities,
|
|
186
227
|
cloudDiscoveryMetadata: this.config.auth.cloudDiscoveryMetadata,
|
|
187
|
-
authorityMetadata: this.config.auth.authorityMetadata
|
|
228
|
+
authorityMetadata: this.config.auth.authorityMetadata,
|
|
188
229
|
};
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(requestAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions)];
|
|
192
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
193
|
-
case 2:
|
|
230
|
+
userAuthority = requestAuthority ? requestAuthority : this.config.auth.authority;
|
|
231
|
+
builtAuthority = Authority.generateAuthority(userAuthority, requestAzureCloudOptions || this.config.auth.azureCloudOptions);
|
|
194
232
|
this.logger.verbose("Creating discovered authority with configured authority");
|
|
195
|
-
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(
|
|
196
|
-
case 3: return [2 /*return*/, _a.sent()];
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
};
|
|
201
|
-
/**
|
|
202
|
-
* Helper to validate app environment before making a request.
|
|
203
|
-
* @param request
|
|
204
|
-
* @param interactionType
|
|
205
|
-
*/
|
|
206
|
-
StandardInteractionClient.prototype.preflightInteractiveRequest = function (request, interactionType) {
|
|
207
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
208
|
-
return __generator(this, function (_a) {
|
|
209
|
-
switch (_a.label) {
|
|
210
|
-
case 0:
|
|
211
|
-
this.logger.verbose("preflightInteractiveRequest called, validating app environment", request === null || request === void 0 ? void 0 : request.correlationId);
|
|
212
|
-
// block the reload if it occurred inside a hidden iframe
|
|
213
|
-
BrowserUtils.blockReloadInHiddenIframes();
|
|
214
|
-
// Check if interaction is in progress. Throw error if true.
|
|
215
|
-
if (this.browserStorage.isInteractionInProgress(false)) {
|
|
216
|
-
throw BrowserAuthError.createInteractionInProgressError();
|
|
217
|
-
}
|
|
218
|
-
return [4 /*yield*/, this.initializeAuthorizationRequest(request, interactionType)];
|
|
233
|
+
return [4 /*yield*/, AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions)];
|
|
219
234
|
case 1: return [2 /*return*/, _a.sent()];
|
|
220
235
|
}
|
|
221
236
|
});
|
|
@@ -237,7 +252,7 @@ var StandardInteractionClient = /** @class */ (function (_super) {
|
|
|
237
252
|
browserState = {
|
|
238
253
|
interactionType: interactionType
|
|
239
254
|
};
|
|
240
|
-
state = ProtocolUtils.setRequestState(this.browserCrypto, (request && request.state) ||
|
|
255
|
+
state = ProtocolUtils.setRequestState(this.browserCrypto, (request && request.state) || Constants.EMPTY_STRING, browserState);
|
|
241
256
|
_a = [{}];
|
|
242
257
|
return [4 /*yield*/, this.initializeBaseRequest(request)];
|
|
243
258
|
case 1:
|
|
@@ -255,7 +270,6 @@ var StandardInteractionClient = /** @class */ (function (_super) {
|
|
|
255
270
|
validatedRequest.loginHint = legacyLoginHint;
|
|
256
271
|
}
|
|
257
272
|
}
|
|
258
|
-
this.browserStorage.updateCacheEntries(validatedRequest.state, validatedRequest.nonce, validatedRequest.authority, validatedRequest.loginHint || "", validatedRequest.account || null);
|
|
259
273
|
return [2 /*return*/, validatedRequest];
|
|
260
274
|
}
|
|
261
275
|
});
|
|
@@ -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 { ICrypto, Logger, ServerTelemetryManager, CommonAuthorizationCodeRequest, Constants, AuthorizationCodeClient, ClientConfiguration, AuthorityOptions, Authority, AuthorityFactory, ServerAuthorizationCodeResponse, UrlString, CommonEndSessionRequest, ProtocolUtils, ResponseMode, StringUtils } from \"@azure/msal-common\";\nimport { BaseInteractionClient } from \"./BaseInteractionClient\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\nimport { AuthorizationUrlRequest } from \"../request/AuthorizationUrlRequest\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { EventHandler } from \"../event/EventHandler\";\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 { INavigationClient } from \"../navigation/INavigationClient\";\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 protected navigationClient: INavigationClient;\n\n constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, correlationId?: string) {\n super(config, storageImpl, browserCrypto, logger, eventHandler, correlationId);\n this.navigationClient = navigationClient;\n }\n \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: \"\",\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 // Check if interaction is in progress. Throw error if true.\n if (this.browserStorage.isInteractionInProgress()) {\n throw BrowserAuthError.createInteractionInProgressError();\n }\n\n const validLogoutRequest: CommonEndSessionRequest = {\n correlationId: this.browserCrypto.createNewGuid(),\n ...logoutRequest\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 * 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): Promise<AuthorizationCodeClient> {\n // Create auth module.\n const clientConfig = await this.getClientConfiguration(serverTelemetryManager, authorityUrl);\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): Promise<ClientConfiguration> {\n this.logger.verbose(\"getClientConfiguration called\");\n const discoveredAuthority = await this.getDiscoveredAuthority(requestAuthority);\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: \"\",\n os: \"\"\n }\n };\n }\n\n /**\n * @param hash\n * @param interactionType\n */\n protected validateAndExtractStateFromHash(hash: string, interactionType: InteractionType, requestCorrelationId?: string): string {\n this.logger.verbose(\"validateAndExtractStateFromHash called\", requestCorrelationId);\n // Deserialize hash fragment response parameters.\n const serverParams: ServerAuthorizationCodeResponse = UrlString.getDeserializedHash(hash);\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): 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 /**\n * Helper to validate app environment before making a request.\n * @param request\n * @param interactionType\n */\n protected async preflightInteractiveRequest(request: RedirectRequest|PopupRequest, interactionType: InteractionType): Promise<AuthorizationUrlRequest> {\n this.logger.verbose(\"preflightInteractiveRequest called, validating app environment\", request?.correlationId);\n // block the reload if it occurred inside a hidden iframe\n BrowserUtils.blockReloadInHiddenIframes();\n \n // Check if interaction is in progress. Throw error if true.\n if (this.browserStorage.isInteractionInProgress(false)) {\n throw BrowserAuthError.createInteractionInProgressError();\n }\n \n return await this.initializeAuthorizationRequest(request, interactionType);\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\");\n const redirectUri = this.getRedirectUri(request.redirectUri);\n const browserState: BrowserStateObject = {\n interactionType: interactionType\n };\n\n const state = ProtocolUtils.setRequestState(\n this.browserCrypto,\n (request && request.state) || \"\",\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\");\n this.logger.verbosePii(`Setting validated request account: ${account}`);\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 this.browserStorage.updateCacheEntries(validatedRequest.state, validatedRequest.nonce, validatedRequest.authority, validatedRequest.loginHint || \"\", validatedRequest.account || null);\n\n return validatedRequest;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;AAsBA;;;;IAGwD,6CAAqB;IAGzE,mCAAY,MAA4B,EAAE,WAAgC,EAAE,aAAsB,EAAE,MAAc,EAAE,YAA0B,EAAE,gBAAmC,EAAE,aAAsB;QAA3M,YACI,kBAAM,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,CAAC,SAEjF;QADG,KAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;;KAC5C;;;;;IAMe,sEAAkC,GAAlD,U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AAI,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,CAAC,CAAC;4BACzD,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,wCAAsC,OAAS,CAAC,CAAC;4BACxE,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,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,CAAC,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,EAAE,EAAE,gBAAgB,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;wBAEvL,sBAAO,gBAAgB,EAAC;;;;KAC3B;IACL,gCAAC;AAAD,CAvOA,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 { ICrypto, Logger, ServerTelemetryManager, CommonAuthorizationCodeRequest, Constants, AuthorizationCodeClient, ClientConfiguration, AuthorityOptions, Authority, AuthorityFactory, ServerAuthorizationCodeResponse, UrlString, CommonEndSessionRequest, ProtocolUtils, ResponseMode, StringUtils, IdTokenClaims, AccountInfo, AzureCloudOptions } from \"@azure/msal-common\";\nimport { BaseInteractionClient } from \"./BaseInteractionClient\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\nimport { AuthorizationUrlRequest } from \"../request/AuthorizationUrlRequest\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { EventHandler } from \"../event/EventHandler\";\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 { INavigationClient } from \"../navigation/INavigationClient\";\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 protected navigationClient: INavigationClient;\n\n constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, correlationId?: string) {\n super(config, storageImpl, browserCrypto, logger, eventHandler, correlationId);\n this.navigationClient = navigationClient;\n }\n\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: \"\",\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.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\");\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: \"\",\n os: \"\"\n }\n };\n }\n\n /**\n * @param hash\n * @param interactionType\n */\n protected validateAndExtractStateFromHash(hash: string, interactionType: InteractionType, requestCorrelationId?: string): string {\n this.logger.verbose(\"validateAndExtractStateFromHash called\", requestCorrelationId);\n // Deserialize hash fragment response parameters.\n const serverParams: ServerAuthorizationCodeResponse = UrlString.getDeserializedHash(hash);\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\");\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 // 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\");\n return await AuthorityFactory.createDiscoveredInstance(builtAuthority, this.config.system.networkClient, this.browserStorage, authorityOptions);\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\");\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\");\n this.logger.verbosePii(`Setting validated request account: ${account}`);\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;;;;AAsBA;;;;IAGwD,6CAAqB;IAGzE,mCAAY,MAA4B,EAAE,WAAgC,EAAE,aAAsB,EAAE,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yBACJ;wBAED,sBAAO,gBAAgB,EAAC;;;;KAC3B;IACL,gCAAC;AAAD,CAxPA,CAAwD,qBAAqB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupHandler.d.ts","sourceRoot":"","sources":["../../src/interaction_handler/PopupHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAA0B,8BAA8B,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC7H,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAc,MAAM,qBAAqB,CAAC;AAGxE,oBAAY,WAAW,GAAG,iBAAiB,GAAG;IAC1C,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,qBAAqB,CAAA;CAC/C,CAAC;AAEF;;;GAGG;AACH,qBAAa,YAAa,SAAQ,kBAAkB;IAChD,OAAO,CAAC,UAAU,CAAa;gBAEnB,cAAc,EAAE,uBAAuB,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,8BAA8B,EAAE,oBAAoB,EAAE,MAAM;IAOpK;;;OAGG;IACH,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"PopupHandler.d.ts","sourceRoot":"","sources":["../../src/interaction_handler/PopupHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAA0B,8BAA8B,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC7H,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAc,MAAM,qBAAqB,CAAC;AAGxE,oBAAY,WAAW,GAAG,iBAAiB,GAAG;IAC1C,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,qBAAqB,CAAA;CAC/C,CAAC;AAEF;;;GAGG;AACH,qBAAa,YAAa,SAAQ,kBAAkB;IAChD,OAAO,CAAC,UAAU,CAAa;gBAEnB,cAAc,EAAE,uBAAuB,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,8BAA8B,EAAE,oBAAoB,EAAE,MAAM;IAOpK;;;OAGG;IACH,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM;IAapE;;;;OAIG;IACH,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAkB5D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v2.
|
|
1
|
+
/*! @azure/msal-browser v2.22.0 2022-02-08 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { __extends } from '../_virtual/_tslib.js';
|
|
4
4
|
import { StringUtils, UrlString } from '@azure/msal-common';
|
|
@@ -30,8 +30,6 @@ var PopupHandler = /** @class */ (function (_super) {
|
|
|
30
30
|
PopupHandler.prototype.initiateAuthRequest = function (requestUrl, params) {
|
|
31
31
|
// Check that request url is not empty.
|
|
32
32
|
if (!StringUtils.isEmpty(requestUrl)) {
|
|
33
|
-
// Set interaction status in the library.
|
|
34
|
-
this.browserStorage.setInteractionInProgress(true);
|
|
35
33
|
this.browserRequestLogger.infoPii("Navigate to: " + requestUrl);
|
|
36
34
|
// Open the popup window to requestUrl.
|
|
37
35
|
return this.popupUtils.openPopup(requestUrl, params);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupHandler.js","sources":["../../src/interaction_handler/PopupHandler.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UrlString, StringUtils, CommonAuthorizationCodeRequest, AuthorizationCodeClient, Logger } from \"@azure/msal-common\";\nimport { InteractionHandler, InteractionParams } from \"./InteractionHandler\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { PopupWindowAttributes, PopupUtils } from \"../utils/PopupUtils\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\n\nexport type PopupParams = InteractionParams & {\n popup?: Window|null;\n popupName: string;\n popupWindowAttributes: PopupWindowAttributes\n};\n\n/**\n * This class implements the interaction handler base class for browsers. It is written specifically for handling\n * popup window scenarios. It includes functions for monitoring the popup window for a hash.\n */\nexport class PopupHandler extends InteractionHandler {\n private popupUtils: PopupUtils;\n\n constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserCacheManager, authCodeRequest: CommonAuthorizationCodeRequest, browserRequestLogger: Logger) {\n super(authCodeModule, storageImpl, authCodeRequest, browserRequestLogger);\n\n // Properly sets this reference for the unload event.\n this.popupUtils = new PopupUtils(storageImpl, browserRequestLogger);\n }\n\n /**\n * Opens a popup window with given request Url.\n * @param requestUrl\n */\n initiateAuthRequest(requestUrl: string, params: PopupParams): Window {\n // Check that request url is not empty.\n if (!StringUtils.isEmpty(requestUrl)) {\n
|
|
1
|
+
{"version":3,"file":"PopupHandler.js","sources":["../../src/interaction_handler/PopupHandler.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UrlString, StringUtils, CommonAuthorizationCodeRequest, AuthorizationCodeClient, Logger } from \"@azure/msal-common\";\nimport { InteractionHandler, InteractionParams } from \"./InteractionHandler\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { PopupWindowAttributes, PopupUtils } from \"../utils/PopupUtils\";\nimport { BrowserUtils } from \"../utils/BrowserUtils\";\n\nexport type PopupParams = InteractionParams & {\n popup?: Window|null;\n popupName: string;\n popupWindowAttributes: PopupWindowAttributes\n};\n\n/**\n * This class implements the interaction handler base class for browsers. It is written specifically for handling\n * popup window scenarios. It includes functions for monitoring the popup window for a hash.\n */\nexport class PopupHandler extends InteractionHandler {\n private popupUtils: PopupUtils;\n\n constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserCacheManager, authCodeRequest: CommonAuthorizationCodeRequest, browserRequestLogger: Logger) {\n super(authCodeModule, storageImpl, authCodeRequest, browserRequestLogger);\n\n // Properly sets this reference for the unload event.\n this.popupUtils = new PopupUtils(storageImpl, browserRequestLogger);\n }\n\n /**\n * Opens a popup window with given request Url.\n * @param requestUrl\n */\n initiateAuthRequest(requestUrl: string, params: PopupParams): Window {\n // Check that request url is not empty.\n if (!StringUtils.isEmpty(requestUrl)) {\n this.browserRequestLogger.infoPii(`Navigate to: ${requestUrl}`);\n // Open the popup window to requestUrl.\n return this.popupUtils.openPopup(requestUrl, params);\n } else {\n // Throw error if request URL is empty.\n this.browserRequestLogger.error(\"Navigate url is empty\");\n throw BrowserAuthError.createEmptyNavigationUriError();\n }\n }\n\n /**\n * Monitors a window until it loads a url with a known hash, or hits a specified timeout.\n * @param popupWindow - window that is being monitored\n * @param timeout - milliseconds until timeout\n */\n monitorPopupForHash(popupWindow: Window): Promise<string> {\n return this.popupUtils.monitorPopupForSameOrigin(popupWindow).then(() => {\n const contentHash = popupWindow.location.hash;\n BrowserUtils.clearHash(popupWindow);\n this.popupUtils.cleanPopup(popupWindow);\n\n if (!contentHash) {\n throw BrowserAuthError.createEmptyHashError(popupWindow.location.href);\n }\n\n if (UrlString.hashContainsKnownProperties(contentHash)) {\n return contentHash;\n } else {\n throw BrowserAuthError.createHashDoesNotContainKnownPropertiesError();\n }\n }\n );\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;AAkBA;;;;;IAIkC,gCAAkB;IAGhD,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mBAAC;AAAD,CAlDA,CAAkC,kBAAkB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedirectHandler.d.ts","sourceRoot":"","sources":["../../src/interaction_handler/RedirectHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAe,8BAA8B,EAAE,OAAO,EAAE,oBAAoB,EAAmB,SAAS,EAAE,cAAc,EAAmB,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG9M,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,oBAAY,cAAc,GAAG,iBAAiB,GAAG;IAC7C,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC;CACxD,CAAC;AAEF,qBAAa,eAAgB,SAAQ,kBAAkB;IAEnD,OAAO,CAAC,aAAa,CAAU;gBAEnB,cAAc,EAAE,uBAAuB,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,8BAA8B,EAAE,oBAAoB,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO;IAK5L;;;OAGG;IACG,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"RedirectHandler.d.ts","sourceRoot":"","sources":["../../src/interaction_handler/RedirectHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAe,8BAA8B,EAAE,OAAO,EAAE,oBAAoB,EAAmB,SAAS,EAAE,cAAc,EAAmB,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG9M,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,oBAAY,cAAc,GAAG,iBAAiB,GAAG;IAC7C,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC;CACxD,CAAC;AAEF,qBAAa,eAAgB,SAAQ,kBAAkB;IAEnD,OAAO,CAAC,aAAa,CAAU;gBAEnB,cAAc,EAAE,uBAAuB,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,8BAA8B,EAAE,oBAAoB,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO;IAK5L;;;OAGG;IACG,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA+CpF;;;OAGG;IACG,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAuD/K"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v2.
|
|
1
|
+
/*! @azure/msal-browser v2.22.0 2022-02-08 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { __extends, __awaiter, __generator } from '../_virtual/_tslib.js';
|
|
4
4
|
import { StringUtils, ThrottlingUtils, ClientAuthError } from '@azure/msal-common';
|
|
@@ -35,7 +35,6 @@ var RedirectHandler = /** @class */ (function (_super) {
|
|
|
35
35
|
this.browserStorage.setTemporaryCache(TemporaryCacheKeys.ORIGIN_URI, params.redirectStartPage, true);
|
|
36
36
|
}
|
|
37
37
|
// Set interaction status in the library.
|
|
38
|
-
this.browserStorage.setInteractionInProgress(true);
|
|
39
38
|
this.browserStorage.setTemporaryCache(TemporaryCacheKeys.CORRELATION_ID, this.authCodeRequest.correlationId, true);
|
|
40
39
|
this.browserStorage.cacheCodeRequest(this.authCodeRequest, this.browserCrypto);
|
|
41
40
|
this.browserRequestLogger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: " + requestUrl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedirectHandler.js","sources":["../../src/interaction_handler/RedirectHandler.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthorizationCodeClient, StringUtils, CommonAuthorizationCodeRequest, ICrypto, AuthenticationResult, ThrottlingUtils, Authority, INetworkModule, ClientAuthError, Logger } from \"@azure/msal-common\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { ApiId, TemporaryCacheKeys } from \"../utils/BrowserConstants\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { InteractionHandler, InteractionParams } from \"./InteractionHandler\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { NavigationOptions } from \"../navigation/NavigationOptions\";\n\nexport type RedirectParams = InteractionParams & {\n navigationClient: INavigationClient;\n redirectTimeout: number;\n redirectStartPage: string;\n onRedirectNavigate?: (url: string) => void | boolean;\n};\n\nexport class RedirectHandler extends InteractionHandler {\n\n private browserCrypto: ICrypto;\n\n constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserCacheManager, authCodeRequest: CommonAuthorizationCodeRequest, browserRequestLogger: Logger, browserCrypto: ICrypto) {\n super(authCodeModule, storageImpl, authCodeRequest, browserRequestLogger);\n this.browserCrypto = browserCrypto;\n }\n\n /**\n * Redirects window to given URL.\n * @param urlNavigate\n */\n async initiateAuthRequest(requestUrl: string, params: RedirectParams): Promise<void> {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest called\");\n // Navigate if valid URL\n if (!StringUtils.isEmpty(requestUrl)) {\n // Cache start page, returns to this page after redirectUri if navigateToLoginRequestUrl is true\n if (params.redirectStartPage) {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page\");\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.ORIGIN_URI, params.redirectStartPage, true);\n }\n\n // Set interaction status in the library.\n this.browserStorage.setInteractionInProgress(true);\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.CORRELATION_ID, this.authCodeRequest.correlationId, true);\n this.browserStorage.cacheCodeRequest(this.authCodeRequest, this.browserCrypto);\n this.browserRequestLogger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${requestUrl}`);\n const navigationOptions: NavigationOptions = {\n apiId: ApiId.acquireTokenRedirect,\n timeout: params.redirectTimeout,\n noHistory: false\n };\n \n // If onRedirectNavigate is implemented, invoke it and provide requestUrl\n if (typeof params.onRedirectNavigate === \"function\") {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback\");\n const navigate = params.onRedirectNavigate(requestUrl);\n\n // Returning false from onRedirectNavigate will stop navigation\n if (navigate !== false) {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating\");\n await params.navigationClient.navigateExternal(requestUrl, navigationOptions);\n return;\n } else {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation\");\n return;\n }\n } else {\n // Navigate window to request URL\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: Navigating window to navigate url\");\n await params.navigationClient.navigateExternal(requestUrl, navigationOptions);\n return;\n }\n } else {\n // Throw error if request URL is empty.\n this.browserRequestLogger.info(\"RedirectHandler.initiateAuthRequest: Navigate url is empty\");\n throw BrowserAuthError.createEmptyNavigationUriError();\n }\n }\n\n /**\n * Handle authorization code response in the window.\n * @param hash\n */\n async handleCodeResponseFromHash(locationHash: string, state: string, authority: Authority, networkModule: INetworkModule, clientId?: string): Promise<AuthenticationResult> {\n this.browserRequestLogger.verbose(\"RedirectHandler.handleCodeResponse called\");\n\n // Check that location hash isn't empty.\n if (StringUtils.isEmpty(locationHash)) {\n throw BrowserAuthError.createEmptyHashError(locationHash);\n }\n\n // Interaction is completed - remove interaction status.\n this.browserStorage.setInteractionInProgress(false);\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 const authCodeResponse = this.authModule.handleFragmentResponse(locationHash, requestState);\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 authCodeResponse.nonce = cachedNonce || undefined;\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 // Remove throttle if it exists\n if (clientId) {\n ThrottlingUtils.removeThrottle(this.browserStorage, clientId, this.authCodeRequest);\n }\n\n // Acquire token with retrieved code.\n const tokenResponse = await this.authModule.acquireToken(this.authCodeRequest, authCodeResponse);\n\n this.browserStorage.cleanRequestByState(state);\n return tokenResponse;\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;IAoBqC,mCAAkB;IAInD,yBAAY,cA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E;wBAEhG,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;wBAC/C,sBAAO,aAAa,EAAC;;;;KACxB;IACL,sBAAC;AAAD,CAxHA,CAAqC,kBAAkB;;;;"}
|
|
1
|
+
{"version":3,"file":"RedirectHandler.js","sources":["../../src/interaction_handler/RedirectHandler.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthorizationCodeClient, StringUtils, CommonAuthorizationCodeRequest, ICrypto, AuthenticationResult, ThrottlingUtils, Authority, INetworkModule, ClientAuthError, Logger } from \"@azure/msal-common\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\nimport { ApiId, TemporaryCacheKeys } from \"../utils/BrowserConstants\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { InteractionHandler, InteractionParams } from \"./InteractionHandler\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { NavigationOptions } from \"../navigation/NavigationOptions\";\n\nexport type RedirectParams = InteractionParams & {\n navigationClient: INavigationClient;\n redirectTimeout: number;\n redirectStartPage: string;\n onRedirectNavigate?: (url: string) => void | boolean;\n};\n\nexport class RedirectHandler extends InteractionHandler {\n\n private browserCrypto: ICrypto;\n\n constructor(authCodeModule: AuthorizationCodeClient, storageImpl: BrowserCacheManager, authCodeRequest: CommonAuthorizationCodeRequest, browserRequestLogger: Logger, browserCrypto: ICrypto) {\n super(authCodeModule, storageImpl, authCodeRequest, browserRequestLogger);\n this.browserCrypto = browserCrypto;\n }\n\n /**\n * Redirects window to given URL.\n * @param urlNavigate\n */\n async initiateAuthRequest(requestUrl: string, params: RedirectParams): Promise<void> {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest called\");\n // Navigate if valid URL\n if (!StringUtils.isEmpty(requestUrl)) {\n // Cache start page, returns to this page after redirectUri if navigateToLoginRequestUrl is true\n if (params.redirectStartPage) {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page\");\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.ORIGIN_URI, params.redirectStartPage, true);\n }\n\n // Set interaction status in the library.\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.CORRELATION_ID, this.authCodeRequest.correlationId, true);\n this.browserStorage.cacheCodeRequest(this.authCodeRequest, this.browserCrypto);\n this.browserRequestLogger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${requestUrl}`);\n const navigationOptions: NavigationOptions = {\n apiId: ApiId.acquireTokenRedirect,\n timeout: params.redirectTimeout,\n noHistory: false\n };\n \n // If onRedirectNavigate is implemented, invoke it and provide requestUrl\n if (typeof params.onRedirectNavigate === \"function\") {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback\");\n const navigate = params.onRedirectNavigate(requestUrl);\n\n // Returning false from onRedirectNavigate will stop navigation\n if (navigate !== false) {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating\");\n await params.navigationClient.navigateExternal(requestUrl, navigationOptions);\n return;\n } else {\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation\");\n return;\n }\n } else {\n // Navigate window to request URL\n this.browserRequestLogger.verbose(\"RedirectHandler.initiateAuthRequest: Navigating window to navigate url\");\n await params.navigationClient.navigateExternal(requestUrl, navigationOptions);\n return;\n }\n } else {\n // Throw error if request URL is empty.\n this.browserRequestLogger.info(\"RedirectHandler.initiateAuthRequest: Navigate url is empty\");\n throw BrowserAuthError.createEmptyNavigationUriError();\n }\n }\n\n /**\n * Handle authorization code response in the window.\n * @param hash\n */\n async handleCodeResponseFromHash(locationHash: string, state: string, authority: Authority, networkModule: INetworkModule, clientId?: string): Promise<AuthenticationResult> {\n this.browserRequestLogger.verbose(\"RedirectHandler.handleCodeResponse called\");\n\n // Check that location hash isn't empty.\n if (StringUtils.isEmpty(locationHash)) {\n throw BrowserAuthError.createEmptyHashError(locationHash);\n }\n\n // Interaction is completed - remove interaction status.\n this.browserStorage.setInteractionInProgress(false);\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 const authCodeResponse = this.authModule.handleFragmentResponse(locationHash, requestState);\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 authCodeResponse.nonce = cachedNonce || undefined;\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 // Remove throttle if it exists\n if (clientId) {\n ThrottlingUtils.removeThrottle(this.browserStorage, clientId, this.authCodeRequest);\n }\n\n // Acquire token with retrieved code.\n const tokenResponse = await this.authModule.acquireToken(this.authCodeRequest, authCodeResponse);\n\n this.browserStorage.cleanRequestByState(state);\n return tokenResponse;\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;IAoBqC,mCAAkB;IAInD,yBAAY,cAAuC,EAAE,WAAgC,EAAE,eAA+C,EAAE,oBAA4B,EAAE,aAAsB;QAA5L,YACI,kBAAM,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,oBAAoB,CAAC,SAE5E;QADG,KAAI,CAAC,aAAa,GAAG,aAAa,CAAC;;KACtC;;;;;IAMK,6CAAmB,GAAzB,UAA0B,UAAkB,EAAE,MAA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
|
|
3
3
|
/* eslint-disable header/header */
|
|
4
4
|
var name = "@azure/msal-browser";
|
|
5
|
-
var version = "2.
|
|
5
|
+
var version = "2.22.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.
|
|
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.22.0\";\n"],"names":[],"mappings":";;AAAA;IACa,IAAI,GAAG,sBAAsB;IAC7B,OAAO,GAAG;;;;"}
|
|
@@ -9,6 +9,7 @@ import { PopupWindowAttributes } from "../utils/PopupUtils";
|
|
|
9
9
|
* - idTokenHint - ID Token used by B2C to validate logout if required by the policy
|
|
10
10
|
* - mainWindowRedirectUri - URI to navigate the main window to after logout is complete
|
|
11
11
|
* - popupWindowAttributes - Optional popup window attributes. popupSize with height and width, and popupPosition with top and left can be set.
|
|
12
|
+
* - logoutHint - A string that specifies the account that is being logged out in order to skip the server account picker on logout
|
|
12
13
|
*/
|
|
13
14
|
export declare type EndSessionPopupRequest = Partial<CommonEndSessionRequest> & {
|
|
14
15
|
authority?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EndSessionPopupRequest.d.ts","sourceRoot":"","sources":["../../src/request/EndSessionPopupRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"EndSessionPopupRequest.d.ts","sourceRoot":"","sources":["../../src/request/EndSessionPopupRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;;;;;;;;GAUG;AACH,oBAAY,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC,GAAG;IACpE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CACjD,CAAC"}
|
|
@@ -7,6 +7,7 @@ import { CommonEndSessionRequest } from "@azure/msal-common";
|
|
|
7
7
|
* - correlationId - Unique GUID set per request to trace a request end-to-end for telemetry purposes.
|
|
8
8
|
* - idTokenHint - ID Token used by B2C to validate logout if required by the policy
|
|
9
9
|
* - onRedirectNavigate - Callback that will be passed the url that MSAL will navigate to. Returning false in the callback will stop navigation.
|
|
10
|
+
* - logoutHint - A string that specifies the account that is being logged out in order to skip the server account picker on logout
|
|
10
11
|
*/
|
|
11
12
|
export declare type EndSessionRequest = Partial<CommonEndSessionRequest> & {
|
|
12
13
|
authority?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EndSessionRequest.d.ts","sourceRoot":"","sources":["../../src/request/EndSessionRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7D
|
|
1
|
+
{"version":3,"file":"EndSessionRequest.d.ts","sourceRoot":"","sources":["../../src/request/EndSessionRequest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7D;;;;;;;;;GASG;AACH,oBAAY,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC,GAAG;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,CAAC;CACxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserConstants.d.ts","sourceRoot":"","sources":["../../src/utils/BrowserConstants.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,gBAAgB;IACzB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEN,CAAC;AAEF,oBAAY,oBAAoB;IAC5B,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;CAClC;AAED;;GAEG;AACH,oBAAY,iBAAiB;IACzB,GAAG,QAAQ;IACX,IAAI,SAAS;CAChB;AAED;;GAEG;AACH,oBAAY,kBAAkB;IAC1B,SAAS,cAAc;IACvB,qBAAqB,yBAAyB;IAC9C,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,aAAa,mBAAmB;IAChC,UAAU,mBAAmB;IAC7B,YAAY,uBAAuB;IACnC,QAAQ,YAAY;IACpB,cAAc,mBAAmB;IACjC,MAAM,WAAW;IACjB,sBAAsB,uBAAuB;IAC7C,cAAc,mBAAmB;IACjC,cAAc,0BAA0B;CAC3C;AAED;;GAEG;AACH,oBAAY,iBAAiB;IACzB,WAAW,gBAAgB;IAC3B,WAAW,oBAAoB;CAClC;AAED;;;;;GAKG;AACH,oBAAY,KAAK;IACb,oBAAoB,MAAM;IAC1B,iBAAiB,MAAM;IACvB,SAAS,MAAM;IACf,2BAA2B,MAAM;IACjC,qBAAqB,MAAM;IAC3B,kBAAkB,MAAM;IACxB,6BAA6B,KAAK;IAClC,MAAM,MAAM;IACZ,WAAW,MAAM;CACpB;AAKD,oBAAY,eAAe;IACvB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"Br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OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,KAAK,UAAU;IACf;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,YAAY,iBAAiB;IAC7B;;OAEG;IACH,SAAS,cAAc;IACvB;;OAEG;IACH,cAAc,mBAAmB;IACjC;;OAEG;IACH,IAAI,SAAS;CAChB;AAED,eAAO,MAAM,eAAe,EAAE,eAAe,GAAC,YAE7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,QAAQ,CAAC;AAGpC,oBAAY,UAAU;IAClB,KAAK,sBAAsB;IAC3B,OAAO,wBAAwB;CAClC;AAGD,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,aAAa,QAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @azure/msal-browser v2.
|
|
1
|
+
/*! @azure/msal-browser v2.22.0 2022-02-08 */
|
|
2
2
|
'use strict';
|
|
3
3
|
import { OIDC_DEFAULT_SCOPES } from '@azure/msal-common';
|
|
4
4
|
|
|
@@ -106,6 +106,7 @@ var InteractionType;
|
|
|
106
106
|
InteractionType["Redirect"] = "redirect";
|
|
107
107
|
InteractionType["Popup"] = "popup";
|
|
108
108
|
InteractionType["Silent"] = "silent";
|
|
109
|
+
InteractionType["None"] = "none";
|
|
109
110
|
})(InteractionType || (InteractionType = {}));
|
|
110
111
|
/**
|
|
111
112
|
* Types of interaction currently in progress.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserConstants.js","sources":["../../src/utils/BrowserConstants.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { OIDC_DEFAULT_SCOPES } from \"@azure/msal-common\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\n\n/**\n * Constants\n */\nexport const BrowserConstants = {\n /**\n * Interaction in progress cache value\n */\n INTERACTION_IN_PROGRESS_VALUE: \"interaction_in_progress\",\n /**\n * Invalid grant error code\n */\n INVALID_GRANT_ERROR: \"invalid_grant\",\n /**\n * Default popup window width\n */\n POPUP_WIDTH: 483,\n /**\n * Default popup window height\n */\n POPUP_HEIGHT: 600,\n /**\n * Name of the popup window starts with\n */\n POPUP_NAME_PREFIX: \"msal\",\n /**\n * Default popup monitor poll interval in milliseconds\n */\n POLL_INTERVAL_MS: 50,\n /**\n * Msal-browser SKU\n */\n MSAL_SKU: \"msal.js.browser\",\n};\n\nexport enum BrowserCacheLocation {\n LocalStorage = \"localStorage\",\n SessionStorage = \"sessionStorage\",\n MemoryStorage = \"memoryStorage\"\n}\n\n/**\n * HTTP Request types supported by MSAL.\n */\nexport enum HTTP_REQUEST_TYPE {\n GET = \"GET\",\n POST = \"POST\"\n}\n\n/**\n * Temporary cache keys for MSAL, deleted after any request.\n */\nexport enum TemporaryCacheKeys {\n AUTHORITY = \"authority\",\n ACQUIRE_TOKEN_ACCOUNT = \"acquireToken.account\",\n SESSION_STATE = \"session.state\",\n REQUEST_STATE = \"request.state\",\n NONCE_IDTOKEN = \"nonce.id_token\",\n ORIGIN_URI = \"request.origin\",\n RENEW_STATUS = \"token.renew.status\",\n URL_HASH = \"urlHash\",\n REQUEST_PARAMS = \"request.params\",\n SCOPES = \"scopes\",\n INTERACTION_STATUS_KEY = \"interaction.status\",\n CCS_CREDENTIAL = \"ccs.credential\",\n CORRELATION_ID = \"request.correlationId\"\n}\n\n/**\n * Cache keys stored in-memory\n */\nexport enum InMemoryCacheKeys {\n WRAPPER_SKU = \"wrapper.sku\",\n WRAPPER_VER = \"wrapper.version\"\n}\n\n/**\n * API Codes for Telemetry purposes. \n * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs\n * 0-99 Silent Flow\n * 800-899 Auth Code Flow\n */\nexport enum ApiId {\n acquireTokenRedirect = 861,\n acquireTokenPopup = 862,\n ssoSilent = 863,\n acquireTokenSilent_authCode = 864,\n handleRedirectPromise = 865,\n acquireTokenByCode = 866,\n acquireTokenSilent_silentFlow = 61,\n logout = 961,\n logoutPopup = 962\n}\n\n/*\n * Interaction type of the API - used for state and telemetry\n */\nexport enum InteractionType {\n Redirect = \"redirect\",\n Popup = \"popup\",\n Silent = \"silent\"\n}\n\n/**\n * Types of interaction currently in progress.\n * Used in events in wrapper libraries to invoke functions when certain interaction is in progress or all interactions are complete.\n */\nexport enum InteractionStatus {\n /**\n * Initial status before interaction occurs\n */\n Startup = \"startup\",\n /**\n * Status set when all login calls occuring\n */\n Login = \"login\",\n /**\n * Status set when logout call occuring\n */ \n Logout = \"logout\",\n /**\n * Status set for acquireToken calls\n */\n AcquireToken = \"acquireToken\",\n /**\n * Status set for ssoSilent calls\n */\n SsoSilent = \"ssoSilent\",\n /**\n * Status set when handleRedirect in progress\n */\n HandleRedirect = \"handleRedirect\",\n /**\n * Status set when interaction is complete\n */\n None = \"none\"\n}\n\nexport const DEFAULT_REQUEST: RedirectRequest|PopupRequest = {\n scopes: OIDC_DEFAULT_SCOPES\n};\n\n/**\n * JWK Key Format string (Type MUST be defined for window crypto APIs)\n */\nexport const KEY_FORMAT_JWK = \"jwk\";\n\n// Supported wrapper SKUs\nexport enum WrapperSKU {\n React = \"@azure/msal-react\",\n Angular = \"@azure/msal-angular\"\n}\n\n// DatabaseStorage Constants\nexport const DB_NAME = \"msal.db\";\nexport const DB_VERSION = 1;\nexport const DB_TABLE_NAME = `${DB_NAME}.keys`;\n"],"names":[],"mappings":";;;;AAAA;;;;AASA;;;IAGa,gBAAgB,GAAG;;;;IAI5B,6BAA6B,EAAE,yBAAyB;;;;IAIxD,mBAAmB,EAAE,eAAe;;;;IAIpC,WAAW,EAAE,GAAG;;;;IAIhB,YAAY,EAAE,GAAG;;;;IAIjB,iBAAiB,EAAE,MAAM;;;;IAIzB,gBAAgB,EAAE,EAAE;;;;IAIpB,QAAQ,EAAE,iBAAiB;EAC7B;IAEU;AAAZ,WAAY,oBAAoB;IAC5B,qDAA6B,CAAA;IAC7B,yDAAiC,CAAA;IACjC,uDAA+B,CAAA;AACnC,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAED;;;IAGY;AAAZ,WAAY,iBAAiB;IACzB,gCAAW,CAAA;IACX,kCAAa,CAAA;AACjB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED;;;IAGY;AAAZ,WAAY,kBAAkB;IAC1B,6CAAuB,CAAA;IACvB,oEAA8C,CAAA;IAC9C,qDAA+B,CAAA;IAC/B,qDAA+B,CAAA;IAC/B,sDAAgC,CAAA;IAChC,mDAA6B,CAAA;IAC7B,yDAAmC,CAAA;IACnC,0CAAoB,CAAA;IACpB,uDAAiC,CAAA;IACjC,uCAAiB,CAAA;IACjB,mEAA6C,CAAA;IAC7C,uDAAiC,CAAA;IACjC,8DAAwC,CAAA;AAC5C,CAAC,EAdW,kBAAkB,KAAlB,kBAAkB,QAc7B;AAED;;;IAGY;AAAZ,WAAY,iBAAiB;IACzB,gDAA2B,CAAA;IAC3B,oDAA+B,CAAA;AACnC,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED;;;;;;IAMY;AAAZ,WAAY,KAAK;IACb,mEAA0B,CAAA;IAC1B,6DAAuB,CAAA;IACvB,6CAAe,CAAA;IACf,iFAAiC,CAAA;IACjC,qEAA2B,CAAA;IAC3B,+DAAwB,CAAA;IACxB,oFAAkC,CAAA;IAClC,uCAAY,CAAA;IACZ,iDAAiB,CAAA;AACrB,CAAC,EAVW,KAAK,KAAL,KAAK,QAUhB;AAED;;;IAGY;AAAZ,WAAY,eAAe;IACvB,wCAAqB,CAAA;IACrB,kCAAe,CAAA;IACf,oCAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"BrowserConstants.js","sources":["../../src/utils/BrowserConstants.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { OIDC_DEFAULT_SCOPES } from \"@azure/msal-common\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\n\n/**\n * Constants\n */\nexport const BrowserConstants = {\n /**\n * Interaction in progress cache value\n */\n INTERACTION_IN_PROGRESS_VALUE: \"interaction_in_progress\",\n /**\n * Invalid grant error code\n */\n INVALID_GRANT_ERROR: \"invalid_grant\",\n /**\n * Default popup window width\n */\n POPUP_WIDTH: 483,\n /**\n * Default popup window height\n */\n POPUP_HEIGHT: 600,\n /**\n * Name of the popup window starts with\n */\n POPUP_NAME_PREFIX: \"msal\",\n /**\n * Default popup monitor poll interval in milliseconds\n */\n POLL_INTERVAL_MS: 50,\n /**\n * Msal-browser SKU\n */\n MSAL_SKU: \"msal.js.browser\",\n};\n\nexport enum BrowserCacheLocation {\n LocalStorage = \"localStorage\",\n SessionStorage = \"sessionStorage\",\n MemoryStorage = \"memoryStorage\"\n}\n\n/**\n * HTTP Request types supported by MSAL.\n */\nexport enum HTTP_REQUEST_TYPE {\n GET = \"GET\",\n POST = \"POST\"\n}\n\n/**\n * Temporary cache keys for MSAL, deleted after any request.\n */\nexport enum TemporaryCacheKeys {\n AUTHORITY = \"authority\",\n ACQUIRE_TOKEN_ACCOUNT = \"acquireToken.account\",\n SESSION_STATE = \"session.state\",\n REQUEST_STATE = \"request.state\",\n NONCE_IDTOKEN = \"nonce.id_token\",\n ORIGIN_URI = \"request.origin\",\n RENEW_STATUS = \"token.renew.status\",\n URL_HASH = \"urlHash\",\n REQUEST_PARAMS = \"request.params\",\n SCOPES = \"scopes\",\n INTERACTION_STATUS_KEY = \"interaction.status\",\n CCS_CREDENTIAL = \"ccs.credential\",\n CORRELATION_ID = \"request.correlationId\"\n}\n\n/**\n * Cache keys stored in-memory\n */\nexport enum InMemoryCacheKeys {\n WRAPPER_SKU = \"wrapper.sku\",\n WRAPPER_VER = \"wrapper.version\"\n}\n\n/**\n * API Codes for Telemetry purposes. \n * Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs\n * 0-99 Silent Flow\n * 800-899 Auth Code Flow\n */\nexport enum ApiId {\n acquireTokenRedirect = 861,\n acquireTokenPopup = 862,\n ssoSilent = 863,\n acquireTokenSilent_authCode = 864,\n handleRedirectPromise = 865,\n acquireTokenByCode = 866,\n acquireTokenSilent_silentFlow = 61,\n logout = 961,\n logoutPopup = 962\n}\n\n/*\n * Interaction type of the API - used for state and telemetry\n */\nexport enum InteractionType {\n Redirect = \"redirect\",\n Popup = \"popup\",\n Silent = \"silent\",\n None = \"none\"\n}\n\n/**\n * Types of interaction currently in progress.\n * Used in events in wrapper libraries to invoke functions when certain interaction is in progress or all interactions are complete.\n */\nexport enum InteractionStatus {\n /**\n * Initial status before interaction occurs\n */\n Startup = \"startup\",\n /**\n * Status set when all login calls occuring\n */\n Login = \"login\",\n /**\n * Status set when logout call occuring\n */ \n Logout = \"logout\",\n /**\n * Status set for acquireToken calls\n */\n AcquireToken = \"acquireToken\",\n /**\n * Status set for ssoSilent calls\n */\n SsoSilent = \"ssoSilent\",\n /**\n * Status set when handleRedirect in progress\n */\n HandleRedirect = \"handleRedirect\",\n /**\n * Status set when interaction is complete\n */\n None = \"none\"\n}\n\nexport const DEFAULT_REQUEST: RedirectRequest|PopupRequest = {\n scopes: OIDC_DEFAULT_SCOPES\n};\n\n/**\n * JWK Key Format string (Type MUST be defined for window crypto APIs)\n */\nexport const KEY_FORMAT_JWK = \"jwk\";\n\n// Supported wrapper SKUs\nexport enum WrapperSKU {\n React = \"@azure/msal-react\",\n Angular = \"@azure/msal-angular\"\n}\n\n// DatabaseStorage Constants\nexport const DB_NAME = \"msal.db\";\nexport const DB_VERSION = 1;\nexport const DB_TABLE_NAME = `${DB_NAME}.keys`;\n"],"names":[],"mappings":";;;;AAAA;;;;AASA;;;IAGa,gBAAgB,GAAG;;;;IAI5B,6BAA6B,EAAE,yBAAyB;;;;IAIxD,mBAAmB,EAAE,eAAe;;;;IAIpC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