@asgardeo/browser 0.1.11 → 0.1.13

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/index.d.ts CHANGED
@@ -34,3 +34,4 @@ export { default as hasAuthParamsInUrl } from './utils/hasAuthParamsInUrl';
34
34
  export { default as AsgardeoBrowserClient } from './AsgardeoBrowserClient';
35
35
  export * from '@asgardeo/javascript';
36
36
  export { detectThemeMode, createClassObserver, createMediaQueryListener, BrowserThemeDetection, } from './theme/themeDetection';
37
+ export { default as http } from './utils/http';
package/dist/index.js CHANGED
@@ -2971,7 +2971,7 @@ var MainThreadClient = async (instanceID, config, getAuthHelper) => {
2971
2971
  const isCheckSessionIframeDifferent = !(existingConfig && existingConfig.endpoints && existingConfig.endpoints.checkSessionIframe && newConfig && newConfig.endpoints && newConfig.endpoints.checkSessionIframe && existingConfig.endpoints.checkSessionIframe === newConfig.endpoints.checkSessionIframe);
2972
2972
  const config2 = { ...existingConfig, ...newConfig };
2973
2973
  await _authenticationClient.reInitialize(config2);
2974
- if (config2.enableOIDCSessionManagement && isCheckSessionIframeDifferent) {
2974
+ if (config2.syncSession && isCheckSessionIframeDifferent) {
2975
2975
  _sessionManagementHelper.reset();
2976
2976
  checkSession();
2977
2977
  }
@@ -3319,7 +3319,7 @@ var AuthenticationHelper = class {
3319
3319
  this._spaHelper.clearRefreshTokenTimeout();
3320
3320
  this._spaHelper.refreshAccessTokenAutomatically(this);
3321
3321
  }
3322
- if (checkSession && typeof checkSession === "function" && config.enableOIDCSessionManagement) {
3322
+ if (checkSession && typeof checkSession === "function" && config.syncSession) {
3323
3323
  checkSession();
3324
3324
  }
3325
3325
  } else {
@@ -3406,7 +3406,7 @@ var AuthenticationHelper = class {
3406
3406
  if (await this._authenticationClient.isSignedIn()) {
3407
3407
  this._spaHelper.clearRefreshTokenTimeout();
3408
3408
  this._spaHelper.refreshAccessTokenAutomatically(this);
3409
- if (config.enableOIDCSessionManagement) {
3409
+ if (config.syncSession) {
3410
3410
  checkSession();
3411
3411
  }
3412
3412
  return Promise.resolve(await this._authenticationClient.getUser());
@@ -3752,7 +3752,7 @@ var WebWorkerClient = async (instanceID, config, webWorker, getAuthHelper) => {
3752
3752
  };
3753
3753
  return communicate(message2).then((url) => {
3754
3754
  SPAUtils.setSignOutURL(url, config2.clientId, instanceID);
3755
- if (config2.enableOIDCSessionManagement) {
3755
+ if (config2.syncSession) {
3756
3756
  checkSession();
3757
3757
  }
3758
3758
  startAutoRefreshToken();
@@ -3772,7 +3772,7 @@ var WebWorkerClient = async (instanceID, config, webWorker, getAuthHelper) => {
3772
3772
  const tryRetrievingUserInfo = async () => {
3773
3773
  if (await isSignedIn()) {
3774
3774
  await startAutoRefreshToken();
3775
- if (config.enableOIDCSessionManagement) {
3775
+ if (config.syncSession) {
3776
3776
  checkSession();
3777
3777
  }
3778
3778
  return getUser();
@@ -3968,7 +3968,7 @@ var WebWorkerClient = async (instanceID, config, webWorker, getAuthHelper) => {
3968
3968
  type: UPDATE_CONFIG
3969
3969
  };
3970
3970
  await communicate(message);
3971
- if (config2.enableOIDCSessionManagement && isCheckSessionIframeDifferent) {
3971
+ if (config2.syncSession && isCheckSessionIframeDifferent) {
3972
3972
  _sessionManagementHelper.reset();
3973
3973
  checkSession();
3974
3974
  }
@@ -4005,7 +4005,7 @@ var WebWorkerClient = async (instanceID, config, webWorker, getAuthHelper) => {
4005
4005
  var DefaultConfig = {
4006
4006
  autoLogoutOnTokenRefreshError: false,
4007
4007
  checkSessionInterval: 3,
4008
- enableOIDCSessionManagement: false,
4008
+ syncSession: false,
4009
4009
  periodicTokenRefresh: false,
4010
4010
  sessionRefreshInterval: 300,
4011
4011
  storage: "sessionStorage" /* SessionStorage */
@@ -5417,6 +5417,25 @@ var createMediaQueryListener = (callback) => {
5417
5417
  }
5418
5418
  return mediaQuery;
5419
5419
  };
5420
+
5421
+ // src/utils/http.ts
5422
+ var http = {
5423
+ /**
5424
+ * Makes a single HTTP request using the AsgardeoSPAClient instance.
5425
+ *
5426
+ * @param config - The HTTP request configuration object.
5427
+ * @returns A promise resolving to the HTTP response.
5428
+ */
5429
+ request: AsgardeoSPAClient.getInstance().httpRequest.bind(AsgardeoSPAClient.getInstance()),
5430
+ /**
5431
+ * Makes multiple HTTP requests in parallel using the AsgardeoSPAClient instance.
5432
+ *
5433
+ * @param configs - An array of HTTP request configuration objects.
5434
+ * @returns A promise resolving to an array of HTTP responses.
5435
+ */
5436
+ requestAll: AsgardeoSPAClient.getInstance().httpRequestAll.bind(AsgardeoSPAClient.getInstance())
5437
+ };
5438
+ var http_default = http;
5420
5439
  export {
5421
5440
  AsgardeoBrowserClient_default as AsgardeoBrowserClient,
5422
5441
  AsgardeoSPAClient,
@@ -5444,6 +5463,7 @@ export {
5444
5463
  createMediaQueryListener,
5445
5464
  detectThemeMode,
5446
5465
  hasAuthParamsInUrl_default as hasAuthParamsInUrl,
5466
+ http_default as http,
5447
5467
  workerReceiver
5448
5468
  };
5449
5469
  /*! Bundled license information: