@asgardeo/javascript 0.5.1 → 0.6.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/index.js CHANGED
@@ -567,6 +567,15 @@ var TokenExchangeConstants = {
567
567
  };
568
568
  var TokenExchangeConstants_default = TokenExchangeConstants;
569
569
 
570
+ // src/models/platforms.ts
571
+ var Platform = /* @__PURE__ */ ((Platform2) => {
572
+ Platform2["Asgardeo"] = "ASGARDEO";
573
+ Platform2["IdentityServer"] = "IDENTITY_SERVER";
574
+ Platform2["AsgardeoV2"] = "AsgardeoV2";
575
+ Platform2["Unknown"] = "UNKNOWN";
576
+ return Platform2;
577
+ })(Platform || {});
578
+
570
579
  // src/utils/extractUserClaimsFromIdToken.ts
571
580
  var extractUserClaimsFromIdToken = (payload) => {
572
581
  const filteredPayload = { ...payload };
@@ -762,6 +771,9 @@ var AuthenticationHelper = class {
762
771
  [OIDCDiscoveryConstants_default.Storage.StorageKeys.Endpoints.TOKEN]: `${baseUrl}${OIDCDiscoveryConstants_default.Endpoints.TOKEN}`,
763
772
  [OIDCDiscoveryConstants_default.Storage.StorageKeys.Endpoints.USERINFO]: `${baseUrl}${OIDCDiscoveryConstants_default.Endpoints.USERINFO}`
764
773
  };
774
+ if (configData.platform === "AsgardeoV2" /* AsgardeoV2 */) {
775
+ defaultEndpoints[OIDCDiscoveryConstants_default.Storage.StorageKeys.Endpoints.ISSUER] = `${baseUrl}`;
776
+ }
765
777
  return { ...defaultEndpoints, ...oidcProviderMetaData };
766
778
  }
767
779
  async validateIdToken(idToken) {
@@ -3148,15 +3160,6 @@ var VendorConstants = {
3148
3160
  };
3149
3161
  var VendorConstants_default = VendorConstants;
3150
3162
 
3151
- // src/models/platforms.ts
3152
- var Platform = /* @__PURE__ */ ((Platform2) => {
3153
- Platform2["Asgardeo"] = "ASGARDEO";
3154
- Platform2["IdentityServer"] = "IDENTITY_SERVER";
3155
- Platform2["AsgardeoV2"] = "AsgardeoV2";
3156
- Platform2["Unknown"] = "UNKNOWN";
3157
- return Platform2;
3158
- })(Platform || {});
3159
-
3160
3163
  // src/models/embedded-signin-flow.ts
3161
3164
  var EmbeddedSignInFlowStatus2 = /* @__PURE__ */ ((EmbeddedSignInFlowStatus3) => {
3162
3165
  EmbeddedSignInFlowStatus3["FailCompleted"] = "FAIL_COMPLETED";