@azure/msal-browser 3.3.0 → 3.4.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/dist/app/IPublicClientApplication.mjs +1 -1
- package/dist/app/PublicClientApplication.d.ts.map +1 -1
- package/dist/app/PublicClientApplication.mjs +3 -4
- package/dist/app/PublicClientApplication.mjs.map +1 -1
- package/dist/app/PublicClientNext.d.ts.map +1 -1
- package/dist/app/PublicClientNext.mjs +4 -6
- package/dist/app/PublicClientNext.mjs.map +1 -1
- package/dist/broker/nativeBroker/NativeMessageHandler.mjs +1 -1
- package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
- package/dist/cache/AsyncMemoryStorage.mjs +1 -1
- package/dist/cache/BrowserCacheManager.d.ts.map +1 -1
- package/dist/cache/BrowserCacheManager.mjs +20 -20
- package/dist/cache/BrowserCacheManager.mjs.map +1 -1
- package/dist/cache/BrowserStorage.mjs +1 -1
- package/dist/cache/CryptoKeyStore.mjs +1 -1
- package/dist/cache/DatabaseStorage.mjs +1 -1
- package/dist/cache/MemoryStorage.mjs +1 -1
- package/dist/cache/TokenCache.d.ts.map +1 -1
- package/dist/cache/TokenCache.mjs +5 -5
- package/dist/cache/TokenCache.mjs.map +1 -1
- package/dist/config/Configuration.mjs +1 -1
- package/dist/controllers/ControllerFactory.d.ts +2 -8
- package/dist/controllers/ControllerFactory.d.ts.map +1 -1
- package/dist/controllers/ControllerFactory.mjs +21 -38
- package/dist/controllers/ControllerFactory.mjs.map +1 -1
- package/dist/controllers/IController.d.ts +1 -2
- package/dist/controllers/IController.d.ts.map +1 -1
- package/dist/controllers/NestedAppAuthController.mjs +1 -1
- package/dist/controllers/StandardController.d.ts +4 -4
- package/dist/controllers/StandardController.d.ts.map +1 -1
- package/dist/controllers/StandardController.mjs +29 -31
- package/dist/controllers/StandardController.mjs.map +1 -1
- package/dist/controllers/UnknownOperatingContextController.mjs +1 -1
- package/dist/crypto/BrowserCrypto.mjs +1 -1
- package/dist/crypto/CryptoOps.mjs +1 -1
- package/dist/crypto/PkceGenerator.mjs +1 -1
- package/dist/crypto/SignedHttpRequest.mjs +1 -1
- package/dist/encode/Base64Decode.mjs +1 -1
- package/dist/encode/Base64Encode.mjs +1 -1
- package/dist/error/BrowserAuthError.mjs +1 -1
- package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
- package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
- package/dist/error/NativeAuthError.mjs +1 -1
- package/dist/error/NativeAuthErrorCodes.mjs +1 -1
- package/dist/error/NestedAppAuthError.mjs +1 -1
- package/dist/event/EventHandler.mjs +1 -1
- package/dist/event/EventMessage.mjs +1 -1
- package/dist/event/EventType.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
- package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
- package/dist/interaction_client/NativeInteractionClient.d.ts.map +1 -1
- package/dist/interaction_client/NativeInteractionClient.mjs +4 -4
- package/dist/interaction_client/NativeInteractionClient.mjs.map +1 -1
- package/dist/interaction_client/PopupClient.d.ts +1 -2
- package/dist/interaction_client/PopupClient.d.ts.map +1 -1
- package/dist/interaction_client/PopupClient.mjs +9 -22
- package/dist/interaction_client/PopupClient.mjs.map +1 -1
- package/dist/interaction_client/RedirectClient.d.ts.map +1 -1
- package/dist/interaction_client/RedirectClient.mjs +11 -19
- package/dist/interaction_client/RedirectClient.mjs.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentAuthCodeClient.mjs +3 -5
- package/dist/interaction_client/SilentAuthCodeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentCacheClient.mjs +1 -1
- package/dist/interaction_client/SilentIframeClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentIframeClient.mjs +4 -9
- package/dist/interaction_client/SilentIframeClient.mjs.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.d.ts.map +1 -1
- package/dist/interaction_client/SilentRefreshClient.mjs +2 -12
- package/dist/interaction_client/SilentRefreshClient.mjs.map +1 -1
- package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
- package/dist/interaction_handler/InteractionHandler.d.ts +6 -13
- package/dist/interaction_handler/InteractionHandler.d.ts.map +1 -1
- package/dist/interaction_handler/InteractionHandler.mjs +29 -56
- package/dist/interaction_handler/InteractionHandler.mjs.map +1 -1
- package/dist/interaction_handler/RedirectHandler.d.ts +14 -7
- package/dist/interaction_handler/RedirectHandler.d.ts.map +1 -1
- package/dist/interaction_handler/RedirectHandler.mjs +28 -9
- package/dist/interaction_handler/RedirectHandler.mjs.map +1 -1
- package/dist/interaction_handler/SilentHandler.mjs +1 -1
- package/dist/naa/BridgeError.mjs +1 -1
- package/dist/naa/BridgeProxy.mjs +1 -1
- package/dist/naa/BridgeStatusCode.mjs +1 -1
- package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
- package/dist/navigation/NavigationClient.mjs +1 -1
- package/dist/network/FetchClient.mjs +1 -1
- package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
- package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
- package/dist/operatingcontext/TeamsAppOperatingContext.mjs +1 -1
- package/dist/operatingcontext/UnknownOperatingContext.mjs +1 -1
- package/dist/packageMetadata.d.ts +1 -1
- package/dist/packageMetadata.mjs +2 -2
- package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
- package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
- package/dist/utils/BrowserConstants.mjs +1 -1
- package/dist/utils/BrowserProtocolUtils.mjs +1 -1
- package/dist/utils/BrowserUtils.mjs +1 -1
- package/lib/msal-browser.cjs +18564 -61
- package/lib/msal-browser.cjs.map +1 -1
- package/lib/msal-browser.js +2828 -3394
- package/lib/msal-browser.js.map +1 -1
- package/lib/msal-browser.min.js +67 -66
- package/package.json +2 -2
- package/src/app/PublicClientApplication.ts +4 -3
- package/src/app/PublicClientNext.ts +7 -5
- package/src/cache/BrowserCacheManager.ts +22 -40
- package/src/cache/TokenCache.ts +5 -4
- package/src/controllers/ControllerFactory.ts +30 -49
- package/src/controllers/IController.ts +0 -6
- package/src/controllers/StandardController.ts +42 -46
- package/src/interaction_client/NativeInteractionClient.ts +4 -3
- package/src/interaction_client/PopupClient.ts +39 -60
- package/src/interaction_client/RedirectClient.ts +41 -46
- package/src/interaction_client/SilentAuthCodeClient.ts +1 -12
- package/src/interaction_client/SilentIframeClient.ts +2 -18
- package/src/interaction_client/SilentRefreshClient.ts +5 -19
- package/src/interaction_handler/InteractionHandler.ts +34 -104
- package/src/interaction_handler/RedirectHandler.ts +48 -22
- package/src/packageMetadata.ts +1 -1
|
@@ -7,17 +7,13 @@ import {
|
|
|
7
7
|
AuthorizationCodePayload,
|
|
8
8
|
CommonAuthorizationCodeRequest,
|
|
9
9
|
AuthorizationCodeClient,
|
|
10
|
-
AuthorityFactory,
|
|
11
|
-
Authority,
|
|
12
|
-
INetworkModule,
|
|
13
10
|
CcsCredential,
|
|
14
11
|
Logger,
|
|
15
12
|
ServerError,
|
|
16
13
|
IPerformanceClient,
|
|
17
14
|
PerformanceEvents,
|
|
18
15
|
invokeAsync,
|
|
19
|
-
|
|
20
|
-
ClientAuthErrorCodes,
|
|
16
|
+
CcsCredentialType,
|
|
21
17
|
} from "@azure/msal-common";
|
|
22
18
|
|
|
23
19
|
import { BrowserCacheManager } from "../cache/BrowserCacheManager";
|
|
@@ -25,10 +21,8 @@ import {
|
|
|
25
21
|
createBrowserAuthError,
|
|
26
22
|
BrowserAuthErrorCodes,
|
|
27
23
|
} from "../error/BrowserAuthError";
|
|
28
|
-
import { TemporaryCacheKeys } from "../utils/BrowserConstants";
|
|
29
24
|
import { AuthenticationResult } from "../response/AuthenticationResult";
|
|
30
|
-
|
|
31
|
-
export type InteractionParams = {};
|
|
25
|
+
import { AuthorizationUrlRequest } from "../request/AuthorizationUrlRequest";
|
|
32
26
|
|
|
33
27
|
/**
|
|
34
28
|
* Abstract class which defines operations for a browser interaction handling class.
|
|
@@ -60,34 +54,22 @@ export class InteractionHandler {
|
|
|
60
54
|
*/
|
|
61
55
|
async handleCodeResponseFromHash(
|
|
62
56
|
locationHash: string,
|
|
63
|
-
|
|
64
|
-
authority: Authority,
|
|
65
|
-
networkModule: INetworkModule
|
|
57
|
+
request: AuthorizationUrlRequest
|
|
66
58
|
): Promise<AuthenticationResult> {
|
|
67
59
|
this.performanceClient.addQueueMeasurement(
|
|
68
60
|
PerformanceEvents.HandleCodeResponseFromHash,
|
|
69
|
-
|
|
61
|
+
request.correlationId
|
|
70
62
|
);
|
|
71
63
|
// Check that location hash isn't empty.
|
|
72
64
|
if (!locationHash) {
|
|
73
65
|
throw createBrowserAuthError(BrowserAuthErrorCodes.hashEmptyError);
|
|
74
66
|
}
|
|
75
67
|
|
|
76
|
-
// Handle code response.
|
|
77
|
-
const stateKey = this.browserStorage.generateStateKey(state);
|
|
78
|
-
const requestState = this.browserStorage.getTemporaryCache(stateKey);
|
|
79
|
-
if (!requestState) {
|
|
80
|
-
throw createClientAuthError(
|
|
81
|
-
ClientAuthErrorCodes.stateNotFound,
|
|
82
|
-
"Cached State"
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
68
|
let authCodeResponse;
|
|
87
69
|
try {
|
|
88
70
|
authCodeResponse = this.authModule.handleFragmentResponse(
|
|
89
71
|
locationHash,
|
|
90
|
-
|
|
72
|
+
request.state
|
|
91
73
|
);
|
|
92
74
|
} catch (e) {
|
|
93
75
|
if (
|
|
@@ -108,8 +90,8 @@ export class InteractionHandler {
|
|
|
108
90
|
PerformanceEvents.HandleCodeResponseFromServer,
|
|
109
91
|
this.logger,
|
|
110
92
|
this.performanceClient,
|
|
111
|
-
|
|
112
|
-
)(authCodeResponse,
|
|
93
|
+
request.correlationId
|
|
94
|
+
)(authCodeResponse, request);
|
|
113
95
|
}
|
|
114
96
|
|
|
115
97
|
/**
|
|
@@ -122,65 +104,46 @@ export class InteractionHandler {
|
|
|
122
104
|
*/
|
|
123
105
|
async handleCodeResponseFromServer(
|
|
124
106
|
authCodeResponse: AuthorizationCodePayload,
|
|
125
|
-
|
|
126
|
-
authority: Authority,
|
|
127
|
-
networkModule: INetworkModule,
|
|
107
|
+
request: AuthorizationUrlRequest,
|
|
128
108
|
validateNonce: boolean = true
|
|
129
109
|
): Promise<AuthenticationResult> {
|
|
130
110
|
this.performanceClient.addQueueMeasurement(
|
|
131
111
|
PerformanceEvents.HandleCodeResponseFromServer,
|
|
132
|
-
|
|
112
|
+
request.correlationId
|
|
133
113
|
);
|
|
134
114
|
this.logger.trace(
|
|
135
115
|
"InteractionHandler.handleCodeResponseFromServer called"
|
|
136
116
|
);
|
|
137
117
|
|
|
138
|
-
// Handle code response.
|
|
139
|
-
const stateKey = this.browserStorage.generateStateKey(state);
|
|
140
|
-
const requestState = this.browserStorage.getTemporaryCache(stateKey);
|
|
141
|
-
if (!requestState) {
|
|
142
|
-
throw createClientAuthError(
|
|
143
|
-
ClientAuthErrorCodes.stateNotFound,
|
|
144
|
-
"Cached State"
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Get cached items
|
|
149
|
-
const nonceKey = this.browserStorage.generateNonceKey(requestState);
|
|
150
|
-
const cachedNonce = this.browserStorage.getTemporaryCache(nonceKey);
|
|
151
|
-
|
|
152
118
|
// Assign code to request
|
|
153
119
|
this.authCodeRequest.code = authCodeResponse.code;
|
|
154
120
|
|
|
155
121
|
// Check for new cloud instance
|
|
156
122
|
if (authCodeResponse.cloud_instance_host_name) {
|
|
157
123
|
await invokeAsync(
|
|
158
|
-
this.
|
|
124
|
+
this.authModule.updateAuthority.bind(this.authModule),
|
|
159
125
|
PerformanceEvents.UpdateTokenEndpointAuthority,
|
|
160
126
|
this.logger,
|
|
161
127
|
this.performanceClient,
|
|
162
|
-
|
|
163
|
-
)(
|
|
164
|
-
authCodeResponse.cloud_instance_host_name,
|
|
165
|
-
authority,
|
|
166
|
-
networkModule
|
|
167
|
-
);
|
|
128
|
+
request.correlationId
|
|
129
|
+
)(authCodeResponse.cloud_instance_host_name, request.correlationId);
|
|
168
130
|
}
|
|
169
131
|
|
|
170
132
|
// Nonce validation not needed when redirect not involved (e.g. hybrid spa, renewing token via rt)
|
|
171
133
|
if (validateNonce) {
|
|
172
|
-
|
|
134
|
+
// TODO: Assigning "response nonce" to "request nonce" is confusing. Refactor the function doing validation to accept request nonce directly
|
|
135
|
+
authCodeResponse.nonce = request.nonce || undefined;
|
|
173
136
|
}
|
|
174
137
|
|
|
175
|
-
authCodeResponse.state =
|
|
138
|
+
authCodeResponse.state = request.state;
|
|
176
139
|
|
|
177
140
|
// Add CCS parameters if available
|
|
178
141
|
if (authCodeResponse.client_info) {
|
|
179
142
|
this.authCodeRequest.clientInfo = authCodeResponse.client_info;
|
|
180
143
|
} else {
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
183
|
-
this.authCodeRequest.ccsCredential =
|
|
144
|
+
const ccsCred = this.createCcsCredentials(request);
|
|
145
|
+
if (ccsCred) {
|
|
146
|
+
this.authCodeRequest.ccsCredential = ccsCred;
|
|
184
147
|
}
|
|
185
148
|
}
|
|
186
149
|
|
|
@@ -190,62 +153,29 @@ export class InteractionHandler {
|
|
|
190
153
|
PerformanceEvents.AuthClientAcquireToken,
|
|
191
154
|
this.logger,
|
|
192
155
|
this.performanceClient,
|
|
193
|
-
|
|
156
|
+
request.correlationId
|
|
194
157
|
)(this.authCodeRequest, authCodeResponse)) as AuthenticationResult;
|
|
195
|
-
this.browserStorage.cleanRequestByState(state);
|
|
196
158
|
return tokenResponse;
|
|
197
159
|
}
|
|
198
160
|
|
|
199
161
|
/**
|
|
200
|
-
*
|
|
201
|
-
* @param cloudInstanceHostname
|
|
202
|
-
* @param authority
|
|
203
|
-
* @param networkModule
|
|
162
|
+
* Build ccs creds if available
|
|
204
163
|
*/
|
|
205
|
-
protected
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
)
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
networkModule,
|
|
219
|
-
this.browserStorage,
|
|
220
|
-
authority.options,
|
|
221
|
-
this.logger,
|
|
222
|
-
this.performanceClient,
|
|
223
|
-
this.authCodeRequest.correlationId
|
|
224
|
-
);
|
|
225
|
-
this.authModule.updateAuthority(cloudInstanceAuthority);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Looks up ccs creds in the cache
|
|
230
|
-
*/
|
|
231
|
-
protected checkCcsCredentials(): CcsCredential | null {
|
|
232
|
-
// Look up ccs credential in temp cache
|
|
233
|
-
const cachedCcsCred = this.browserStorage.getTemporaryCache(
|
|
234
|
-
TemporaryCacheKeys.CCS_CREDENTIAL,
|
|
235
|
-
true
|
|
236
|
-
);
|
|
237
|
-
if (cachedCcsCred) {
|
|
238
|
-
try {
|
|
239
|
-
return JSON.parse(cachedCcsCred) as CcsCredential;
|
|
240
|
-
} catch (e) {
|
|
241
|
-
this.authModule.logger.error(
|
|
242
|
-
"Cache credential could not be parsed"
|
|
243
|
-
);
|
|
244
|
-
this.authModule.logger.errorPii(
|
|
245
|
-
`Cache credential could not be parsed: ${cachedCcsCred}`
|
|
246
|
-
);
|
|
247
|
-
}
|
|
164
|
+
protected createCcsCredentials(
|
|
165
|
+
request: AuthorizationUrlRequest
|
|
166
|
+
): CcsCredential | null {
|
|
167
|
+
if (request.account) {
|
|
168
|
+
return {
|
|
169
|
+
credential: request.account.homeAccountId,
|
|
170
|
+
type: CcsCredentialType.HOME_ACCOUNT_ID,
|
|
171
|
+
};
|
|
172
|
+
} else if (request.loginHint) {
|
|
173
|
+
return {
|
|
174
|
+
credential: request.loginHint,
|
|
175
|
+
type: CcsCredentialType.UPN,
|
|
176
|
+
};
|
|
248
177
|
}
|
|
178
|
+
|
|
249
179
|
return null;
|
|
250
180
|
}
|
|
251
181
|
}
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
import {
|
|
7
7
|
AuthorizationCodeClient,
|
|
8
8
|
CommonAuthorizationCodeRequest,
|
|
9
|
-
ICrypto,
|
|
10
|
-
Authority,
|
|
11
|
-
INetworkModule,
|
|
12
9
|
Logger,
|
|
13
10
|
ServerError,
|
|
14
11
|
IPerformanceClient,
|
|
15
12
|
createClientAuthError,
|
|
16
13
|
ClientAuthErrorCodes,
|
|
14
|
+
CcsCredential,
|
|
15
|
+
invokeAsync,
|
|
16
|
+
PerformanceEvents,
|
|
17
17
|
} from "@azure/msal-common";
|
|
18
18
|
import {
|
|
19
19
|
createBrowserAuthError,
|
|
@@ -21,37 +21,36 @@ import {
|
|
|
21
21
|
} from "../error/BrowserAuthError";
|
|
22
22
|
import { ApiId, TemporaryCacheKeys } from "../utils/BrowserConstants";
|
|
23
23
|
import { BrowserCacheManager } from "../cache/BrowserCacheManager";
|
|
24
|
-
import { InteractionHandler, InteractionParams } from "./InteractionHandler";
|
|
25
24
|
import { INavigationClient } from "../navigation/INavigationClient";
|
|
26
25
|
import { NavigationOptions } from "../navigation/NavigationOptions";
|
|
27
26
|
import { AuthenticationResult } from "../response/AuthenticationResult";
|
|
28
27
|
|
|
29
|
-
export type RedirectParams =
|
|
28
|
+
export type RedirectParams = {
|
|
30
29
|
navigationClient: INavigationClient;
|
|
31
30
|
redirectTimeout: number;
|
|
32
31
|
redirectStartPage: string;
|
|
33
32
|
onRedirectNavigate?: (url: string) => void | boolean;
|
|
34
33
|
};
|
|
35
34
|
|
|
36
|
-
export class RedirectHandler
|
|
37
|
-
|
|
35
|
+
export class RedirectHandler {
|
|
36
|
+
authModule: AuthorizationCodeClient;
|
|
37
|
+
browserStorage: BrowserCacheManager;
|
|
38
|
+
authCodeRequest: CommonAuthorizationCodeRequest;
|
|
39
|
+
logger: Logger;
|
|
40
|
+
performanceClient: IPerformanceClient;
|
|
38
41
|
|
|
39
42
|
constructor(
|
|
40
43
|
authCodeModule: AuthorizationCodeClient,
|
|
41
44
|
storageImpl: BrowserCacheManager,
|
|
42
45
|
authCodeRequest: CommonAuthorizationCodeRequest,
|
|
43
46
|
logger: Logger,
|
|
44
|
-
browserCrypto: ICrypto,
|
|
45
47
|
performanceClient: IPerformanceClient
|
|
46
48
|
) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
performanceClient
|
|
53
|
-
);
|
|
54
|
-
this.browserCrypto = browserCrypto;
|
|
49
|
+
this.authModule = authCodeModule;
|
|
50
|
+
this.browserStorage = storageImpl;
|
|
51
|
+
this.authCodeRequest = authCodeRequest;
|
|
52
|
+
this.logger = logger;
|
|
53
|
+
this.performanceClient = performanceClient;
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
/**
|
|
@@ -144,9 +143,7 @@ export class RedirectHandler extends InteractionHandler {
|
|
|
144
143
|
*/
|
|
145
144
|
async handleCodeResponseFromHash(
|
|
146
145
|
locationHash: string,
|
|
147
|
-
state: string
|
|
148
|
-
authority: Authority,
|
|
149
|
-
networkModule: INetworkModule
|
|
146
|
+
state: string
|
|
150
147
|
): Promise<AuthenticationResult> {
|
|
151
148
|
this.logger.verbose("RedirectHandler.handleCodeResponse called");
|
|
152
149
|
|
|
@@ -197,10 +194,15 @@ export class RedirectHandler extends InteractionHandler {
|
|
|
197
194
|
|
|
198
195
|
// Check for new cloud instance
|
|
199
196
|
if (authCodeResponse.cloud_instance_host_name) {
|
|
200
|
-
await
|
|
197
|
+
await invokeAsync(
|
|
198
|
+
this.authModule.updateAuthority.bind(this.authModule),
|
|
199
|
+
PerformanceEvents.UpdateTokenEndpointAuthority,
|
|
200
|
+
this.logger,
|
|
201
|
+
this.performanceClient,
|
|
202
|
+
this.authCodeRequest.correlationId
|
|
203
|
+
)(
|
|
201
204
|
authCodeResponse.cloud_instance_host_name,
|
|
202
|
-
|
|
203
|
-
networkModule
|
|
205
|
+
this.authCodeRequest.correlationId
|
|
204
206
|
);
|
|
205
207
|
}
|
|
206
208
|
|
|
@@ -226,4 +228,28 @@ export class RedirectHandler extends InteractionHandler {
|
|
|
226
228
|
this.browserStorage.cleanRequestByState(state);
|
|
227
229
|
return tokenResponse;
|
|
228
230
|
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Looks up ccs creds in the cache
|
|
234
|
+
*/
|
|
235
|
+
protected checkCcsCredentials(): CcsCredential | null {
|
|
236
|
+
// Look up ccs credential in temp cache
|
|
237
|
+
const cachedCcsCred = this.browserStorage.getTemporaryCache(
|
|
238
|
+
TemporaryCacheKeys.CCS_CREDENTIAL,
|
|
239
|
+
true
|
|
240
|
+
);
|
|
241
|
+
if (cachedCcsCred) {
|
|
242
|
+
try {
|
|
243
|
+
return JSON.parse(cachedCcsCred) as CcsCredential;
|
|
244
|
+
} catch (e) {
|
|
245
|
+
this.authModule.logger.error(
|
|
246
|
+
"Cache credential could not be parsed"
|
|
247
|
+
);
|
|
248
|
+
this.authModule.logger.errorPii(
|
|
249
|
+
`Cache credential could not be parsed: ${cachedCcsCred}`
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
229
255
|
}
|
package/src/packageMetadata.ts
CHANGED