intelica-library-ui 0.1.50 → 0.1.52
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.
|
@@ -329,6 +329,9 @@ const RefreshTokenInterceptor = (req, next) => {
|
|
|
329
329
|
let _request = req.clone();
|
|
330
330
|
let authenticationLocation = `${configService.environment?.authenticationWeb}?callback=${window.location.href}&clientID=${configService.environment?.clientID}`;
|
|
331
331
|
let path = `${configService.environment?.authenticationPath ?? ""}/Authenticate/ValidateToken`;
|
|
332
|
+
var authenticationClientID = configService.environment?.clientID ?? "";
|
|
333
|
+
console.log(authenticationClientID);
|
|
334
|
+
console.log(getCookie(authenticationClientID));
|
|
332
335
|
let validateTokenQuery = {
|
|
333
336
|
token: getCookie("token") ?? "",
|
|
334
337
|
refreshToken: getCookie("refreshToken") ?? "",
|
|
@@ -338,6 +341,7 @@ const RefreshTokenInterceptor = (req, next) => {
|
|
|
338
341
|
controller: "",
|
|
339
342
|
httpVerb: "GET",
|
|
340
343
|
businessUserClientGroupID: getCookie("businessUserClientGroupID") ?? "",
|
|
344
|
+
access: authenticationClientID == "" ? "" : getCookie(authenticationClientID) ?? "",
|
|
341
345
|
};
|
|
342
346
|
if (!req.url.includes("ValidateToken") && !req.url.includes("environment.json") && !req.url.includes("GetAuthenticationFromCache"))
|
|
343
347
|
return from(httpClient.post(path, validateTokenQuery)).pipe(switchMap((response) => {
|
|
@@ -348,6 +352,7 @@ const RefreshTokenInterceptor = (req, next) => {
|
|
|
348
352
|
Cookies.remove("businessUserClientGroupID", CookieAttributesGeneral);
|
|
349
353
|
Cookies.remove("defaultClientID", CookieAttributesGeneral);
|
|
350
354
|
Cookies.remove("defaultClientGroupID", CookieAttributesGeneral);
|
|
355
|
+
Cookies.remove(authenticationClientID, CookieAttributesGeneral);
|
|
351
356
|
window.location.href = authenticationLocation;
|
|
352
357
|
return next(_request);
|
|
353
358
|
}
|