@nsshunt/stsoauth2plugin 1.0.62 → 1.0.64

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.
@@ -2638,7 +2638,7 @@ class STSOAuth2Manager {
2638
2638
  message: error
2639
2639
  });
2640
2640
  setTimeout(() => {
2641
- __privateGet(this, _router).replace("/error");
2641
+ __privateGet(this, _router).replace(`${__privateGet(this, _options).uriBase}error`);
2642
2642
  }, 0);
2643
2643
  }
2644
2644
  });
@@ -2659,29 +2659,29 @@ class STSOAuth2Manager {
2659
2659
  debug(chalk$1.gray(`beforeEach: from: [${from.path}], to: [${to.path}]`));
2660
2660
  if (__privateGet(this, _GetStore).call(this).LoggedIn === false) {
2661
2661
  console.log(`Not logged in`);
2662
- if (to.path.localeCompare("/authorize") === 0) {
2663
- console.log(`to = /authorize`);
2662
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}authorize`) === 0) {
2663
+ console.log(`to = ${__privateGet(this, _options).uriBase}authorize`);
2664
2664
  next();
2665
2665
  return;
2666
- } else if (to.path.localeCompare("/consent") === 0) {
2666
+ } else if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}consent`) === 0) {
2667
2667
  if (__privateGet(this, _GetStore).call(this).id_token) {
2668
2668
  next();
2669
2669
  return;
2670
2670
  }
2671
2671
  }
2672
- if (to.path.localeCompare("/logout") === 0) {
2672
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}logout`) === 0) {
2673
2673
  next();
2674
2674
  return;
2675
2675
  }
2676
- if (to.path.localeCompare("/error") === 0) {
2676
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}error`) === 0) {
2677
2677
  next();
2678
2678
  return;
2679
2679
  }
2680
- if (to.path.localeCompare("/config") === 0) {
2680
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}config`) === 0) {
2681
2681
  next();
2682
2682
  return;
2683
2683
  }
2684
- if (to.path.localeCompare("/redirected") === 0) {
2684
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}redirected`) === 0) {
2685
2685
  next();
2686
2686
  return;
2687
2687
  }
@@ -2692,13 +2692,13 @@ class STSOAuth2Manager {
2692
2692
  debug(chalk$1.magenta(`STSOAuth2Manager:#SetupRoute:Redirect result: [${retVal}]`));
2693
2693
  if (retVal) {
2694
2694
  next({
2695
- path: "/",
2695
+ path: `${__privateGet(this, _options).uriBase}`,
2696
2696
  replace: true
2697
2697
  });
2698
2698
  return;
2699
2699
  } else {
2700
2700
  next({
2701
- path: "/error",
2701
+ path: `${__privateGet(this, _options).uriBase}error`,
2702
2702
  replace: true
2703
2703
  });
2704
2704
  return;
@@ -2713,20 +2713,20 @@ class STSOAuth2Manager {
2713
2713
  next();
2714
2714
  return;
2715
2715
  } else {
2716
- next("/");
2716
+ next(`${__privateGet(this, _options).uriBase}`);
2717
2717
  return;
2718
2718
  }
2719
2719
  } else {
2720
- if (to.path.localeCompare("/consent") === 0) {
2721
- next("/");
2720
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}consent`) === 0) {
2721
+ next(`${__privateGet(this, _options).uriBase}`);
2722
2722
  return;
2723
2723
  }
2724
- if (to.path.localeCompare("/authorize") === 0) {
2725
- next("/");
2724
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}authorize`) === 0) {
2725
+ next(`${__privateGet(this, _options).uriBase}`);
2726
2726
  return;
2727
2727
  }
2728
- if (to.path.localeCompare("/logout") === 0) {
2729
- next("/");
2728
+ if (to.path.localeCompare(`${__privateGet(this, _options).uriBase}logout`) === 0) {
2729
+ next(`${__privateGet(this, _options).uriBase}`);
2730
2730
  return;
2731
2731
  }
2732
2732
  next();
@@ -2895,17 +2895,6 @@ class STSOAuth2Manager {
2895
2895
  __privateGet(this, _SetupRoute).call(this, app, __privateGet(this, _router));
2896
2896
  }
2897
2897
  }
2898
- /*
2899
- GetIDToken = async (): Promise<string> => {
2900
- try {
2901
- const response: IOauth2ListenerMessageResponse = await this.#PostMessage({ command: IOauth2ListenerCommand.ID_TOKEN });
2902
- return response.payload;
2903
- } catch (error) {
2904
- console.log(chalk.red(`Logout Error: ${error}`));
2905
- return null;
2906
- }
2907
- }
2908
- */
2909
2898
  }
2910
2899
  _router = new WeakMap();
2911
2900
  _cUtils = new WeakMap();