@inweb/client 25.4.0 → 25.4.2

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/client.js CHANGED
@@ -3496,7 +3496,7 @@
3496
3496
  return this.data.projectsLimit;
3497
3497
  }
3498
3498
  /**
3499
- * The user's API key.
3499
+ * The user's access token (API key). Use {@link Client.signInWithToken()} to log in using token.
3500
3500
  *
3501
3501
  * @readonly
3502
3502
  */
@@ -3727,7 +3727,7 @@
3727
3727
  .then((data) => ({
3728
3728
  ...data,
3729
3729
  server: data.version,
3730
- client: "25.4.0",
3730
+ client: "25.4.2",
3731
3731
  }));
3732
3732
  }
3733
3733
  /**
@@ -3788,11 +3788,10 @@
3788
3788
  return this.setCurrentUser(data);
3789
3789
  }
3790
3790
  /**
3791
- * Log in an existing user using API Key.
3791
+ * Log in an existing user using access token (API Key).
3792
3792
  *
3793
3793
  * @async
3794
- * @param token - An access token for authentication request. See
3795
- * {@link User#token | User.token} for more details.
3794
+ * @param token - An access token for authentication request. See {@link User.token} for more details.
3796
3795
  */
3797
3796
  async signInWithToken(token) {
3798
3797
  this._httpClient.headers = { Authorization: token };
@@ -3800,6 +3799,18 @@
3800
3799
  const data = await response.json();
3801
3800
  return this.setCurrentUser(data);
3802
3801
  }
3802
+ /**
3803
+ * Get the list of server indentity providers.
3804
+ *
3805
+ * To sign in with the provider in your web application:
3806
+ *
3807
+ * - Open the `provider.url` link using `window.open()`.
3808
+ * - Add a `/oauth` path (server-defined) handler to the router. In this handler, show an error
3809
+ * message if the `error` search parameter is present, or log in with the `token` search parameter.
3810
+ */
3811
+ getIdentityProviders() {
3812
+ return this._httpClient.get("/identity").then((response) => response.json());
3813
+ }
3803
3814
  // Save the current logged in user information for internal use.
3804
3815
  setCurrentUser(data) {
3805
3816
  this._user = new User(data, this._httpClient);
@@ -4407,7 +4418,7 @@
4407
4418
  }
4408
4419
 
4409
4420
  ///////////////////////////////////////////////////////////////////////////////
4410
- const version = "25.4.0";
4421
+ const version = "25.4.2";
4411
4422
 
4412
4423
  exports.Assembly = Assembly;
4413
4424
  exports.ClashTest = ClashTest;