@wazo/sdk 0.43.2 → 0.43.3

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/README.md CHANGED
@@ -246,12 +246,29 @@ Returns as `Wazo.domain.Session`. This object contains, among other information,
246
246
  Note: you need to set `clientId` in your WazoAPIClient in order to get a refresh token in the returned `Session`.
247
247
 
248
248
  #### Authenticating a user with SAML
249
+ ```js
250
+ const response = await Wazo.Auth.initiateIdpAuthentication(domain, redirectUrl);
251
+ ```
252
+
253
+ - `domain`: string
254
+ - The domain name of the tenant
255
+
256
+ - `redirectUrl`: string
257
+ - Where to redirect the browser once the login succeeds
258
+
259
+ Returns an object that contains a `location` and a `saml_session_id`
260
+
261
+ `location` is the URL to open for the user to log in through an identity provider.
262
+
263
+ `saml_session_id` needs to be used to create a wazo-auth token once the SAML authentication has been completed successfully.
264
+
265
+
249
266
  ```js
250
267
  const session = await Wazo.Auth.samlLogIn(samlSessionId);
251
268
  ```
252
269
 
253
270
  - `samlSessionId`: string
254
- - samlSessionId generated by wazo-auth
271
+ - samlSessionId generated by wazo-auth, returned by `initiateIdpAuthentication`
255
272
 
256
273
  Returns as `Wazo.domain.Session`. This object contains, among other information, the user's token.
257
274