@nsshunt/stsoauth2plugin 1.0.62 → 1.0.63

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.
@@ -2648,7 +2648,7 @@ var __privateMethod = (obj, member, method) => {
2648
2648
  message: error
2649
2649
  });
2650
2650
  setTimeout(() => {
2651
- __privateGet(this, _router).replace("/error");
2651
+ __privateGet(this, _router).replace(`${__privateGet(this, _options).uriBase}error`);
2652
2652
  }, 0);
2653
2653
  }
2654
2654
  });
@@ -2669,29 +2669,29 @@ var __privateMethod = (obj, member, method) => {
2669
2669
  debug(chalk$1.gray(`beforeEach: from: [${from.path}], to: [${to.path}]`));
2670
2670
  if (__privateGet(this, _GetStore).call(this).LoggedIn === false) {
2671
2671
  console.log(`Not logged in`);
2672
- if (to.path.localeCompare("/authorize") === 0) {
2673
- console.log(`to = /authorize`);
2672
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}authorize`) === 0) {
2673
+ console.log(`to = ${__privateGet(this, _options).uriBase}authorize`);
2674
2674
  next();
2675
2675
  return;
2676
- } else if (to.path.localeCompare("/consent") === 0) {
2676
+ } else if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}consent`) === 0) {
2677
2677
  if (__privateGet(this, _GetStore).call(this).id_token) {
2678
2678
  next();
2679
2679
  return;
2680
2680
  }
2681
2681
  }
2682
- if (to.path.localeCompare("/logout") === 0) {
2682
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}logout`) === 0) {
2683
2683
  next();
2684
2684
  return;
2685
2685
  }
2686
- if (to.path.localeCompare("/error") === 0) {
2686
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}error`) === 0) {
2687
2687
  next();
2688
2688
  return;
2689
2689
  }
2690
- if (to.path.localeCompare("/config") === 0) {
2690
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}config`) === 0) {
2691
2691
  next();
2692
2692
  return;
2693
2693
  }
2694
- if (to.path.localeCompare("/redirected") === 0) {
2694
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}redirected`) === 0) {
2695
2695
  next();
2696
2696
  return;
2697
2697
  }
@@ -2702,13 +2702,13 @@ var __privateMethod = (obj, member, method) => {
2702
2702
  debug(chalk$1.magenta(`STSOAuth2Manager:#SetupRoute:Redirect result: [${retVal}]`));
2703
2703
  if (retVal) {
2704
2704
  next({
2705
- path: "/",
2705
+ path: `${__privateGet(this, _options).uriBase}`,
2706
2706
  replace: true
2707
2707
  });
2708
2708
  return;
2709
2709
  } else {
2710
2710
  next({
2711
- path: "/error",
2711
+ path: `${__privateGet(this, _options).uriBase}error`,
2712
2712
  replace: true
2713
2713
  });
2714
2714
  return;
@@ -2723,20 +2723,20 @@ var __privateMethod = (obj, member, method) => {
2723
2723
  next();
2724
2724
  return;
2725
2725
  } else {
2726
- next("/");
2726
+ next(`${__privateGet(this, _options).uriBase}`);
2727
2727
  return;
2728
2728
  }
2729
2729
  } else {
2730
- if (to.path.localeCompare("/consent") === 0) {
2731
- next("/");
2730
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}consent`) === 0) {
2731
+ next(`${__privateGet(this, _options).uriBase}`);
2732
2732
  return;
2733
2733
  }
2734
- if (to.path.localeCompare("/authorize") === 0) {
2735
- next("/");
2734
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}authorize`) === 0) {
2735
+ next(`${__privateGet(this, _options).uriBase}`);
2736
2736
  return;
2737
2737
  }
2738
- if (to.path.localeCompare("/logout") === 0) {
2739
- next("/");
2738
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}logout`) === 0) {
2739
+ next(`${__privateGet(this, _options).uriBase}`);
2740
2740
  return;
2741
2741
  }
2742
2742
  next();
@@ -2905,17 +2905,6 @@ var __privateMethod = (obj, member, method) => {
2905
2905
  __privateGet(this, _SetupRoute).call(this, app, __privateGet(this, _router));
2906
2906
  }
2907
2907
  }
2908
- /*
2909
- GetIDToken = async (): Promise<string> => {
2910
- try {
2911
- const response: IOauth2ListenerMessageResponse = await this.#PostMessage({ command: IOauth2ListenerCommand.ID_TOKEN });
2912
- return response.payload;
2913
- } catch (error) {
2914
- console.log(chalk.red(`Logout Error: ${error}`));
2915
- return null;
2916
- }
2917
- }
2918
- */
2919
2908
  }
2920
2909
  _router = new WeakMap();
2921
2910
  _cUtils = new WeakMap();