@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 +18 -1
- package/dist/wazo-sdk.js +2 -2
- package/esm/simple/Auth.js +5 -0
- package/esm/simple/__tests__/Auth.test.js +24 -0
- package/esm/simple/index.js +2 -1
- package/esm/types/simple/Auth.d.ts +2 -0
- package/esm/types/simple/Auth.d.ts.map +1 -1
- package/esm/types/simple/index.d.ts +2 -1
- package/esm/types/simple/index.d.ts.map +1 -1
- package/lib/simple/Auth.js +7 -1
- package/lib/simple/__tests__/Auth.test.js +24 -0
- package/lib/simple/index.js +1 -0
- package/lib/types/simple/Auth.d.ts +2 -0
- package/lib/types/simple/Auth.d.ts.map +1 -1
- package/lib/types/simple/index.d.ts +2 -1
- package/lib/types/simple/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/simple/Auth.ts +5 -0
- package/src/simple/__tests__/Auth.test.ts +32 -0
- package/src/simple/index.ts +2 -1
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
|
|