@azure/msal-browser 2.23.0 → 2.25.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/README.md +1 -1
- package/dist/_virtual/_tslib.js +1 -1
- package/dist/app/ClientApplication.d.ts +58 -1
- package/dist/app/ClientApplication.d.ts.map +1 -1
- package/dist/app/ClientApplication.js +290 -75
- package/dist/app/ClientApplication.js.map +1 -1
- package/dist/app/IPublicClientApplication.d.ts +1 -0
- package/dist/app/IPublicClientApplication.d.ts.map +1 -1
- package/dist/app/IPublicClientApplication.js +4 -1
- package/dist/app/IPublicClientApplication.js.map +1 -1
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.js +48 -42
- package/dist/app/PublicClientApplication.js.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts +49 -0
- package/dist/broker/nativeBroker/NativeMessageHandler.d.ts.map +1 -0
- package/dist/broker/nativeBroker/NativeMessageHandler.js +246 -0
- package/dist/broker/nativeBroker/NativeMessageHandler.js.map +1 -0
- package/dist/broker/nativeBroker/NativeRequest.d.ts +44 -0
- package/dist/broker/nativeBroker/NativeRequest.d.ts.map +1 -0
- package/dist/broker/nativeBroker/NativeResponse.d.ts +24 -0
- package/dist/broker/nativeBroker/NativeResponse.d.ts.map +1 -0
- package/dist/cache/AsyncMemoryStorage.js +1 -1
- package/dist/cache/BrowserCacheManager.d.ts +11 -0
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.js +44 -2
- 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 +1 -0
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.js +2 -2
- package/dist/cache/TokenCache.js.map +1 -1
- package/dist/config/Configuration.d.ts +99 -38
- package/dist/config/Configuration.d.ts.map +1 -1
- package/dist/config/Configuration.js +4 -3
- package/dist/config/Configuration.js.map +1 -1
- package/dist/crypto/BrowserCrypto.js +1 -1
- package/dist/crypto/CryptoOps.d.ts.map +1 -1
- package/dist/crypto/CryptoOps.js +7 -10
- package/dist/crypto/CryptoOps.js.map +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.d.ts +58 -0
- package/dist/error/BrowserAuthError.d.ts.map +1 -1
- package/dist/error/BrowserAuthError.js +75 -3
- package/dist/error/BrowserAuthError.js.map +1 -1
- package/dist/error/BrowserConfigurationAuthError.js +1 -1
- package/dist/error/NativeAuthError.d.ts +47 -0
- package/dist/error/NativeAuthError.d.ts.map +1 -0
- package/dist/error/NativeAuthError.js +83 -0
- package/dist/error/NativeAuthError.js.map +1 -0
- package/dist/event/EventHandler.js +1 -1
- package/dist/event/EventMessage.js +1 -1
- package/dist/event/EventType.d.ts +2 -0
- package/dist/event/EventType.d.ts.map +1 -1
- package/dist/event/EventType.js +3 -1
- package/dist/event/EventType.js.map +1 -1
- package/dist/index.cjs.js +6130 -4824
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +6 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -13
- package/dist/index.js.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.d.ts +12 -2
- package/dist/interaction_client/BaseInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/BaseInteractionClient.js +35 -3
- package/dist/interaction_client/BaseInteractionClient.js.map +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.js +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts +57 -0
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -0
- package/dist/interaction_client/NativeInteractionClient.js +337 -0
- package/dist/interaction_client/NativeInteractionClient.js.map +1 -0
- package/dist/interaction_client/PopupClient.d.ts +75 -2
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.js +315 -46
- package/dist/interaction_client/PopupClient.js.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.js +38 -9
- package/dist/interaction_client/RedirectClient.js.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts +2 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.js +3 -3
- package/dist/interaction_client/SilentAuthCodeClient.js.map +1 -1
- package/dist/interaction_client/SilentCacheClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentCacheClient.js +2 -4
- package/dist/interaction_client/SilentCacheClient.js.map +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts +5 -3
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.js +38 -25
- package/dist/interaction_client/SilentIframeClient.js.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.js +1 -1
- package/dist/interaction_client/StandardInteractionClient.d.ts +2 -8
- package/dist/interaction_client/StandardInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.js +5 -9
- package/dist/interaction_client/StandardInteractionClient.js.map +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts +3 -8
- package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/interaction_handler/InteractionHandler.js +19 -8
- package/dist/interaction_handler/InteractionHandler.js.map +1 -1
- package/dist/interaction_handler/RedirectHandler.d.ts +2 -2
- package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
- package/dist/interaction_handler/RedirectHandler.js +27 -20
- package/dist/interaction_handler/RedirectHandler.js.map +1 -1
- package/dist/interaction_handler/SilentHandler.d.ts +1 -1
- package/dist/interaction_handler/SilentHandler.d.ts.map +1 -1
- package/dist/interaction_handler/SilentHandler.js +5 -5
- package/dist/interaction_handler/SilentHandler.js.map +1 -1
- package/dist/internals.d.ts +17 -0
- package/dist/internals.d.ts.map +1 -0
- package/dist/internals.js +19 -0
- package/dist/internals.js.map +1 -0
- 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/AuthorizationCodeRequest.d.ts +2 -1
- package/dist/request/AuthorizationCodeRequest.d.ts.map +1 -1
- package/dist/request/AuthorizationUrlRequest.d.ts +1 -1
- package/dist/request/AuthorizationUrlRequest.d.ts.map +1 -1
- package/dist/request/EndSessionPopupRequest.d.ts +1 -1
- package/dist/request/EndSessionPopupRequest.d.ts.map +1 -1
- package/dist/request/PopupRequest.d.ts +2 -2
- package/dist/request/PopupRequest.d.ts.map +1 -1
- package/dist/request/PopupWindowAttributes.d.ts +16 -0
- package/dist/request/PopupWindowAttributes.d.ts.map +1 -0
- package/dist/request/RedirectRequest.d.ts +1 -1
- package/dist/request/RedirectRequest.d.ts.map +1 -1
- package/dist/request/SsoSilentRequest.d.ts +2 -2
- package/dist/request/SsoSilentRequest.d.ts.map +1 -1
- package/dist/telemetry/BrowserPerformanceClient.js +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.js +1 -1
- package/dist/utils/BrowserConstants.d.ts +12 -1
- package/dist/utils/BrowserConstants.d.ts.map +1 -1
- package/dist/utils/BrowserConstants.js +14 -2
- 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.d.ts +6 -0
- package/dist/utils/BrowserUtils.d.ts.map +1 -1
- package/dist/utils/BrowserUtils.js +11 -1
- package/dist/utils/BrowserUtils.js.map +1 -1
- package/dist/utils/MathUtils.js +1 -1
- package/lib/msal-browser.js +6130 -4824
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +40 -40
- package/package.json +2 -2
- package/dist/interaction_handler/PopupHandler.d.ts +0 -29
- package/dist/interaction_handler/PopupHandler.d.ts.map +0 -1
- package/dist/interaction_handler/PopupHandler.js +0 -69
- package/dist/interaction_handler/PopupHandler.js.map +0 -1
- package/dist/utils/PopupUtils.d.ts +0 -73
- package/dist/utils/PopupUtils.d.ts.map +0 -1
- package/dist/utils/PopupUtils.js +0 -185
- package/dist/utils/PopupUtils.js.map +0 -1
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
/*! @azure/msal-browser v2.25.0 2022-06-06 */
|
|
2
|
+
'use strict';
|
|
3
|
+
import { __extends, __awaiter, __generator, __assign } from '../_virtual/_tslib.js';
|
|
4
|
+
import { TimeUtils, PerformanceEvents, AuthenticationScheme, PopTokenGenerator, ClientAuthError, AccountEntity, Constants, AuthorityType, ScopeSet, AuthToken, PromptValue, UrlString, OIDC_DEFAULT_SCOPES } from '@azure/msal-common';
|
|
5
|
+
import { BaseInteractionClient } from './BaseInteractionClient.js';
|
|
6
|
+
import { TemporaryCacheKeys, NativeExtensionMethod, ApiId } from '../utils/BrowserConstants.js';
|
|
7
|
+
import { NativeAuthError } from '../error/NativeAuthError.js';
|
|
8
|
+
import { BrowserAuthError } from '../error/BrowserAuthError.js';
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
12
|
+
* Licensed under the MIT License.
|
|
13
|
+
*/
|
|
14
|
+
var NativeInteractionClient = /** @class */ (function (_super) {
|
|
15
|
+
__extends(NativeInteractionClient, _super);
|
|
16
|
+
function NativeInteractionClient(config, browserStorage, browserCrypto, logger, eventHandler, navigationClient, apiId, performanceClient, provider, accountId, correlationId) {
|
|
17
|
+
var _this = _super.call(this, config, browserStorage, browserCrypto, logger, eventHandler, navigationClient, performanceClient, provider, correlationId) || this;
|
|
18
|
+
_this.apiId = apiId;
|
|
19
|
+
_this.accountId = accountId;
|
|
20
|
+
_this.nativeMessageHandler = provider;
|
|
21
|
+
return _this;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Acquire token from native platform via browser extension
|
|
25
|
+
* @param request
|
|
26
|
+
*/
|
|
27
|
+
NativeInteractionClient.prototype.acquireToken = function (request) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
29
|
+
var nativeATMeasurement, nativeRequest, messageBody, reqTimestamp, response, validatedResponse;
|
|
30
|
+
return __generator(this, function (_a) {
|
|
31
|
+
switch (_a.label) {
|
|
32
|
+
case 0:
|
|
33
|
+
this.logger.trace("NativeInteractionClient - acquireToken called.");
|
|
34
|
+
nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, request.correlationId);
|
|
35
|
+
return [4 /*yield*/, this.initializeNativeRequest(request)];
|
|
36
|
+
case 1:
|
|
37
|
+
nativeRequest = _a.sent();
|
|
38
|
+
messageBody = {
|
|
39
|
+
method: NativeExtensionMethod.GetToken,
|
|
40
|
+
request: nativeRequest
|
|
41
|
+
};
|
|
42
|
+
reqTimestamp = TimeUtils.nowSeconds();
|
|
43
|
+
return [4 /*yield*/, this.nativeMessageHandler.sendMessage(messageBody)];
|
|
44
|
+
case 2:
|
|
45
|
+
response = _a.sent();
|
|
46
|
+
validatedResponse = this.validateNativeResponse(response);
|
|
47
|
+
return [2 /*return*/, this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)
|
|
48
|
+
.then(function (result) {
|
|
49
|
+
nativeATMeasurement.endMeasurement({
|
|
50
|
+
success: true,
|
|
51
|
+
isNativeBroker: true
|
|
52
|
+
});
|
|
53
|
+
return result;
|
|
54
|
+
})
|
|
55
|
+
.catch(function (error) {
|
|
56
|
+
nativeATMeasurement.endMeasurement({
|
|
57
|
+
success: false,
|
|
58
|
+
isNativeBroker: true
|
|
59
|
+
});
|
|
60
|
+
throw error;
|
|
61
|
+
})];
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Acquires a token from native platform then redirects to the redirectUri instead of returning the response
|
|
68
|
+
* @param request
|
|
69
|
+
*/
|
|
70
|
+
NativeInteractionClient.prototype.acquireTokenRedirect = function (request) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
72
|
+
var nativeRequest, messageBody, response, e_1, navigationOptions, redirectUri;
|
|
73
|
+
return __generator(this, function (_a) {
|
|
74
|
+
switch (_a.label) {
|
|
75
|
+
case 0:
|
|
76
|
+
this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");
|
|
77
|
+
return [4 /*yield*/, this.initializeNativeRequest(request)];
|
|
78
|
+
case 1:
|
|
79
|
+
nativeRequest = _a.sent();
|
|
80
|
+
messageBody = {
|
|
81
|
+
method: NativeExtensionMethod.GetToken,
|
|
82
|
+
request: nativeRequest
|
|
83
|
+
};
|
|
84
|
+
_a.label = 2;
|
|
85
|
+
case 2:
|
|
86
|
+
_a.trys.push([2, 4, , 5]);
|
|
87
|
+
return [4 /*yield*/, this.nativeMessageHandler.sendMessage(messageBody)];
|
|
88
|
+
case 3:
|
|
89
|
+
response = _a.sent();
|
|
90
|
+
this.validateNativeResponse(response);
|
|
91
|
+
return [3 /*break*/, 5];
|
|
92
|
+
case 4:
|
|
93
|
+
e_1 = _a.sent();
|
|
94
|
+
// Only throw fatal errors here to allow application to fallback to regular redirect. Otherwise proceed and the error will be thrown in handleRedirectPromise
|
|
95
|
+
if (e_1 instanceof NativeAuthError && e_1.isFatal()) {
|
|
96
|
+
throw e_1;
|
|
97
|
+
}
|
|
98
|
+
return [3 /*break*/, 5];
|
|
99
|
+
case 5:
|
|
100
|
+
this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify(nativeRequest), true);
|
|
101
|
+
navigationOptions = {
|
|
102
|
+
apiId: ApiId.acquireTokenRedirect,
|
|
103
|
+
timeout: this.config.system.redirectNavigationTimeout,
|
|
104
|
+
noHistory: false
|
|
105
|
+
};
|
|
106
|
+
redirectUri = this.config.auth.navigateToLoginRequestUrl ? window.location.href : this.getRedirectUri(request.redirectUri);
|
|
107
|
+
return [4 /*yield*/, this.navigationClient.navigateExternal(redirectUri, navigationOptions)];
|
|
108
|
+
case 6:
|
|
109
|
+
_a.sent(); // Need to treat this as external to ensure handleRedirectPromise is run again
|
|
110
|
+
return [2 /*return*/];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* If the previous page called native platform for a token using redirect APIs, send the same request again and return the response
|
|
117
|
+
*/
|
|
118
|
+
NativeInteractionClient.prototype.handleRedirectPromise = function () {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
120
|
+
var cachedRequest, messageBody, reqTimestamp, response, result, e_2;
|
|
121
|
+
return __generator(this, function (_a) {
|
|
122
|
+
switch (_a.label) {
|
|
123
|
+
case 0:
|
|
124
|
+
this.logger.trace("NativeInteractionClient - handleRedirectPromise called.");
|
|
125
|
+
if (!this.browserStorage.isInteractionInProgress(true)) {
|
|
126
|
+
this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null.");
|
|
127
|
+
return [2 /*return*/, null];
|
|
128
|
+
}
|
|
129
|
+
cachedRequest = this.browserStorage.getCachedNativeRequest();
|
|
130
|
+
if (!cachedRequest) {
|
|
131
|
+
this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null.");
|
|
132
|
+
return [2 /*return*/, null];
|
|
133
|
+
}
|
|
134
|
+
this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.NATIVE_REQUEST));
|
|
135
|
+
messageBody = {
|
|
136
|
+
method: NativeExtensionMethod.GetToken,
|
|
137
|
+
request: cachedRequest
|
|
138
|
+
};
|
|
139
|
+
reqTimestamp = TimeUtils.nowSeconds();
|
|
140
|
+
_a.label = 1;
|
|
141
|
+
case 1:
|
|
142
|
+
_a.trys.push([1, 3, , 4]);
|
|
143
|
+
this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");
|
|
144
|
+
return [4 /*yield*/, this.nativeMessageHandler.sendMessage(messageBody)];
|
|
145
|
+
case 2:
|
|
146
|
+
response = _a.sent();
|
|
147
|
+
this.validateNativeResponse(response);
|
|
148
|
+
result = this.handleNativeResponse(response, cachedRequest, reqTimestamp);
|
|
149
|
+
this.browserStorage.setInteractionInProgress(false);
|
|
150
|
+
return [2 /*return*/, result];
|
|
151
|
+
case 3:
|
|
152
|
+
e_2 = _a.sent();
|
|
153
|
+
this.browserStorage.setInteractionInProgress(false);
|
|
154
|
+
throw e_2;
|
|
155
|
+
case 4: return [2 /*return*/];
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Logout from native platform via browser extension
|
|
162
|
+
* @param request
|
|
163
|
+
*/
|
|
164
|
+
NativeInteractionClient.prototype.logout = function () {
|
|
165
|
+
this.logger.trace("NativeInteractionClient - logout called.");
|
|
166
|
+
return Promise.reject("Logout not implemented yet");
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Transform response from native platform into AuthenticationResult object which will be returned to the end user
|
|
170
|
+
* @param response
|
|
171
|
+
* @param request
|
|
172
|
+
* @param reqTimestamp
|
|
173
|
+
*/
|
|
174
|
+
NativeInteractionClient.prototype.handleNativeResponse = function (response, request, reqTimestamp) {
|
|
175
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
176
|
+
var idTokenObj, authority, authorityPreferredCache, homeAccountIdentifier, accountEntity, responseScopes, accountProperties, uid, tid, responseAccessToken, responseTokenType, _a, popTokenGenerator, shrParameters, result;
|
|
177
|
+
var _this = this;
|
|
178
|
+
return __generator(this, function (_b) {
|
|
179
|
+
switch (_b.label) {
|
|
180
|
+
case 0:
|
|
181
|
+
this.logger.trace("NativeInteractionClient - handleNativeResponse called.");
|
|
182
|
+
if (response.account.id !== request.accountId) {
|
|
183
|
+
// User switch in native broker prompt is not supported. All users must first sign in through web flow to ensure server state is in sync
|
|
184
|
+
throw NativeAuthError.createUserSwitchError();
|
|
185
|
+
}
|
|
186
|
+
idTokenObj = new AuthToken(response.id_token || Constants.EMPTY_STRING, this.browserCrypto);
|
|
187
|
+
return [4 /*yield*/, this.getDiscoveredAuthority(request.authority)];
|
|
188
|
+
case 1:
|
|
189
|
+
authority = _b.sent();
|
|
190
|
+
authorityPreferredCache = authority.getPreferredCache();
|
|
191
|
+
homeAccountIdentifier = AccountEntity.generateHomeAccountId(response.client_info || Constants.EMPTY_STRING, AuthorityType.Default, this.logger, this.browserCrypto, idTokenObj);
|
|
192
|
+
accountEntity = AccountEntity.createAccount(response.client_info, homeAccountIdentifier, idTokenObj, undefined, undefined, undefined, undefined, authorityPreferredCache, response.account.id);
|
|
193
|
+
this.browserStorage.setAccount(accountEntity);
|
|
194
|
+
responseScopes = response.scopes ? ScopeSet.fromString(response.scopes) : ScopeSet.fromString(request.scopes);
|
|
195
|
+
accountProperties = response.account.properties || {};
|
|
196
|
+
uid = accountProperties["UID"] || idTokenObj.claims.oid || idTokenObj.claims.sub || Constants.EMPTY_STRING;
|
|
197
|
+
tid = accountProperties["TenantId"] || idTokenObj.claims.tid || Constants.EMPTY_STRING;
|
|
198
|
+
responseTokenType = AuthenticationScheme.BEARER;
|
|
199
|
+
_a = request.tokenType;
|
|
200
|
+
switch (_a) {
|
|
201
|
+
case AuthenticationScheme.POP: return [3 /*break*/, 2];
|
|
202
|
+
}
|
|
203
|
+
return [3 /*break*/, 4];
|
|
204
|
+
case 2:
|
|
205
|
+
// Set the token type to POP in the response
|
|
206
|
+
responseTokenType = AuthenticationScheme.POP;
|
|
207
|
+
// Check if native layer returned an SHR token
|
|
208
|
+
if (response.shr) {
|
|
209
|
+
this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer");
|
|
210
|
+
responseAccessToken = response.shr;
|
|
211
|
+
return [3 /*break*/, 5];
|
|
212
|
+
}
|
|
213
|
+
popTokenGenerator = new PopTokenGenerator(this.browserCrypto);
|
|
214
|
+
shrParameters = {
|
|
215
|
+
resourceRequestMethod: request.resourceRequestMethod,
|
|
216
|
+
resourceRequestUri: request.resourceRequestUri,
|
|
217
|
+
shrClaims: request.shrClaims,
|
|
218
|
+
shrNonce: request.shrNonce
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* KeyID must be present in the native request from when the PoP key was generated in order for
|
|
222
|
+
* PopTokenGenerator to query the full key for signing
|
|
223
|
+
*/
|
|
224
|
+
if (!request.keyId) {
|
|
225
|
+
throw ClientAuthError.createKeyIdMissingError();
|
|
226
|
+
}
|
|
227
|
+
return [4 /*yield*/, popTokenGenerator.signPopToken(response.access_token, request.keyId, shrParameters)];
|
|
228
|
+
case 3:
|
|
229
|
+
responseAccessToken = _b.sent();
|
|
230
|
+
return [3 /*break*/, 5];
|
|
231
|
+
case 4:
|
|
232
|
+
{
|
|
233
|
+
responseAccessToken = response.access_token;
|
|
234
|
+
}
|
|
235
|
+
_b.label = 5;
|
|
236
|
+
case 5:
|
|
237
|
+
result = {
|
|
238
|
+
authority: authority.canonicalAuthority,
|
|
239
|
+
uniqueId: uid,
|
|
240
|
+
tenantId: tid,
|
|
241
|
+
scopes: responseScopes.asArray(),
|
|
242
|
+
account: accountEntity.getAccountInfo(),
|
|
243
|
+
idToken: response.id_token,
|
|
244
|
+
idTokenClaims: idTokenObj.claims,
|
|
245
|
+
accessToken: responseAccessToken,
|
|
246
|
+
fromCache: false,
|
|
247
|
+
expiresOn: new Date(Number(reqTimestamp + response.expires_in) * 1000),
|
|
248
|
+
tokenType: responseTokenType,
|
|
249
|
+
correlationId: this.correlationId,
|
|
250
|
+
state: response.state,
|
|
251
|
+
fromNativeBroker: true
|
|
252
|
+
};
|
|
253
|
+
// Remove any existing cached tokens for this account
|
|
254
|
+
this.browserStorage.removeAccountContext(accountEntity).catch(function (e) {
|
|
255
|
+
_this.logger.error("Error occurred while removing account context from browser storage. " + e);
|
|
256
|
+
});
|
|
257
|
+
return [2 /*return*/, result];
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Validates native platform response before processing
|
|
264
|
+
* @param response
|
|
265
|
+
*/
|
|
266
|
+
NativeInteractionClient.prototype.validateNativeResponse = function (response) {
|
|
267
|
+
if (response.hasOwnProperty("access_token") &&
|
|
268
|
+
response.hasOwnProperty("id_token") &&
|
|
269
|
+
response.hasOwnProperty("client_info") &&
|
|
270
|
+
response.hasOwnProperty("account") &&
|
|
271
|
+
response.hasOwnProperty("scopes") &&
|
|
272
|
+
response.hasOwnProperty("expires_in")) {
|
|
273
|
+
return response;
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
throw NativeAuthError.createUnexpectedError("Response missing expected properties.");
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Translates developer provided request object into NativeRequest object
|
|
281
|
+
* @param request
|
|
282
|
+
*/
|
|
283
|
+
NativeInteractionClient.prototype.initializeNativeRequest = function (request) {
|
|
284
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
285
|
+
var authority, canonicalAuthority, scopes, scopeSet, validatedRequest, shrParameters, popTokenGenerator, reqCnfData;
|
|
286
|
+
return __generator(this, function (_a) {
|
|
287
|
+
switch (_a.label) {
|
|
288
|
+
case 0:
|
|
289
|
+
this.logger.trace("NativeInteractionClient - initializeNativeRequest called");
|
|
290
|
+
authority = request.authority || this.config.auth.authority;
|
|
291
|
+
canonicalAuthority = new UrlString(authority);
|
|
292
|
+
canonicalAuthority.validateAsUri();
|
|
293
|
+
scopes = request && request.scopes || [];
|
|
294
|
+
scopeSet = new ScopeSet(scopes);
|
|
295
|
+
scopeSet.appendScopes(OIDC_DEFAULT_SCOPES);
|
|
296
|
+
if (request.prompt) {
|
|
297
|
+
switch (request.prompt) {
|
|
298
|
+
case PromptValue.NONE:
|
|
299
|
+
case PromptValue.CONSENT:
|
|
300
|
+
this.logger.trace("initializeNativeRequest: prompt is compatible with native flow");
|
|
301
|
+
break;
|
|
302
|
+
default:
|
|
303
|
+
this.logger.trace("initializeNativeRequest: prompt = " + request.prompt + " is not compatible with native flow");
|
|
304
|
+
throw BrowserAuthError.createNativePromptParameterNotSupportedError();
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
validatedRequest = __assign(__assign({}, request), { accountId: this.accountId, clientId: this.config.auth.clientId, authority: canonicalAuthority.urlString, scopes: scopeSet.printScopes(), redirectUri: this.getRedirectUri(request.redirectUri), correlationId: this.correlationId, tokenType: request.authenticationScheme, windowTitleSubstring: document.title, extraParameters: __assign(__assign({}, request.extraQueryParameters), request.tokenQueryParameters), extendedExpiryToken: false // Make this configurable?
|
|
308
|
+
});
|
|
309
|
+
if (!(request.authenticationScheme === AuthenticationScheme.POP)) return [3 /*break*/, 2];
|
|
310
|
+
shrParameters = {
|
|
311
|
+
resourceRequestUri: request.resourceRequestUri,
|
|
312
|
+
resourceRequestMethod: request.resourceRequestMethod,
|
|
313
|
+
shrClaims: request.shrClaims,
|
|
314
|
+
shrNonce: request.shrNonce
|
|
315
|
+
};
|
|
316
|
+
popTokenGenerator = new PopTokenGenerator(this.browserCrypto);
|
|
317
|
+
return [4 /*yield*/, popTokenGenerator.generateCnf(shrParameters)];
|
|
318
|
+
case 1:
|
|
319
|
+
reqCnfData = _a.sent();
|
|
320
|
+
// to reduce the URL length, it is recommended to send the hash of the req_cnf instead of the whole string
|
|
321
|
+
validatedRequest.reqCnf = reqCnfData.reqCnfHash;
|
|
322
|
+
validatedRequest.keyId = reqCnfData.kid;
|
|
323
|
+
_a.label = 2;
|
|
324
|
+
case 2:
|
|
325
|
+
if (this.apiId === ApiId.ssoSilent || this.apiId === ApiId.acquireTokenSilent_silentFlow) {
|
|
326
|
+
validatedRequest.prompt = PromptValue.NONE;
|
|
327
|
+
}
|
|
328
|
+
return [2 /*return*/, validatedRequest];
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
return NativeInteractionClient;
|
|
334
|
+
}(BaseInteractionClient));
|
|
335
|
+
|
|
336
|
+
export { NativeInteractionClient };
|
|
337
|
+
//# sourceMappingURL=NativeInteractionClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeInteractionClient.js","sources":["../../src/interaction_client/NativeInteractionClient.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { AuthenticationResult, Logger, ICrypto, PromptValue, AuthToken, Constants, AccountEntity, AuthorityType, ScopeSet, TimeUtils, AuthenticationScheme, UrlString, OIDC_DEFAULT_SCOPES, PopTokenGenerator, SignedHttpRequestParameters, IPerformanceClient, PerformanceEvents, ClientAuthError } from \"@azure/msal-common\";\nimport { BaseInteractionClient } from \"./BaseInteractionClient\";\nimport { BrowserConfiguration } from \"../config/Configuration\";\nimport { BrowserCacheManager } from \"../cache/BrowserCacheManager\";\nimport { EventHandler } from \"../event/EventHandler\";\nimport { PopupRequest } from \"../request/PopupRequest\";\nimport { SilentRequest } from \"../request/SilentRequest\";\nimport { SsoSilentRequest } from \"../request/SsoSilentRequest\";\nimport { NativeMessageHandler } from \"../broker/nativeBroker/NativeMessageHandler\";\nimport { NativeExtensionMethod, ApiId, TemporaryCacheKeys } from \"../utils/BrowserConstants\";\nimport { NativeExtensionRequestBody, NativeTokenRequest } from \"../broker/nativeBroker/NativeRequest\";\nimport { NativeResponse } from \"../broker/nativeBroker/NativeResponse\";\nimport { NativeAuthError } from \"../error/NativeAuthError\";\nimport { RedirectRequest } from \"../request/RedirectRequest\";\nimport { NavigationOptions } from \"../navigation/NavigationOptions\";\nimport { INavigationClient } from \"../navigation/INavigationClient\";\nimport { BrowserAuthError } from \"../error/BrowserAuthError\";\n\nexport class NativeInteractionClient extends BaseInteractionClient {\n protected apiId: ApiId;\n protected accountId: string;\n protected nativeMessageHandler: NativeMessageHandler;\n\n constructor(config: BrowserConfiguration, browserStorage: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, apiId: ApiId, performanceClient: IPerformanceClient, provider: NativeMessageHandler, accountId: string, correlationId?: string) {\n super(config, browserStorage, browserCrypto, logger, eventHandler, navigationClient, performanceClient, provider, correlationId);\n this.apiId = apiId;\n this.accountId = accountId;\n this.nativeMessageHandler = provider;\n }\n\n /**\n * Acquire token from native platform via browser extension\n * @param request\n */\n async acquireToken(request: PopupRequest|SilentRequest|SsoSilentRequest): Promise<AuthenticationResult> {\n this.logger.trace(\"NativeInteractionClient - acquireToken called.\");\n\n // start the perf measurement\n const nativeATMeasurement = this.performanceClient.startMeasurement(PerformanceEvents.NativeInteractionClientAcquireToken, request.correlationId);\n const nativeRequest = await this.initializeNativeRequest(request);\n\n const messageBody: NativeExtensionRequestBody = {\n method: NativeExtensionMethod.GetToken,\n request: nativeRequest\n };\n\n const reqTimestamp = TimeUtils.nowSeconds();\n const response: object = await this.nativeMessageHandler.sendMessage(messageBody);\n const validatedResponse: NativeResponse = this.validateNativeResponse(response);\n\n return this.handleNativeResponse(validatedResponse, nativeRequest, reqTimestamp)\n .then((result: AuthenticationResult) => {\n nativeATMeasurement.endMeasurement({\n success: true,\n isNativeBroker: true\n });\n return result;\n })\n .catch((error) => {\n nativeATMeasurement.endMeasurement({\n success: false,\n isNativeBroker: true\n });\n throw error;\n });\n }\n\n /**\n * Acquires a token from native platform then redirects to the redirectUri instead of returning the response\n * @param request\n */\n async acquireTokenRedirect(request: RedirectRequest): Promise<void> {\n this.logger.trace(\"NativeInteractionClient - acquireTokenRedirect called.\");\n const nativeRequest = await this.initializeNativeRequest(request);\n\n const messageBody: NativeExtensionRequestBody = {\n method: NativeExtensionMethod.GetToken,\n request: nativeRequest\n };\n\n try {\n const response: object = await this.nativeMessageHandler.sendMessage(messageBody);\n this.validateNativeResponse(response);\n } catch (e) {\n // Only throw fatal errors here to allow application to fallback to regular redirect. Otherwise proceed and the error will be thrown in handleRedirectPromise\n if (e instanceof NativeAuthError && e.isFatal()) {\n throw e;\n }\n }\n this.browserStorage.setTemporaryCache(TemporaryCacheKeys.NATIVE_REQUEST, JSON.stringify(nativeRequest), true);\n\n const navigationOptions: NavigationOptions = {\n apiId: ApiId.acquireTokenRedirect,\n timeout: this.config.system.redirectNavigationTimeout,\n noHistory: false\n };\n const redirectUri = this.config.auth.navigateToLoginRequestUrl ? window.location.href : this.getRedirectUri(request.redirectUri);\n await this.navigationClient.navigateExternal(redirectUri, navigationOptions); // Need to treat this as external to ensure handleRedirectPromise is run again\n }\n\n /**\n * If the previous page called native platform for a token using redirect APIs, send the same request again and return the response\n */\n async handleRedirectPromise(): Promise<AuthenticationResult | null> {\n this.logger.trace(\"NativeInteractionClient - handleRedirectPromise called.\");\n if (!this.browserStorage.isInteractionInProgress(true)) {\n this.logger.info(\"handleRedirectPromise called but there is no interaction in progress, returning null.\");\n return null;\n }\n\n const cachedRequest = this.browserStorage.getCachedNativeRequest();\n if (!cachedRequest) {\n this.logger.verbose(\"NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null.\");\n return null;\n }\n\n this.browserStorage.removeItem(this.browserStorage.generateCacheKey(TemporaryCacheKeys.NATIVE_REQUEST));\n\n const messageBody: NativeExtensionRequestBody = {\n method: NativeExtensionMethod.GetToken,\n request: cachedRequest\n };\n\n const reqTimestamp = TimeUtils.nowSeconds();\n\n try {\n this.logger.verbose(\"NativeInteractionClient - handleRedirectPromise sending message to native broker.\");\n const response: object = await this.nativeMessageHandler.sendMessage(messageBody);\n this.validateNativeResponse(response);\n const result = this.handleNativeResponse(response as NativeResponse, cachedRequest, reqTimestamp);\n this.browserStorage.setInteractionInProgress(false);\n return result;\n } catch (e) {\n this.browserStorage.setInteractionInProgress(false);\n throw e;\n }\n }\n\n /**\n * Logout from native platform via browser extension\n * @param request\n */\n logout(): Promise<void> {\n this.logger.trace(\"NativeInteractionClient - logout called.\");\n return Promise.reject(\"Logout not implemented yet\");\n }\n\n /**\n * Transform response from native platform into AuthenticationResult object which will be returned to the end user\n * @param response\n * @param request\n * @param reqTimestamp\n */\n protected async handleNativeResponse(response: NativeResponse, request: NativeTokenRequest, reqTimestamp: number): Promise<AuthenticationResult> {\n this.logger.trace(\"NativeInteractionClient - handleNativeResponse called.\");\n\n if (response.account.id !== request.accountId) {\n // User switch in native broker prompt is not supported. All users must first sign in through web flow to ensure server state is in sync\n throw NativeAuthError.createUserSwitchError();\n }\n\n // create an idToken object (not entity)\n const idTokenObj = new AuthToken(response.id_token || Constants.EMPTY_STRING, this.browserCrypto);\n\n // Get the preferred_cache domain for the given authority\n const authority = await this.getDiscoveredAuthority(request.authority);\n const authorityPreferredCache = authority.getPreferredCache();\n\n // Save account in browser storage\n const homeAccountIdentifier = AccountEntity.generateHomeAccountId(response.client_info || Constants.EMPTY_STRING, AuthorityType.Default, this.logger, this.browserCrypto, idTokenObj);\n const accountEntity = AccountEntity.createAccount(response.client_info, homeAccountIdentifier, idTokenObj, undefined, undefined, undefined, undefined, authorityPreferredCache, response.account.id);\n this.browserStorage.setAccount(accountEntity);\n\n // If scopes not returned in server response, use request scopes\n const responseScopes = response.scopes ? ScopeSet.fromString(response.scopes) : ScopeSet.fromString(request.scopes);\n\n const accountProperties = response.account.properties || {};\n const uid = accountProperties[\"UID\"] || idTokenObj.claims.oid || idTokenObj.claims.sub || Constants.EMPTY_STRING;\n const tid = accountProperties[\"TenantId\"] || idTokenObj.claims.tid || Constants.EMPTY_STRING;\n\n // This code prioritizes SHR returned from the native layer. In case of error/SHR not calculated from WAM and the AT is still received, SHR is calculated locally\n let responseAccessToken;\n let responseTokenType: AuthenticationScheme = AuthenticationScheme.BEARER;\n switch (request.tokenType) {\n case AuthenticationScheme.POP: {\n // Set the token type to POP in the response\n responseTokenType = AuthenticationScheme.POP;\n\n // Check if native layer returned an SHR token\n if (response.shr) {\n this.logger.trace(\"handleNativeServerResponse: SHR is enabled in native layer\");\n responseAccessToken = response.shr;\n break;\n }\n\n // Generate SHR in msal js if WAM does not compute it when POP is enabled\n const popTokenGenerator: PopTokenGenerator = new PopTokenGenerator(this.browserCrypto);\n const shrParameters: SignedHttpRequestParameters = {\n resourceRequestMethod: request.resourceRequestMethod,\n resourceRequestUri: request.resourceRequestUri,\n shrClaims: request.shrClaims,\n shrNonce: request.shrNonce\n };\n\n /**\n * KeyID must be present in the native request from when the PoP key was generated in order for\n * PopTokenGenerator to query the full key for signing\n */\n if (!request.keyId) {\n throw ClientAuthError.createKeyIdMissingError();\n }\n\n responseAccessToken = await popTokenGenerator.signPopToken(response.access_token, request.keyId, shrParameters);\n break;\n\n }\n // assign the access token to the response for all non-POP cases (Should be Bearer only today)\n default: {\n responseAccessToken = response.access_token;\n }\n }\n\n const result: AuthenticationResult = {\n authority: authority.canonicalAuthority,\n uniqueId: uid,\n tenantId: tid,\n scopes: responseScopes.asArray(),\n account: accountEntity.getAccountInfo(),\n idToken: response.id_token,\n idTokenClaims: idTokenObj.claims,\n accessToken: responseAccessToken,\n fromCache: false,\n expiresOn: new Date(Number(reqTimestamp + response.expires_in) * 1000),\n tokenType: responseTokenType,\n correlationId: this.correlationId,\n state: response.state,\n fromNativeBroker: true\n };\n\n // Remove any existing cached tokens for this account\n this.browserStorage.removeAccountContext(accountEntity).catch((e) => {\n this.logger.error(`Error occurred while removing account context from browser storage. ${e}`);\n });\n\n return result;\n }\n\n /**\n * Validates native platform response before processing\n * @param response\n */\n private validateNativeResponse(response: object): NativeResponse {\n if (\n response.hasOwnProperty(\"access_token\") &&\n response.hasOwnProperty(\"id_token\") &&\n response.hasOwnProperty(\"client_info\") &&\n response.hasOwnProperty(\"account\") &&\n response.hasOwnProperty(\"scopes\") &&\n response.hasOwnProperty(\"expires_in\")\n ) {\n return response as NativeResponse;\n } else {\n throw NativeAuthError.createUnexpectedError(\"Response missing expected properties.\");\n }\n }\n\n /**\n * Translates developer provided request object into NativeRequest object\n * @param request\n */\n protected async initializeNativeRequest(request: PopupRequest|SsoSilentRequest): Promise<NativeTokenRequest> {\n this.logger.trace(\"NativeInteractionClient - initializeNativeRequest called\");\n\n const authority = request.authority || this.config.auth.authority;\n const canonicalAuthority = new UrlString(authority);\n canonicalAuthority.validateAsUri();\n\n const scopes = request && request.scopes || [];\n const scopeSet = new ScopeSet(scopes);\n scopeSet.appendScopes(OIDC_DEFAULT_SCOPES);\n\n if (request.prompt) {\n switch (request.prompt) {\n case PromptValue.NONE:\n case PromptValue.CONSENT:\n this.logger.trace(\"initializeNativeRequest: prompt is compatible with native flow\");\n break;\n default:\n this.logger.trace(`initializeNativeRequest: prompt = ${request.prompt} is not compatible with native flow`);\n throw BrowserAuthError.createNativePromptParameterNotSupportedError();\n }\n }\n\n const validatedRequest: NativeTokenRequest = {\n ...request,\n accountId: this.accountId,\n clientId: this.config.auth.clientId,\n authority: canonicalAuthority.urlString,\n scopes: scopeSet.printScopes(),\n redirectUri: this.getRedirectUri(request.redirectUri),\n correlationId: this.correlationId,\n tokenType: request.authenticationScheme,\n windowTitleSubstring: document.title,\n extraParameters: {\n ...request.extraQueryParameters,\n ...request.tokenQueryParameters\n },\n extendedExpiryToken: false // Make this configurable?\n };\n\n if (request.authenticationScheme === AuthenticationScheme.POP) {\n\n // add POP request type\n const shrParameters: SignedHttpRequestParameters = {\n resourceRequestUri: request.resourceRequestUri,\n resourceRequestMethod: request.resourceRequestMethod,\n shrClaims: request.shrClaims,\n shrNonce: request.shrNonce\n };\n\n const popTokenGenerator = new PopTokenGenerator(this.browserCrypto);\n const reqCnfData = await popTokenGenerator.generateCnf(shrParameters);\n\n // to reduce the URL length, it is recommended to send the hash of the req_cnf instead of the whole string\n validatedRequest.reqCnf = reqCnfData.reqCnfHash;\n validatedRequest.keyId = reqCnfData.kid;\n }\n\n if (this.apiId === ApiId.ssoSilent || this.apiId === ApiId.ac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4BACtF,gBAAgB,CAAC,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC;yBAC9C;wBAED,sBAAO,gBAAgB,EAAC;;;;KAC3B;IACL,8BAAC;AAAD,CA5TA,CAA6C,qBAAqB;;;;"}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
import { AuthenticationResult, CommonEndSessionRequest } from "@azure/msal-common";
|
|
1
|
+
import { AuthenticationResult, CommonEndSessionRequest, IPerformanceClient, Logger, ICrypto } from "@azure/msal-common";
|
|
2
2
|
import { StandardInteractionClient } from "./StandardInteractionClient";
|
|
3
|
-
import { PopupWindowAttributes } from "../utils/PopupUtils";
|
|
4
3
|
import { EndSessionPopupRequest } from "../request/EndSessionPopupRequest";
|
|
5
4
|
import { PopupRequest } from "../request/PopupRequest";
|
|
5
|
+
import { NativeMessageHandler } from "../broker/nativeBroker/NativeMessageHandler";
|
|
6
|
+
import { INavigationClient } from "../navigation/INavigationClient";
|
|
7
|
+
import { EventHandler } from "../event/EventHandler";
|
|
8
|
+
import { BrowserCacheManager } from "../cache/BrowserCacheManager";
|
|
9
|
+
import { BrowserConfiguration } from "../config/Configuration";
|
|
10
|
+
import { InteractionParams } from "../interaction_handler/InteractionHandler";
|
|
11
|
+
import { PopupWindowAttributes } from "../request/PopupWindowAttributes";
|
|
12
|
+
export declare type PopupParams = InteractionParams & {
|
|
13
|
+
popup?: Window | null;
|
|
14
|
+
popupName: string;
|
|
15
|
+
popupWindowAttributes: PopupWindowAttributes;
|
|
16
|
+
};
|
|
6
17
|
export declare class PopupClient extends StandardInteractionClient {
|
|
18
|
+
private currentWindow;
|
|
19
|
+
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, performanceClient: IPerformanceClient, nativeMessageHandler?: NativeMessageHandler, correlationId?: string);
|
|
7
20
|
/**
|
|
8
21
|
* Acquires tokens by opening a popup window to the /authorize endpoint of the authority
|
|
9
22
|
* @param request
|
|
@@ -34,5 +47,65 @@ export declare class PopupClient extends StandardInteractionClient {
|
|
|
34
47
|
* @param popupWindowAttributes
|
|
35
48
|
*/
|
|
36
49
|
protected logoutPopupAsync(validRequest: CommonEndSessionRequest, popupName: string, popupWindowAttributes: PopupWindowAttributes, requestAuthority?: string, popup?: Window | null, mainWindowRedirectUri?: string): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Opens a popup window with given request Url.
|
|
52
|
+
* @param requestUrl
|
|
53
|
+
*/
|
|
54
|
+
initiateAuthRequest(requestUrl: string, params: PopupParams): Window;
|
|
55
|
+
/**
|
|
56
|
+
* Monitors a window until it loads a url with the same origin.
|
|
57
|
+
* @param popupWindow - window that is being monitored
|
|
58
|
+
* @param timeout - timeout for processing hash once popup is redirected back to application
|
|
59
|
+
*/
|
|
60
|
+
monitorPopupForHash(popupWindow: Window): Promise<string>;
|
|
61
|
+
/**
|
|
62
|
+
* Waits for user interaction in logout popup window
|
|
63
|
+
* @param popupWindow
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
66
|
+
waitForLogoutPopup(popupWindow: Window): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* @hidden
|
|
69
|
+
*
|
|
70
|
+
* Configures popup window for login.
|
|
71
|
+
*
|
|
72
|
+
* @param urlNavigate
|
|
73
|
+
* @param title
|
|
74
|
+
* @param popUpWidth
|
|
75
|
+
* @param popUpHeight
|
|
76
|
+
* @param popupWindowAttributes
|
|
77
|
+
* @ignore
|
|
78
|
+
* @hidden
|
|
79
|
+
*/
|
|
80
|
+
openPopup(urlNavigate: string, popupParams: PopupParams): Window;
|
|
81
|
+
/**
|
|
82
|
+
* Helper function to set popup window dimensions and position
|
|
83
|
+
* @param urlNavigate
|
|
84
|
+
* @param popupName
|
|
85
|
+
* @param popupWindowAttributes
|
|
86
|
+
* @returns
|
|
87
|
+
*/
|
|
88
|
+
openSizedPopup(urlNavigate: string, popupName: string, popupWindowAttributes: PopupWindowAttributes): Window | null;
|
|
89
|
+
/**
|
|
90
|
+
* Event callback to unload main window.
|
|
91
|
+
*/
|
|
92
|
+
unloadWindow(e: Event): void;
|
|
93
|
+
/**
|
|
94
|
+
* Closes popup, removes any state vars created during popup calls.
|
|
95
|
+
* @param popupWindow
|
|
96
|
+
*/
|
|
97
|
+
cleanPopup(popupWindow?: Window): void;
|
|
98
|
+
/**
|
|
99
|
+
* Generates the name for the popup based on the client id and request
|
|
100
|
+
* @param clientId
|
|
101
|
+
* @param request
|
|
102
|
+
*/
|
|
103
|
+
generatePopupName(scopes: Array<string>, authority: string): string;
|
|
104
|
+
/**
|
|
105
|
+
* Generates the name for the popup based on the client id and request for logouts
|
|
106
|
+
* @param clientId
|
|
107
|
+
* @param request
|
|
108
|
+
*/
|
|
109
|
+
generateLogoutPopupName(request: CommonEndSessionRequest): string;
|
|
37
110
|
}
|
|
38
111
|
//# sourceMappingURL=PopupClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupClient.d.ts","sourceRoot":"","sources":["../../src/interaction_client/PopupClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAA4E,uBAAuB,
|
|
1
|
+
{"version":3,"file":"PopupClient.d.ts","sourceRoot":"","sources":["../../src/interaction_client/PopupClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAA4E,uBAAuB,EAAwI,kBAAkB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACxU,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAG3E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAEnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAu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