diff --git a/CHANGELOG.md b/CHANGELOG.md index 00a46b1ba..bdb3dceaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Change Log +## [v2.34.0](https://github.com/auth0/node-auth0/tree/v2.34.0) (2021-03-24) + +**Added** + +- feat(orgs): Support Organization feature [\#592](https://github.com/auth0/node-auth0/pull/592) ([mcastany](https://github.com/mcastany)) +- Org idtoken validation support [\#597](https://github.com/auth0/node-auth0/pull/597) ([davidpatrick](https://github.com/davidpatrick)) +- Allow passwordless SMS code verification to use token endpoint [\#591](https://github.com/auth0/node-auth0/pull/591) ([jimmyjames](https://github.com/jimmyjames)) + +**Changed** + +- Doc Updates [\#599](https://github.com/auth0/node-auth0/pull/599) ([davidpatrick](https://github.com/davidpatrick)) +- Update get role users docs [\#587](https://github.com/auth0/node-auth0/pull/587) ([jhiner](https://github.com/jhiner)) +- revokeRefreshToken method is missing in docs [\#584](https://github.com/auth0/node-auth0/issues/584) + +**Security** + +- [Security] Bump elliptic from 6.5.3 to 6.5.4 [\#589](https://github.com/auth0/node-auth0/pull/589) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview)) + +[Full Changelog](https://github.com/auth0/node-auth0/compare/v2.33.0...v2.34.0) + ## [v2.33.0](https://github.com/auth0/node-auth0/tree/v2.33.0) (2021-02-05) **Added** diff --git a/docs/RetryRestClient.js.html b/docs/RetryRestClient.js.html index 144886bd2..8d158fdcc 100644 --- a/docs/RetryRestClient.js.html +++ b/docs/RetryRestClient.js.html @@ -24,7 +24,7 @@
@@ -159,7 +159,7 @@

RetryRestClient.js


diff --git a/docs/auth_DatabaseAuthenticator.js.html b/docs/auth_DatabaseAuthenticator.js.html index 4b2289bb9..d4104713e 100644 --- a/docs/auth_DatabaseAuthenticator.js.html +++ b/docs/auth_DatabaseAuthenticator.js.html @@ -24,7 +24,7 @@
@@ -348,7 +348,7 @@

auth/DatabaseAuthenticator.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/auth_OAUthWithIDTokenValidation.js.html b/docs/auth_OAUthWithIDTokenValidation.js.html index 16b1a7b58..6dc9c7e1e 100644 --- a/docs/auth_OAUthWithIDTokenValidation.js.html +++ b/docs/auth_OAUthWithIDTokenValidation.js.html @@ -24,7 +24,7 @@
@@ -127,6 +127,10 @@

auth/OAUthWithIDTokenValidation.js

issuer: 'https://' + this.domain + '/' }; + if (data.organization) { + options.organization = data.organization; + } + if (data.nonce) { options.nonce = data.nonce; } @@ -175,7 +179,7 @@

auth/OAUthWithIDTokenValidation.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/auth_OAuthAuthenticator.js.html b/docs/auth_OAuthAuthenticator.js.html index dce2ec4fc..7af05990c 100644 --- a/docs/auth_OAuthAuthenticator.js.html +++ b/docs/auth_OAuthAuthenticator.js.html @@ -24,7 +24,7 @@
@@ -395,14 +395,15 @@

auth/OAuthAuthenticator.js

* </a>. * </caption> * - * var data = { + * var options = { * code: '{CODE}', * redirect_uri: '{REDIRECT_URI}', * client_id: '{CLIENT_ID}', // Optional field. * client_secret: '{CLIENT_SECRET}', // Optional field. + * organization: '{ORGANIZATION_ID}' // Optiional field. * }; * - * auth0.oauth.authorizationCodeGrant(data, function (err, userData) { + * auth0.oauth.authorizationCodeGrant(options, function (err, userData) { * if (err) { * // Handle error. * } @@ -410,9 +411,10 @@

auth/OAuthAuthenticator.js

* console.log(userData); * }); * - * @param {Object} data Authorization code payload - * @param {String} userData.code Code in URL returned after authentication - * @param {String} userData.redirect_uri The URL to which Auth0 will redirect the browser after authorization has been granted by the user. + * @param {Object} options Authorization code payload + * @param {String} options.organization Organization ID + * @param {String} options.code Code in URL returned after authentication + * @param {String} options.redirect_uri The URL to which Auth0 will redirect the browser after authorization has been granted by the user. * * @return {Promise|undefined} */ @@ -461,7 +463,7 @@

auth/OAuthAuthenticator.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/auth_PasswordlessAuthenticator.js.html b/docs/auth_PasswordlessAuthenticator.js.html index 937c62240..b205c8fe0 100644 --- a/docs/auth_PasswordlessAuthenticator.js.html +++ b/docs/auth_PasswordlessAuthenticator.js.html @@ -24,7 +24,7 @@
@@ -101,14 +101,16 @@

auth/PasswordlessAuthenticator.js

* @method signIn * @memberOf module:auth.PasswordlessAuthenticator.prototype * @example <caption> - * Given the user credentials (`phone_number` and `code`), it will do the - * authentication on the provider and return a JSON with the `access_token` - * and `id_token` using `/oauth/ro` endpoint. + * Once you have a verification code, use this endpoint to login + * the user with their phone number/email and verification code. + * + * https://auth0.com/docs/api/authentication#authenticate-user * </caption> * * var data = { - * username: '{PHONE_NUMBER}', - * password: '{VERIFICATION_CODE}' + * username: '{PHONE_NUMBER OR EMAIL}', + * otp: '{VERIFICATION_CODE}', + * realm: '{sms or email}' // OPTIONAL DEFAULTS TO SMS * }; * * auth0.passwordless.signIn(data, function (err) { @@ -118,12 +120,27 @@

auth/PasswordlessAuthenticator.js

* }); * * @example <caption> - * To use `/oauth/token` endpoint, use `otp` and `realm` instead + * The user data object has the following structure. + * </caption> + * + * { + * id_token: String, + * access_token: String, + * token_type: String + * } + * + * @example <caption> + * LEGACY signIn using the `/oauth/ro` endpoint. When otp is not specified + * password is required. Given the user credentials (`phone_number` and `code`), + * it will do the authentication on the provider and return a JSON with + * the `access_token` and `id_token`. + * + * https://auth0.com/docs/api/authentication#resource-owner * </caption> * * var data = { * username: '{PHONE_NUMBER}', - * otp: '{VERIFICATION_CODE}' + * password: '{VERIFICATION_CODE}' * }; * * auth0.passwordless.signIn(data, function (err) { @@ -132,21 +149,11 @@

auth/PasswordlessAuthenticator.js

* } * }); * - * @example <caption> - * The user data object has the following structure. - * </caption> - * - * { - * id_token: String, - * access_token: String, - * token_type: String - * } - * * @param {Object} userData User credentials object. - * @param {String} userData.otp The user's verification code. - * @param {String} [userData.realm=sms] Realm string: "sms" or "email". * @param {String} userData.username The user's phone number if realm=sms, or the user's email if realm=email - * @param {String} userData.password [DEPRECATED] Password. + * @param {String} userData.otp The user's verification code. Required + * @param {String} [userData.realm=sms] Realm string: "sms" or "email". + * @param {String} [userData.password] [DEPRECATED] Password required if using legacy /oauth/ro endpoint * @param {String} [userData.connection=sms] [DEPRECATED] Connection string: "sms" or "email". * @param {Object} [options] Additional options. * @param {String} [options.forwardedFor] Value to be used for auth0-forwarded-for header @@ -344,7 +351,7 @@

auth/PasswordlessAuthenticator.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/auth_TokensManager.js.html b/docs/auth_TokensManager.js.html index 11e577a58..166785b27 100644 --- a/docs/auth_TokensManager.js.html +++ b/docs/auth_TokensManager.js.html @@ -24,7 +24,7 @@
@@ -45,7 +45,7 @@

auth/TokensManager.js

var ArgumentError = require('rest-facade').ArgumentError; /** - * @class + * @class TokensManager * Provides methods for getting token data and exchanging tokens. * @constructor * @memberOf module:auth @@ -74,7 +74,7 @@

auth/TokensManager.js

/** * Given an ID token get the user profile linked to it. * - * @method + * @method getInfo * @memberOf module:auth.TokensManager.prototype * * @example <caption> @@ -129,7 +129,7 @@

auth/TokensManager.js

* Exchange the token of the logged in user with a token that is valid to call * the API (signed with the API secret). * - * @method + * @method getDelegationToken * @memberOf module:auth.TokensManager.prototype * * @example <caption> @@ -218,7 +218,7 @@

auth/TokensManager.js

/** * Proactively revoke an issued refresh token. * - * @method + * @method revokeRefreshToken * @memberOf module:auth.TokensManager.prototype * * @example <caption> @@ -308,7 +308,7 @@

auth/TokensManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/auth_UsersManager.js.html b/docs/auth_UsersManager.js.html index 495f8bd2c..09364580e 100644 --- a/docs/auth_UsersManager.js.html +++ b/docs/auth_UsersManager.js.html @@ -24,7 +24,7 @@
@@ -45,7 +45,7 @@

auth/UsersManager.js

var ArgumentError = require('rest-facade').ArgumentError; /** - * @class + * @class UsersManager * Provides methods for getting user information and impersonating users. * @constructor * @memberOf module:auth @@ -223,7 +223,7 @@

auth/UsersManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/auth_idToken.js.html b/docs/auth_idToken.js.html index eba3c7554..14440fd55 100644 --- a/docs/auth_idToken.js.html +++ b/docs/auth_idToken.js.html @@ -24,7 +24,7 @@
@@ -120,6 +120,19 @@

auth/idToken.js

); } + // Organization + if (options.organization) { + if (!payload.org_id || typeof payload.org_id !== 'string') { + throw new Error('Organization Id (org_id) claim must be a string present in the ID token'); + } + + if (payload.org_id !== options.organization) { + throw new Error( + `Organization Id (org_id) claim value mismatch in the ID token; expected "${options.organization}", found "${payload.org_id}"'` + ); + } + } + // --Time validation (epoch)-- var now = Math.floor(Date.now() / 1000); var leeway = options.leeway || DEFAULT_LEEWAY; @@ -202,7 +215,7 @@

auth/idToken.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/auth_index.js.html b/docs/auth_index.js.html index 245203740..b2f9bd401 100644 --- a/docs/auth_index.js.html +++ b/docs/auth_index.js.html @@ -24,7 +24,7 @@
@@ -279,9 +279,28 @@

auth/index.js

* @memberOf module:auth.AuthenticationClient.prototype * * @example <caption> - * Given the user credentials (`phone_number` and `code`), it will do the - * authentication on the provider and return a JSON with the `access_token` - * and `id_token`. + * Given the user credentials (`phone_number` and `otp`), authenticates + * with the provider using the `/oauth/token` endpoint. Upon successful + * authentication, returns a JSON object containing the `access_token` and + * `id_token`. + * </caption> + * + * var data = { + * username: '{PHONE_NUMBER}' + * otp: '{VERIFICATION_CODE}' + * }; + * + * auth0.verifySMSCode(data, function (err) { + * if (err) { + * // Handle error. + * } + * }); + * + * @example <caption> + * Given the user credentials (`phone_number` and `password`), authenticates + * with the provider using the deprecated `/oauth/ro` endpoint. Upon successful + * authentication, returns a JSON object containing the `access_token` and + * `id_token`. * </caption> * * var data = { @@ -307,19 +326,23 @@

auth/index.js

* * @param {Object} data Credentials object. * @param {String} data.username Phone number. - * @param {String} data.password Verification code. - * @param {String} data.target Target client ID. - * @param {String} data.grant_type Grant type. + * @param {String} data.otp Verification code. Use this instead of `password` to use the `/oauth/token` endpoint. + * @param {String} data.password Verification code. Use this instead of `otp` to use the `/oauth/ro` endpoint. * @param {Function} [cb] Method callback. * * @return {Promise|undefined} */ AuthenticationClient.prototype.verifySMSCode = function(data, cb) { var translatedData = { - username: data.phoneNumber || data.phone_number || data.username, - password: data.code || data.password + username: data.phoneNumber || data.phone_number || data.username }; + if (data.otp) { + translatedData.otp = data.otp; + } else { + translatedData.password = data.code || data.password; + } + return this.passwordless.signIn(translatedData, cb); }; @@ -615,7 +638,7 @@

auth/index.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/errors.js.html b/docs/errors.js.html index f8d403520..ab443ef3a 100644 --- a/docs/errors.js.html +++ b/docs/errors.js.html @@ -24,7 +24,7 @@
@@ -111,7 +111,7 @@

errors.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/external-RestClient.html b/docs/external-RestClient.html index 94b7c6174..178ff1230 100644 --- a/docs/external-RestClient.html +++ b/docs/external-RestClient.html @@ -24,7 +24,7 @@
@@ -879,6 +879,106 @@

+ + + + + + +
Source:
+
+ + + + + +
See:
+
+ +
+ + + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +

+ RestClient +

+ + +
+ +
+
+ + +

Simple facade for consuming a REST API endpoint.

+ + + + + +
+ + + + + + + + + + + + + + + + + + + + @@ -1639,7 +1739,7 @@


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/global.html b/docs/global.html index 34c5399d7..ffaede064 100644 --- a/docs/global.html +++ b/docs/global.html @@ -24,7 +24,7 @@
@@ -423,7 +423,7 @@
Returns:

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/index.html b/docs/index.html index b821a38a1..1039a4cbf 100644 --- a/docs/index.html +++ b/docs/index.html @@ -24,7 +24,7 @@
@@ -176,7 +176,7 @@

License


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/index.js.html b/docs/index.js.html index ce3f96166..f9eb4dbe6 100644 --- a/docs/index.js.html +++ b/docs/index.js.html @@ -24,7 +24,7 @@
@@ -61,7 +61,7 @@

index.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_BlacklistedTokensManager.js.html b/docs/management_BlacklistedTokensManager.js.html index 873f9dd5d..93bb38212 100644 --- a/docs/management_BlacklistedTokensManager.js.html +++ b/docs/management_BlacklistedTokensManager.js.html @@ -24,7 +24,7 @@
@@ -153,7 +153,7 @@

management/BlacklistedTokensManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_BrandingManager.js.html b/docs/management_BrandingManager.js.html index 850c67ddc..83ea5af41 100644 --- a/docs/management_BrandingManager.js.html +++ b/docs/management_BrandingManager.js.html @@ -24,7 +24,7 @@
@@ -234,7 +234,7 @@

management/BrandingManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_ClientGrantsManager.js.html b/docs/management_ClientGrantsManager.js.html index 756dfb9d1..81a74f48e 100644 --- a/docs/management_ClientGrantsManager.js.html +++ b/docs/management_ClientGrantsManager.js.html @@ -24,7 +24,7 @@
@@ -216,7 +216,7 @@

management/ClientGrantsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_ClientsManager.js.html b/docs/management_ClientsManager.js.html index 8bd51efde..e875b7a62 100644 --- a/docs/management_ClientsManager.js.html +++ b/docs/management_ClientsManager.js.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@

management/ClientsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_ConnectionsManager.js.html b/docs/management_ConnectionsManager.js.html index f2fd1142f..2043094fa 100644 --- a/docs/management_ConnectionsManager.js.html +++ b/docs/management_ConnectionsManager.js.html @@ -24,7 +24,7 @@
@@ -284,7 +284,7 @@

management/ConnectionsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_CustomDomainsManager.js.html b/docs/management_CustomDomainsManager.js.html index cd2419bd0..40dc34621 100644 --- a/docs/management_CustomDomainsManager.js.html +++ b/docs/management_CustomDomainsManager.js.html @@ -24,7 +24,7 @@
@@ -241,7 +241,7 @@

management/CustomDomainsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_DeviceCredentialsManager.js.html b/docs/management_DeviceCredentialsManager.js.html index f2c945b4f..ff7d7a9d8 100644 --- a/docs/management_DeviceCredentialsManager.js.html +++ b/docs/management_DeviceCredentialsManager.js.html @@ -24,7 +24,7 @@
@@ -180,7 +180,7 @@

management/DeviceCredentialsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_EmailProviderManager.js.html b/docs/management_EmailProviderManager.js.html index c1f4410ed..062d4c42b 100644 --- a/docs/management_EmailProviderManager.js.html +++ b/docs/management_EmailProviderManager.js.html @@ -24,7 +24,7 @@
@@ -198,7 +198,7 @@

management/EmailProviderManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_EmailTemplatesManager.js.html b/docs/management_EmailTemplatesManager.js.html index 7e4ccd4bd..9ce9a579a 100644 --- a/docs/management_EmailTemplatesManager.js.html +++ b/docs/management_EmailTemplatesManager.js.html @@ -24,7 +24,7 @@
@@ -180,7 +180,7 @@

management/EmailTemplatesManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_GrantsManager.js.html b/docs/management_GrantsManager.js.html index bf324f0d6..a78b358ea 100644 --- a/docs/management_GrantsManager.js.html +++ b/docs/management_GrantsManager.js.html @@ -24,7 +24,7 @@
@@ -170,7 +170,7 @@

management/GrantsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_GuardianManager.js.html b/docs/management_GuardianManager.js.html index cded592d5..038c30937 100644 --- a/docs/management_GuardianManager.js.html +++ b/docs/management_GuardianManager.js.html @@ -24,7 +24,7 @@
@@ -559,7 +559,7 @@

management/GuardianManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_HooksManager.js.html b/docs/management_HooksManager.js.html index 1e154c771..5014befe2 100644 --- a/docs/management_HooksManager.js.html +++ b/docs/management_HooksManager.js.html @@ -24,7 +24,7 @@
@@ -419,7 +419,7 @@

management/HooksManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_JobsManager.js.html b/docs/management_JobsManager.js.html index 8ec7899d1..a87bd9479 100644 --- a/docs/management_JobsManager.js.html +++ b/docs/management_JobsManager.js.html @@ -24,7 +24,7 @@
@@ -405,6 +405,7 @@

management/JobsManager.js

* * @param {Object} data User data object. * @param {String} data.user_id ID of the user to be verified. + * @param {String} [data.organization_id] Organization ID * @param {String} [data.client_id] client_id of the client (application). If no value provided, the global Client ID will be used. * @param {Object} [data.identity] Used to verify secondary, federated, and passwordless-email identities. * @param {String} data.identity.user_id user_id of the identity. @@ -439,7 +440,7 @@

management/JobsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_LogStreamsManager.js.html b/docs/management_LogStreamsManager.js.html index e521dd0cd..5f3a15c2b 100644 --- a/docs/management_LogStreamsManager.js.html +++ b/docs/management_LogStreamsManager.js.html @@ -24,7 +24,7 @@
@@ -230,7 +230,7 @@

management/LogStreamsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_LogsManager.js.html b/docs/management_LogsManager.js.html index 8114f63a8..471055d87 100644 --- a/docs/management_LogsManager.js.html +++ b/docs/management_LogsManager.js.html @@ -24,7 +24,7 @@
@@ -165,7 +165,7 @@

management/LogsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_ManagementTokenProvider.js.html b/docs/management_ManagementTokenProvider.js.html index 9a11c9277..83c405ec1 100644 --- a/docs/management_ManagementTokenProvider.js.html +++ b/docs/management_ManagementTokenProvider.js.html @@ -24,7 +24,7 @@
@@ -194,7 +194,7 @@

management/ManagementTokenProvider.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_MigrationsManager.js.html b/docs/management_MigrationsManager.js.html index 6df0de382..6738fa8c8 100644 --- a/docs/management_MigrationsManager.js.html +++ b/docs/management_MigrationsManager.js.html @@ -24,7 +24,7 @@
@@ -159,7 +159,7 @@

management/MigrationsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_OrganizationsManager.js.html b/docs/management_OrganizationsManager.js.html new file mode 100644 index 000000000..293736c39 --- /dev/null +++ b/docs/management_OrganizationsManager.js.html @@ -0,0 +1,903 @@ + + + + + + management/OrganizationsManager.js - Documentation + + + + + + + + + + + + + + + + + +
+ +

management/OrganizationsManager.js

+ + + + + + + +
+
+
var ArgumentError = require('rest-facade').ArgumentError;
+var utils = require('../utils');
+var Auth0RestClient = require('../Auth0RestClient');
+var RetryRestClient = require('../RetryRestClient');
+
+/**
+ * Simple facade for consuming a REST API endpoint.
+ * @external RestClient
+ * @see https://github.com/ngonzalvez/rest-facade
+ */
+
+/**
+ * @class OrganizationsManager
+ * The organizations class provides a simple abstraction for performing CRUD operations
+ * on Auth0 OrganizationsManager.
+ * @constructor
+ * @memberOf module:management
+ *
+ * @param {Object} options            The client options.
+ * @param {String} options.baseUrl    The URL of the API.
+ * @param {Object} [options.headers]  Headers to be included in all requests.
+ * @param {Object} [options.retry]    Retry Policy Config
+ */
+var OrganizationsManager = function(options) {
+  if (options === null || typeof options !== 'object') {
+    throw new ArgumentError('Must provide manager options');
+  }
+
+  if (options.baseUrl === null || options.baseUrl === undefined) {
+    throw new ArgumentError('Must provide a base URL for the API');
+  }
+
+  if ('string' !== typeof options.baseUrl || options.baseUrl.length === 0) {
+    throw new ArgumentError('The provided base URL is invalid');
+  }
+
+  /**
+   * Options object for the Rest Client instance.
+   *
+   * @type {Object}
+   */
+  var clientOptions = {
+    headers: options.headers,
+    query: { repeatParams: false }
+  };
+
+  /**
+   * Provides an abstraction layer for performing CRUD operations on
+   * {@link https://auth0.com/docs/api/v2}.
+   *
+   * @type {external:RestClient}
+   */
+  var auth0RestClient = new Auth0RestClient(
+    options.baseUrl + '/organizations/:id',
+    clientOptions,
+    options.tokenProvider
+  );
+  this.organizations = new RetryRestClient(auth0RestClient, options.retry);
+
+  var connectionsInRoleClient = new Auth0RestClient(
+    options.baseUrl + '/organizations/:id/enabled_connections/:connection_id',
+    clientOptions,
+    options.tokenProvider
+  );
+  this.connections = new RetryRestClient(connectionsInRoleClient, options.retry);
+
+  var membersClient = new Auth0RestClient(
+    options.baseUrl + '/organizations/:id/members/:user_id',
+    clientOptions,
+    options.tokenProvider
+  );
+  this.members = new RetryRestClient(membersClient, options.retry);
+
+  var invitationClient = new Auth0RestClient(
+    options.baseUrl + '/organizations/:id/invitations/:invitation_id',
+    clientOptions,
+    options.tokenProvider
+  );
+  this.invitations = new RetryRestClient(invitationClient, options.retry);
+
+  var rolesClient = new Auth0RestClient(
+    options.baseUrl + '/organizations/:id/members/:user_id/roles',
+    clientOptions,
+    options.tokenProvider
+  );
+  this.roles = new RetryRestClient(rolesClient, options.retry);
+
+  var organizationByNameClient = new Auth0RestClient(
+    options.baseUrl + '/organizations/name/:name',
+    clientOptions,
+    options.tokenProvider
+  );
+  this.organizationsByName = new RetryRestClient(organizationByNameClient, options.retry);
+};
+
+/**
+ * Create a new organization.
+ *
+ * @method    create
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * management.organizations.create(data, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   // Organization created.
+ * });
+ *
+ * @param   {Object}    data     Organization data object.
+ * @param   {Function}  [cb]     Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(OrganizationsManager, 'create', 'organizations.create');
+
+/**
+ * Get all organizations.
+ *
+ * @method    getAll
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example <caption>
+ *   This method takes an optional object as first argument that may be used to
+ *   specify pagination settings. If pagination options are not present,
+ *   the first page of a limited number of results will be returned.
+ * </caption>
+ *
+ * // Pagination settings.
+ * var params = {
+ *   per_page: 10,
+ *   page: 0
+ * };
+ *
+ * management.organizations.getAll(params, function (err, organizations) {
+ *   console.log(organizations.length);
+ * });
+ *
+ * @param   {Object}    [params]          Organizations parameters.
+ * @param   {Number}    [params.per_page] Number of results per page.
+ * @param   {Number}    [params.page]     Page number, zero indexed.
+ * @param   {Function}  [cb]              Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(OrganizationsManager, 'getAll', 'organizations.getAll');
+
+/**
+ * Get an Auth0 organization.
+ *
+ * @method    getByID
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * management.organizations.getByID({ id: ORGANIZATION_ID }, function (err, role) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   console.log(organization);
+ * });
+ *
+ * @param   {Object}    params        Organization parameters.
+ * @param   {String}    params.id     Organization ID.
+ * @param   {Function}  [cb]          Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(OrganizationsManager, 'getByID', 'organizations.get');
+
+/**
+ * Get an Auth0 organization.
+ *
+ * @method    getByName
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * management.organizations.getByName({ name: ORGANIZATION_NAME}, function (err, role) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   console.log(organization);
+ * });
+ *
+ * @param   {Object}    params        Organization parameters.
+ * @param   {String}    params.name   Organization name.
+ * @param   {Function}  [cb]          Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(OrganizationsManager, 'getByName', 'organizationsByName.get');
+
+/**
+ * Update an existing organization.
+ *
+ * @method    update
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var data = { display_name: 'New name' };
+ * var params = { id: ORGANIZATION_ID };
+ *
+ * management.organizations.update(params, data, function (err, organization) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   console.log(organization.name);  // 'New name'
+ * });
+ *
+ * @param   {Object}    params        Organization parameters.
+ * @param   {String}    params.id     Organization ID.
+ * @param   {Object}    data          Updated organization data.
+ * @param   {Function}  [cb]          Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(OrganizationsManager, 'update', 'organizations.patch');
+
+/**
+ * Delete an existing organization.
+ *
+ * @method    delete
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * management.organizations.delete({ id: ORGANIZATION_ID }, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   // Organization deleted.
+ * });
+ *
+ * @param   {Object}    params        Organization parameters.
+ * @param   {String}    params.id     Organization ID.
+ * @param   {Function}  [cb]          Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(OrganizationsManager, 'delete', 'organizations.delete');
+
+/**
+ **** Organization Connections
+ */
+
+/**
+ * Get Enabled Connections in a Organization
+ *
+ * @method    getEnabledConnections
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params = {id : 'ORGANIZATION_ID'}
+ * @example <caption>
+ *   This method takes an organization ID and returns the enabled connections in an Organization
+ * </caption>
+ *
+ * management.organizations.getEnabledConnections( {id : 'ORGANIZATION_ID'}, function (err, enabled_connections) {
+ *   console.log(enabled_connections);
+ * });
+ *
+ * @param   {String}    [organization_id]   Organization ID
+ * @param   {Function}  [cb]                Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.getEnabledConnections = function(params, callback) {
+  return this.connections.getAll(params, callback);
+};
+
+/**
+ * Get Enabled Connection in a Organization
+ *
+ * @method    getEnabledConnection
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params = {id : 'ORGANIZATION_ID', connection_id: 'CONNECTION_ID'}
+ * @example <caption>
+ *   This methods takes the organization ID and connection ID and returns the enabled connection
+ * </caption>
+ *
+ * management.organizations.getEnabledConnections( {id : 'ORGANIZATION_ID', connection_id: 'CONNECTION_ID'}, function (err, enabled_connection) {
+ *   console.log(enabled_connection);
+ * });
+ *
+ * @param   {String}    [organization_id]   Organization ID
+ * @param   {Function}  [cb]                Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.getEnabledConnection = function(params, callback) {
+  return this.connections.get(params, callback);
+};
+
+/**
+ * Add an enabled connection for an organization
+ *
+ * @method    addEnabledConnection
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params =  { id :'ORGANIZATION_ID'};
+ * var data = { "connection_id" : "CONNECTION_ID", assign_membership_on_login: false };
+ *
+ * management.organizations.addEnabledConnection(params, data, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ * });
+ *
+ * @param   {String}    params.id             ID of the Organization.
+ * @param   {Object}    data                  enable connection data
+ * @param   {String}    data.connection_id    connection ID to enable
+ * @param   {Boolean}   data.assign_membership_on_login flag to allow assign membership on login
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+
+OrganizationsManager.prototype.addEnabledConnection = function(params, data, cb) {
+  data = data || {};
+  params = params || {};
+
+  if (!params.id) {
+    throw new ArgumentError('The organization ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The organization ID has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.connections.create(params, data, cb);
+  }
+
+  return this.connections.create(params, data);
+};
+
+/**
+ * Remove an enabled connection from an organization
+ *
+ * @method    removeEnabledConnection
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params =  { id :'ORGANIZATION_ID', connection_id: 'CONNECTION_ID' };
+ *
+ * management.organizations.removeEnabledConnection(params, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ * });
+ *
+ * @param   {String}    params.id             ID of the Organization.
+ * @param   {String}    params.connection_id  ID of the Connection.
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+
+OrganizationsManager.prototype.removeEnabledConnection = function(params, cb) {
+  params = params || {};
+
+  if (!params.id) {
+    throw new ArgumentError('The organization ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The organization ID has to be a string');
+  }
+
+  if (!params.connection_id) {
+    throw new ArgumentError('The connection ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.connection_id !== 'string') {
+    throw new ArgumentError('The connection ID has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.connections.delete(params, {}, cb);
+  }
+
+  return this.connections.delete(params, {});
+};
+
+/**
+ * Update an enabled connection from an organization
+ *
+ * @method    updateEnabledConnection
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params =  { id :'ORGANIZATION_ID', connection_id: 'CONNECTION_ID' };
+ * var data = { assign_membership_on_login: true };
+ *
+ * management.organizations.updateEnabledConnection(params, data, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ * });
+ *
+ * @param   {String}    params.id             ID of the Organization.
+ * @param   {String}    params.connection_id  ID of the Connection.
+ * @param   {Object}    data                  Updated connection.
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+
+OrganizationsManager.prototype.updateEnabledConnection = function(params, data, cb) {
+  data = data || {};
+  params = params || {};
+
+  if (!params.id) {
+    throw new ArgumentError('The organization ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The organization ID has to be a string');
+  }
+
+  if (!params.connection_id) {
+    throw new ArgumentError('The connection ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.connection_id !== 'string') {
+    throw new ArgumentError('The connection ID has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.connections.patch(params, data, cb);
+  }
+
+  return this.connections.patch(params, data);
+};
+
+/**
+ **** Organization Members
+ */
+
+/**
+ * Get Members in a Organization
+ *
+ * @method    getMembers
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params = {id : 'ORGANIZATION_ID'}
+ * @example <caption>
+ *   This method takes an organization ID and returns the members in an Organization
+ * </caption>
+ *
+ * management.organizations.getMembers( {id : 'ORGANIZATION_ID'}, function (err, members) {
+ *   console.log(members);
+ * });
+ *
+ * @param   {String}    [params.id]   Organization ID
+ * @param   {Function}  [cb]          Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.getMembers = function(params, callback) {
+  return this.members.getAll(params, callback);
+};
+
+/**
+ * Add members in an organization
+ *
+ * @method    addMembers
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params =  { id :'ORGANIZATION_ID'};
+ * var data = { members: [ 'USER_ID1', 'USER_ID2' ] }
+ * management.organizations.addMembers(params, data, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ * });
+ *
+ * @param   {String}    params.id             ID of the Organization.
+ * @param   {Object}    data                  add members data
+ * @param   {Array}     data.members          Array of user IDs
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.addMembers = function(params, data, cb) {
+  data = data || {};
+  params = params || {};
+
+  if (!params.id) {
+    throw new ArgumentError('The organization ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The organization ID has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.members.create(params, data, cb);
+  }
+
+  return this.members.create(params, data);
+};
+
+/**
+ * Remove members from an organization
+ *
+ * @method    removeMembers
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params =  { id :'ORGANIZATION_ID' };
+ * var data = { members: [ 'USER_ID1', 'USER_ID2' ] }
+ *
+ * management.organizations.removeMembers(params, data, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ * });
+ *
+ * @param   {String}    params.id             ID of the Organization.
+ * @param   {Object}    data                  add members data
+ * @param   {Array}     data.members          Array of user IDs
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.removeMembers = function(params, data, cb) {
+  data = data || {};
+  params = params || {};
+
+  if (!params.id) {
+    throw new ArgumentError('The organization ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The organization ID has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.members.delete(params, data, cb);
+  }
+
+  return this.members.delete(params, data);
+};
+
+/**
+ **** Organization Invites
+ */
+
+/**
+ * Get Invites in a Organization
+ *
+ * @method   getInvitations
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params = {id : 'ORGANIZATION_ID'}
+ * @example <caption>
+ *   This method takes an organization ID and returns the invites in an Organization
+ * </caption>
+ *
+ * management.organizations.getInvitations( {id : 'ORGANIZATION_ID'}, function (err, invites) {
+ *   console.log(invites);
+ * });
+ *
+ * @param   {String}    [params.id]   Organization ID
+ * @param   {Function}  [cb]                Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.getInvitations = function(params, callback) {
+  return this.invitations.getAll(params, callback);
+};
+
+/**
+ * Get an Invitation in a Organization
+ *
+ * @method    getInvitation
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params = {id : 'ORGANIZATION_ID', invitation_id: 'INVITATION_ID'}
+ * @example <caption>
+ *   This methods takes the organization ID and user ID and returns the invitation
+ * </caption>
+ *
+ * management.organizations.getInvitation({id : 'ORGANIZATION_ID', invitation_id: 'INVITATION_ID'}, function (err, invite) {
+ *   console.log(invite);
+ * });
+ *
+ * @param   {String}    [organization_id]   Organization ID
+ * @param   {Function}  [cb]                Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.getInvitation = function(params, callback) {
+  if (!params.id) {
+    throw new ArgumentError('The organization ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The organization ID has to be a string');
+  }
+
+  if (!params.invitation_id) {
+    throw new ArgumentError('The invitation ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.invitation_id !== 'string') {
+    throw new ArgumentError('The invitation ID has to be a string');
+  }
+
+  return this.invitations.get(params, callback);
+};
+
+/**
+ * Create an invitation in an organization
+ *
+ * @method    createInvitation
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params =  { id :'ORGANIZATION_ID'};
+ * var data = {
+ *   client_id: CLIENT_ID,
+ *   invitee: { email: 'invitee@example.com' },
+ *   inviter: { name: 'John Doe' }
+ * };
+ *
+ * management.organizations.createInvitation(params, data, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ * });
+ *
+ * @param   {String}  params.id                     ID of the Organization.
+ * @param   {Array}   data                          Invitation data
+ * @param   {Object}  data.inviter                  The person who is sending the invite.
+ * @param   {String}  data.inviter.name             Name of the person who is sending the invite
+ * @param   {Object}  data.invitee                  Invitee to whom invitation is intended for
+ * @param   {Object}  data.invitee.email            Email of the invitee to whom invitation is intended for
+ * @param   {String}  data.client_id                Auth0 client used to resolve the default application login URI. This endpoint must expect &invitation=... and &organization=... parameters (added by API2) to continue the flow with /authorize. If client_id  does not have configured login URI, use the tenant level default login route if configured, otherwise return 400
+ * @param   {String}  [data.connection_id]          Force user to authenticate against a specific identity provider.
+ * @param   {Object}  [data.app_metadata]           Application metadata to be assigned to the user after accept the invitation.
+ * @param   {Object}  [data.user_metadata]          User metadata to be assigned to the user after accept the invitation.
+ * @param   {Array}   [data.roles]                  List of roles to be assigned to the user
+ * @param   {Number}  [data.ttl_sec]                Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days).  Upper limit on ttl_sec is 30 days.
+ * @param   {Boolean} [data.send_invitation_email]  Whether the user will receive an invitation email (true) or no email (false). Default is true.
+ * @param   {Function}  [cb]                        Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.createInvitation = function(params, data, cb) {
+  data = data || [];
+  params = params || {};
+
+  if (!params.id) {
+    throw new ArgumentError('The organization ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The organization ID has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.invitations.create(params, data, cb);
+  }
+
+  return this.invitations.create(params, data);
+};
+
+/**
+ * Delete an invitation from an organization
+ *
+ * @method    deleteInvitation
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params =  { id :'ORGANIZATION_ID', invitation_id: 'INVITATION_ID };
+ *
+ * management.organizations.deleteInvitation(params, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ * });
+ *
+ * @param   {String}    params.id             ID of the Organization.
+ * @param   {String}    params.invitation_id  Invitation ID
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.deleteInvitation = function(params, cb) {
+  params = params || {};
+
+  if (!params.id) {
+    throw new ArgumentError('The organization ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The organization ID has to be a string');
+  }
+
+  if (!params.invitation_id) {
+    throw new ArgumentError('The invitation ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.invitation_id !== 'string') {
+    throw new ArgumentError('The invitation ID has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.invitations.delete(params, {}, cb);
+  }
+
+  return this.invitations.delete(params, {});
+};
+
+/**
+ **** Organization Roles Membership
+ */
+
+/**
+ * Get Roles from a Member in a Organization
+ *
+ * @method    getMemberRoles
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params = {id : 'ORGANIZATION_ID', user_id: 'user_id'}
+ * @example <caption>
+ *   This methods takes the organization ID and user ID and returns the roles
+ * </caption>
+ *
+ * management.organizations.getMemberRoles( {id : 'ORGANIZATION_ID', user_id: 'user_id'}, function (err, roles) {
+ *   console.log(roles);
+ * });
+ *
+ * @param   {String}    params.id           ID of the Organization.
+ * @param   {String}    params.user_id      ID of the user.
+ * @param   {Function}  [cb]                Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.getMemberRoles = function(params, callback) {
+  return this.roles.getAll(params, callback);
+};
+
+/**
+ * Add a Role to a Member in an organization
+ *
+ * @method    addMemberRoles
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params =  {id : 'ORGANIZATION_ID', user_id: 'user_id'};
+ * var data = { roles: ["ROLE_ID_1", "ROLE_ID_2"]}
+ *
+ * management.organizations.addMemberRoles(params, data, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ * });
+ *
+ * @param   {String}    params.id             ID of the Organization.
+ * @param   {String}    params.user_id        ID of the user.
+ * @param   {Object}    data                  Add member roles data.
+ * @param   {Array}     data.roles            Array of role IDs.
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.addMemberRoles = function(params, data, cb) {
+  data = data || {};
+  params = params || {};
+
+  if (!params.id) {
+    throw new ArgumentError('The organization ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The organization ID has to be a string');
+  }
+
+  if (!params.user_id) {
+    throw new ArgumentError('The user ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.user_id !== 'string') {
+    throw new ArgumentError('The user ID has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.roles.create(params, data, cb);
+  }
+
+  return this.roles.create(params, data);
+};
+
+/**
+ * Remove Roles from a Member of an organization
+ *
+ * @method    removeMemberRoles
+ * @memberOf  module:management.OrganizationsManager.prototype
+ *
+ * @example
+ * var params =  { id :'ORGANIZATION_ID', user_id: 'USER_ID };
+ * var data = { roles: ["ROLE_ID_1", "ROLE_ID_2"]}
+ *
+ * management.organizations.removeMemberRoles(params, data, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ * });
+ *
+ * @param   {String}    params.id             ID of the Organization.
+ * @param   {String}    params.user_id        Id of the User
+ * @param   {Object}    data                  Remove member roles data.
+ * @param   {Array}     data.roles            Array of role IDs.
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+OrganizationsManager.prototype.removeMemberRoles = function(params, data, cb) {
+  data = data || {};
+  params = params || {};
+
+  if (!params.id) {
+    throw new ArgumentError('The organization ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The organization ID has to be a string');
+  }
+
+  if (!params.user_id) {
+    throw new ArgumentError('The user ID passed in params cannot be null or undefined');
+  }
+  if (typeof params.user_id !== 'string') {
+    throw new ArgumentError('The user ID has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.roles.delete(params, data, cb);
+  }
+
+  return this.roles.delete(params, data);
+};
+
+module.exports = OrganizationsManager;
+
+
+
+ + + + +
+ +
+ +
+ Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme. +
+ + + + + diff --git a/docs/management_PromptsManager.js.html b/docs/management_PromptsManager.js.html index 522676d07..e773de527 100644 --- a/docs/management_PromptsManager.js.html +++ b/docs/management_PromptsManager.js.html @@ -24,7 +24,7 @@
@@ -261,7 +261,7 @@

management/PromptsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_ResourceServersManager.js.html b/docs/management_ResourceServersManager.js.html index 621fef7d2..dd43f748f 100644 --- a/docs/management_ResourceServersManager.js.html +++ b/docs/management_ResourceServersManager.js.html @@ -24,7 +24,7 @@
@@ -238,7 +238,7 @@

management/ResourceServersManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_RolesManager.js.html b/docs/management_RolesManager.js.html index 20c9d9853..183e45eb5 100644 --- a/docs/management_RolesManager.js.html +++ b/docs/management_RolesManager.js.html @@ -24,7 +24,7 @@
@@ -376,22 +376,24 @@

management/RolesManager.js

* * @example * var params = { - * roleId: 'ROLE_ID' + * roleId: 'ROLE_ID', * per_page: 50, * page: 0 * }; * * @example <caption> - * This method takes a roleId and returns all users within that role + * This method takes a roleId and returns all users within that role. Supports offset (page, per_page) and checkpoint pagination (from, take). You must use checkpoint pagination to retrieve beyond the first 1000 records. * </caption> * * management.roles.getUsers(params, function (err, users) { * console.log(users); * }); * - * @param {String} [roleId] Id of the role + * @param {String} [roleId] Id of the role * @param {Number} [params.per_page] Number of results per page. * @param {Number} [params.page] Page number, zero indexed. + * @param {String} [params.from] Optional id from which to start selection. + * @param {Number} [params.take] The total amount of entries to retrieve when using the from parameter. Defaults to 50. * @param {Function} [cb] Callback function. * * @return {Promise|undefined} @@ -460,7 +462,7 @@

management/RolesManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_RulesConfigsManager.js.html b/docs/management_RulesConfigsManager.js.html index 79ff24aac..73eba8455 100644 --- a/docs/management_RulesConfigsManager.js.html +++ b/docs/management_RulesConfigsManager.js.html @@ -24,7 +24,7 @@
@@ -180,7 +180,7 @@

management/RulesConfigsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_RulesManager.js.html b/docs/management_RulesManager.js.html index cdb150601..89b4afda2 100644 --- a/docs/management_RulesManager.js.html +++ b/docs/management_RulesManager.js.html @@ -24,7 +24,7 @@
@@ -248,7 +248,7 @@

management/RulesManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_StatsManager.js.html b/docs/management_StatsManager.js.html index 1461ba143..60f468822 100644 --- a/docs/management_StatsManager.js.html +++ b/docs/management_StatsManager.js.html @@ -24,7 +24,7 @@
@@ -174,7 +174,7 @@

management/StatsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_TenantManager.js.html b/docs/management_TenantManager.js.html index 05b601aa2..27ba4bf71 100644 --- a/docs/management_TenantManager.js.html +++ b/docs/management_TenantManager.js.html @@ -24,7 +24,7 @@
@@ -166,7 +166,7 @@

management/TenantManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_TicketsManager.js.html b/docs/management_TicketsManager.js.html index 0de81d33b..5f8b411e8 100644 --- a/docs/management_TicketsManager.js.html +++ b/docs/management_TicketsManager.js.html @@ -24,7 +24,7 @@
@@ -107,6 +107,16 @@

management/TicketsManager.js

* } * }); * + * @param {Object} data + * @param {String} [data.result_url] URL the user will be redirected to once ticket is used. + * @param {String} [data.user_id] user_id for whom the ticket should be created. (Conflicts with: connection_id, email) + * @param {String} [data.client_id] ID of the client. + * @param {String} [data.organization_id] ID of the organization. + * @param {String} [data.connection_id] ID of the connection. + * @param {Integer} [data.ttl_sec] Number of seconds for which the ticket is valid before expiration. + * @param {String} [data.email] Email of the user. (Requires: connection_id) + * @param {Boolean} [data.mark_email_as_verified] Whether to set the email_verified attribute to true (true) or whether it should not be updated (false). + * @param {Boolean} [data.includeEmailInRedirect] Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false). * @param {Function} [cb] Callback function. * @return {Promise} */ @@ -147,6 +157,8 @@

management/TicketsManager.js

* @param {Object} [data.identity] Used to verify secondary, federated, and passwordless-email identities. * @param {String} data.identity.user_id user_id of the identity. * @param {String} data.identity.provider provider of the identity. + * @param {String} [data.client_id] client ID. + * @param {String} [data.organization_id] organization ID. * @param {Function} [cb] Callback function. * @return {Promise} */ @@ -174,7 +186,7 @@

management/TicketsManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_UserBlocksManager.js.html b/docs/management_UserBlocksManager.js.html index 3e3c00bb8..fd447964d 100644 --- a/docs/management_UserBlocksManager.js.html +++ b/docs/management_UserBlocksManager.js.html @@ -24,7 +24,7 @@
@@ -229,7 +229,7 @@

management/UserBlocksManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_UsersManager.js.html b/docs/management_UsersManager.js.html index e9bfbc14c..ea46e6356 100644 --- a/docs/management_UsersManager.js.html +++ b/docs/management_UsersManager.js.html @@ -24,7 +24,7 @@
@@ -202,6 +202,13 @@

management/UsersManager.js

options.tokenProvider ); this.permissions = new RetryRestClient(userPermissionsClient, options.retry); + + var organizationsClient = new Auth0RestClient( + options.baseUrl + '/users/:id/organizations', + clientOptions, + options.tokenProvider + ); + this.organizations = new RetryRestClient(organizationsClient, options.retry); }; /** @@ -970,6 +977,27 @@

management/UsersManager.js

return this.permissions.delete(query, data); }; +/** + * Get a list of organizations for a user. + * + * @method getUserOrganizations + * @memberOf module:management.UsersManager.prototype + * + * @example + * management.users.getUserOrganizations({ id: USER_ID }, function (err, orgs) { + * console.log(orgs); + * }); + * + * @param {Object} data The user data object. + * @param {String} data.id The user id. + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +UsersManager.prototype.getUserOrganizations = function() { + return this.organizations.getAll.apply(this.organizations, arguments); +}; + module.exports = UsersManager;

@@ -983,7 +1011,7 @@

management/UsersManager.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/management_index.js.html b/docs/management_index.js.html index 7d0a1b91f..bf04dec95 100644 --- a/docs/management_index.js.html +++ b/docs/management_index.js.html @@ -24,7 +24,7 @@
@@ -75,6 +75,7 @@

management/index.js

var BrandingManager = require('./BrandingManager'); var MigrationsManager = require('./MigrationsManager'); var PromptsManager = require('./PromptsManager'); +var OrganizationsManager = require('./OrganizationsManager'); var BASE_URL_FORMAT = 'https://%s/api/v2'; var MANAGEMENT_API_AUD_FORMAT = 'https://%s/api/v2/'; @@ -391,6 +392,13 @@

management/index.js

* @type {PromptsManager} */ this.prompts = new PromptsManager(managerOptions); + + /** + * Organizations Manager + * + * @type {OrganizationsManager} + */ + this.organizations = new OrganizationsManager(managerOptions); }; /** @@ -3385,22 +3393,24 @@

management/index.js

* * @example * var params = { - * id: 'ROLE_ID' + * id: 'ROLE_ID', * per_page: 50, * page: 0 * }; * * @example <caption> - * This method takes a roleId and returns all users within that role + * This method takes a roleId and returns all users within that role. Supports offset (page, per_page) and checkpoint pagination (from, take). You must use checkpoint pagination to retrieve beyond the first 1000 records. * </caption> * * management.getUsersInRole(params, function (err, users) { * console.log(users); * }); * - * @param {String} [id] Id of the role + * @param {String} [id] Id of the role * @param {Number} [params.per_page] Number of results per page. * @param {Number} [params.page] Page number, zero indexed. + * @param {String} [params.from] Optional id from which to start selection. + * @param {Number} [params.take] The total amount of entries to retrieve when using the from parameter. Defaults to 50. * @param {Function} [cb] Callback function. * * @return {Promise|undefined} @@ -3923,7 +3933,7 @@

management/index.js


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-auth.AuthenticationClient.html b/docs/module-auth.AuthenticationClient.html index b8240cb74..509fc25d7 100644 --- a/docs/module-auth.AuthenticationClient.html +++ b/docs/module-auth.AuthenticationClient.html @@ -24,7 +24,7 @@
@@ -888,7 +888,7 @@

changeP
Source:
@@ -1224,7 +1224,7 @@

Source:
@@ -1504,7 +1504,7 @@

get
Source:
@@ -1866,7 +1866,7 @@

getProfile<
Source:
@@ -2044,7 +2044,7 @@

password
Source:
@@ -2365,7 +2365,7 @@

refreshTo
Source:
@@ -2602,7 +2602,7 @@

Source:
@@ -3995,33 +3995,7 @@
Parameters:
- password - - - - - -String - - - - - - - - - - -

Verification code.

- - - - - - - - - target + otp @@ -4038,7 +4012,7 @@
Parameters:
-

Target client ID.

+

Verification code. Use this instead of password to use the /oauth/token endpoint.

@@ -4047,7 +4021,7 @@
Parameters:
- grant_type + password @@ -4064,7 +4038,7 @@
Parameters:
-

Grant type.

+

Verification code. Use this instead of otp to use the /oauth/ro endpoint.

@@ -4160,9 +4134,28 @@
Returns:
Examples

- Given the user credentials (`phone_number` and `code`), it will do the - authentication on the provider and return a JSON with the `access_token` - and `id_token`. + Given the user credentials (`phone_number` and `otp`), authenticates + with the provider using the `/oauth/token` endpoint. Upon successful + authentication, returns a JSON object containing the `access_token` and + `id_token`. +

+ +
var data = {
+  username: '{PHONE_NUMBER}'
+  otp: '{VERIFICATION_CODE}'
+};
+
+auth0.verifySMSCode(data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+});
+ +

+ Given the user credentials (`phone_number` and `password`), authenticates + with the provider using the deprecated `/oauth/ro` endpoint. Upon successful + authentication, returns a JSON object containing the `access_token` and + `id_token`.

var data = {
@@ -4207,7 +4200,7 @@ 
Examples

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-auth.DatabaseAuthenticator.html b/docs/module-auth.DatabaseAuthenticator.html index 75a7148fa..df32d6744 100644 --- a/docs/module-auth.DatabaseAuthenticator.html +++ b/docs/module-auth.DatabaseAuthenticator.html @@ -24,7 +24,7 @@
@@ -1765,7 +1765,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-auth.OAUthWithIDTokenValidation.html b/docs/module-auth.OAUthWithIDTokenValidation.html index 1f84d9e13..63c047069 100644 --- a/docs/module-auth.OAUthWithIDTokenValidation.html +++ b/docs/module-auth.OAUthWithIDTokenValidation.html @@ -24,7 +24,7 @@
@@ -450,7 +450,7 @@
Parameters:

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-auth.OAuthAuthenticator.html b/docs/module-auth.OAuthAuthenticator.html index 7667e9be9..230c0ed9a 100644 --- a/docs/module-auth.OAuthAuthenticator.html +++ b/docs/module-auth.OAuthAuthenticator.html @@ -24,7 +24,7 @@
@@ -493,7 +493,7 @@

Methods

-

authorizationCodeGrant(data) → {Promise|undefined}

+

authorizationCodeGrant(options) → {Promise|undefined}

@@ -580,7 +580,7 @@
Parameters:
- data + options @@ -599,6 +599,49 @@
Parameters:

Authorization code payload

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -606,7 +649,7 @@
Parameters:
- + - +
NameTypeDescription
organization + + +String + + + + +

Organization ID

+
userData.codecode @@ -632,7 +675,7 @@
Parameters:
userData.redirect_uriredirect_uri @@ -658,6 +701,14 @@
Parameters:
+ + + + + + + + @@ -710,14 +761,15 @@
Example
.

-
var data = {
+    
var options = {
   code: '{CODE}',
   redirect_uri: '{REDIRECT_URI}',
   client_id: '{CLIENT_ID}',  // Optional field.
   client_secret: '{CLIENT_SECRET}',  // Optional field.
+  organization: '{ORGANIZATION_ID}' // Optiional field.
 };
 
-auth0.oauth.authorizationCodeGrant(data, function (err, userData) {
+auth0.oauth.authorizationCodeGrant(options, function (err, userData) {
   if (err) {
     // Handle error.
   }
@@ -2050,7 +2102,7 @@ 
Returns:

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-auth.PasswordlessAuthenticator.html b/docs/module-auth.PasswordlessAuthenticator.html index af41ab7e6..1368a04bc 100644 --- a/docs/module-auth.PasswordlessAuthenticator.html +++ b/docs/module-auth.PasswordlessAuthenticator.html @@ -24,7 +24,7 @@
@@ -491,7 +491,7 @@

sendEmailSource:
@@ -910,7 +910,7 @@

sendSMSSource:
@@ -1388,7 +1388,7 @@
Parameters:
- otp + username @@ -1417,7 +1417,7 @@
Parameters:
-

The user's verification code.

+

The user's phone number if realm=sms, or the user's email if realm=email

@@ -1426,7 +1426,7 @@
Parameters:
- realm + otp @@ -1441,8 +1441,6 @@
Parameters:
- <optional>
- @@ -1453,13 +1451,11 @@
Parameters:
- sms - -

Realm string: "sms" or "email".

+

The user's verification code. Required

@@ -1468,7 +1464,7 @@
Parameters:
- username + realm @@ -1483,6 +1479,8 @@
Parameters:
+ <optional>
+ @@ -1493,11 +1491,13 @@
Parameters:
+ sms + -

The user's phone number if realm=sms, or the user's email if realm=email

+

Realm string: "sms" or "email".

@@ -1521,6 +1521,8 @@
Parameters:
+ <optional>
+ @@ -1535,7 +1537,7 @@
Parameters:
-

[DEPRECATED] Password.

+

[DEPRECATED] Password required if using legacy /oauth/ro endpoint

@@ -1772,14 +1774,16 @@
Returns:
Examples

- Given the user credentials (`phone_number` and `code`), it will do the - authentication on the provider and return a JSON with the `access_token` - and `id_token` using `/oauth/ro` endpoint. +Once you have a verification code, use this endpoint to login +the user with their phone number/email and verification code. + +https://auth0.com/docs/api/authentication#authenticate-user

var data = {
-  username: '{PHONE_NUMBER}',
-  password: '{VERIFICATION_CODE}'
+  username: '{PHONE_NUMBER OR EMAIL}',
+  otp: '{VERIFICATION_CODE}',
+  realm: '{sms or email}' // OPTIONAL DEFAULTS TO SMS
 };
 
 auth0.passwordless.signIn(data, function (err) {
@@ -1789,12 +1793,27 @@ 
Examples
});

-To use `/oauth/token` endpoint, use `otp` and `realm` instead + The user data object has the following structure. +

+ +
{
+  id_token: String,
+  access_token: String,
+  token_type: String
+}
+ +

+ LEGACY signIn using the `/oauth/ro` endpoint. When otp is not specified + password is required. Given the user credentials (`phone_number` and `code`), + it will do the authentication on the provider and return a JSON with + the `access_token` and `id_token`. + +https://auth0.com/docs/api/authentication#resource-owner

var data = {
   username: '{PHONE_NUMBER}',
-  otp: '{VERIFICATION_CODE}'
+  password: '{VERIFICATION_CODE}'
 };
 
 auth0.passwordless.signIn(data, function (err) {
@@ -1803,16 +1822,6 @@ 
Examples
} });
-

- The user data object has the following structure. -

- -
{
-  id_token: String,
-  access_token: String,
-  token_type: String
-}
-

@@ -1834,7 +1843,7 @@
Examples

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-auth.TokensManager.html b/docs/module-auth.TokensManager.html index 4fac89847..88d23d9bd 100644 --- a/docs/module-auth.TokensManager.html +++ b/docs/module-auth.TokensManager.html @@ -24,7 +24,7 @@
@@ -47,7 +47,8 @@

TokensManager

-

Provides methods for getting token data and exchanging tokens.

+

TokensManager +Provides methods for getting token data and exchanging tokens.

@@ -372,6 +373,985 @@
Parameters:
+

Methods

+ + + +
+ + + +

getDelegationToken(data, cbopt) → {Promise|undefined}

+ + + + + +
+

Exchange the token of the logged in user with a token that is valid to call +the API (signed with the API secret).

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
data + + +Object + + + + + + + + + + +

Token data object.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id_token + + +String + + + + +

User ID token.

+ +
refresh_token + + +String + + + + +

User refresh token.

+ +
target + + +String + + + + +

Target client ID.

+ +
api_type + + +String + + + + +

The API to be used (aws, auth0, etc).

+ +
grant_type + + +String + + + + +

Grant type (password, jwt, etc).

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +

+ Given an existing token, this endpoint will generate a new token signed + with the target client secret. This is used to flow the identity of the + user from the application to an API or across different APIs that are + protected with different secrets. Find more information in the + API Docs. +

+ +
var data = {
+  id_token: '{ID_TOKEN}',
+  api_type: 'app',
+  target: '{TARGET}',
+  grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer'
+};
+
+auth0.tokens.getDelegationToken(data, function (err, token) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(token);
+});
+ +
+ +
+ + +
+ + + +

getInfo(idToken, cbopt) → {Promise|undefined}

+ + + + + +
+

Given an ID token get the user profile linked to it.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
idToken + + +String + + + + + + + + + + +

User ID token.

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Method callback.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +

+ Validates a JSON Web Token (signature and expiration) and returns the user + information associated with the user id (sub property) of the token. Find + more information in the + API Docs. +

+ +
auth0.tokens.getInfo(token, function (err, tokenInfo) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(tokenInfo);
+});
+ +
+ +
+ + +
+ + + +

revokeRefreshToken(data, cbopt) → {Promise|undefined}

+ + + + + +
+

Proactively revoke an issued refresh token.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
data + + +Object + + + + + + + + + + +

Token data object.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
token + + +String + + + + + + + + + + +

User refresh token.

+ +
client_id + + +String + + + + + + <optional>
+ + + + + +
+

Target client ID.

+ +
client_secret + + +String + + + + + + <optional>
+ + + + + +
+

Target client secret.

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +

+ Given an existing refresh token, this endpoint will revoke it in order + to prevent unauthorized silently user authentication tokens refresh. + Find more information in the API Docs. +

+ +
 * var data = {
+  token: '{REFRESH_TOKEN}'
+};
+
+auth0.tokens.revokeRefreshToken(data, function (err, _) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Do stuff.
+});
+ +
+ +
+ + @@ -388,7 +1368,7 @@
Parameters:

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-auth.UsersManager.html b/docs/module-auth.UsersManager.html index e2b175178..c79000d40 100644 --- a/docs/module-auth.UsersManager.html +++ b/docs/module-auth.UsersManager.html @@ -24,7 +24,7 @@
@@ -47,7 +47,8 @@

UsersManager

-

Provides methods for getting user information and impersonating users.

+

UsersManager +Provides methods for getting user information and impersonating users.

@@ -1009,7 +1010,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-auth.html b/docs/module-auth.html index 80b90e83f..9abea4ea1 100644 --- a/docs/module-auth.html +++ b/docs/module-auth.html @@ -24,7 +24,7 @@
@@ -108,7 +108,7 @@

Classes


- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:05 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-errors.html b/docs/module-errors.html index 60ed46bf7..998b07a27 100644 --- a/docs/module-errors.html +++ b/docs/module-errors.html @@ -24,7 +24,7 @@
@@ -254,7 +254,7 @@

(st
- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.BlacklistedTokensManager.html b/docs/module-management.BlacklistedTokensManager.html index b82c48fad..6ba3c630c 100644 --- a/docs/module-management.BlacklistedTokensManager.html +++ b/docs/module-management.BlacklistedTokensManager.html @@ -24,7 +24,7 @@
@@ -991,7 +991,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.BrandingManager.html b/docs/module-management.BrandingManager.html index a63d23cf0..2522fd910 100644 --- a/docs/module-management.BrandingManager.html +++ b/docs/module-management.BrandingManager.html @@ -24,7 +24,7 @@
@@ -1770,7 +1770,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.ClientGrantsManager.html b/docs/module-management.ClientGrantsManager.html index f7671a159..53515c8ad 100644 --- a/docs/module-management.ClientGrantsManager.html +++ b/docs/module-management.ClientGrantsManager.html @@ -24,7 +24,7 @@
@@ -1636,7 +1636,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.ClientsManager.html b/docs/module-management.ClientsManager.html index 7fee17ad6..9f21a56b2 100644 --- a/docs/module-management.ClientsManager.html +++ b/docs/module-management.ClientsManager.html @@ -24,7 +24,7 @@
@@ -1904,7 +1904,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.ConnectionsManager.html b/docs/module-management.ConnectionsManager.html index 90126eaf0..6e271162b 100644 --- a/docs/module-management.ConnectionsManager.html +++ b/docs/module-management.ConnectionsManager.html @@ -24,7 +24,7 @@
@@ -2269,7 +2269,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.CustomDomainsManager.html b/docs/module-management.CustomDomainsManager.html index cffe008c4..29f8fe58d 100644 --- a/docs/module-management.CustomDomainsManager.html +++ b/docs/module-management.CustomDomainsManager.html @@ -24,7 +24,7 @@
@@ -1731,7 +1731,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.DeviceCredentialsManager.html b/docs/module-management.DeviceCredentialsManager.html index a9fa3e060..065f7baad 100644 --- a/docs/module-management.DeviceCredentialsManager.html +++ b/docs/module-management.DeviceCredentialsManager.html @@ -24,7 +24,7 @@
@@ -1215,7 +1215,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.EmailProviderManager.html b/docs/module-management.EmailProviderManager.html index 4f7af385e..257926395 100644 --- a/docs/module-management.EmailProviderManager.html +++ b/docs/module-management.EmailProviderManager.html @@ -24,7 +24,7 @@
@@ -1480,7 +1480,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.EmailTemplatesManager.html b/docs/module-management.EmailTemplatesManager.html index 4e8b17ab0..284faee7f 100644 --- a/docs/module-management.EmailTemplatesManager.html +++ b/docs/module-management.EmailTemplatesManager.html @@ -24,7 +24,7 @@
@@ -1304,7 +1304,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.GrantsManager.html b/docs/module-management.GrantsManager.html index 603acc8db..9a03d5727 100644 --- a/docs/module-management.GrantsManager.html +++ b/docs/module-management.GrantsManager.html @@ -24,7 +24,7 @@
@@ -842,7 +842,7 @@

deleteGran
Source:
@@ -1515,7 +1515,7 @@

Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.GuardianManager.html b/docs/module-management.GuardianManager.html index 6f3b2af40..73ee47b07 100644 --- a/docs/module-management.GuardianManager.html +++ b/docs/module-management.GuardianManager.html @@ -24,7 +24,7 @@
@@ -4920,7 +4920,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.HooksManager.html b/docs/module-management.HooksManager.html index c856e6fff..d709e4ec8 100644 --- a/docs/module-management.HooksManager.html +++ b/docs/module-management.HooksManager.html @@ -24,7 +24,7 @@
@@ -3099,7 +3099,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.JobsManager.html b/docs/module-management.JobsManager.html index 518826921..c7e81e430 100644 --- a/docs/module-management.JobsManager.html +++ b/docs/module-management.JobsManager.html @@ -24,7 +24,7 @@
@@ -890,7 +890,7 @@

errorsSource:
@@ -2841,6 +2841,42 @@
Parameters:
+ + + organization_id + + + + + +String + + + + + + + + + <optional>
+ + + + + + + + + + + +

Organization ID

+ + + + + + client_id @@ -3109,7 +3145,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.LogStreamsManager.html b/docs/module-management.LogStreamsManager.html index 228787292..4a5a59e7e 100644 --- a/docs/module-management.LogStreamsManager.html +++ b/docs/module-management.LogStreamsManager.html @@ -24,7 +24,7 @@
@@ -1763,7 +1763,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.LogsManager.html b/docs/module-management.LogsManager.html index f7a3452c2..048122fa6 100644 --- a/docs/module-management.LogsManager.html +++ b/docs/module-management.LogsManager.html @@ -24,7 +24,7 @@
@@ -1286,7 +1286,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.ManagementClient.html b/docs/module-management.ManagementClient.html index 0d6dd77c3..16bf56466 100644 --- a/docs/module-management.ManagementClient.html +++ b/docs/module-management.ManagementClient.html @@ -24,7 +24,7 @@
@@ -106,7 +106,7 @@

new M
Source:
@@ -763,7 +763,7 @@

blac
Source:
@@ -838,7 +838,7 @@

brandingSource:
@@ -913,7 +913,7 @@

clientGra
Source:
@@ -988,7 +988,7 @@

clientsSource:
@@ -1063,7 +1063,7 @@

connection
Source:
@@ -1138,7 +1138,7 @@

customDo
Source:
@@ -1213,7 +1213,7 @@

devi
Source:
@@ -1288,7 +1288,7 @@

emailPro
Source:
@@ -1363,7 +1363,7 @@

emailTe
Source:
@@ -1438,7 +1438,7 @@

grantsSource:
@@ -1513,7 +1513,7 @@

guardianSource:
@@ -1588,7 +1588,7 @@

hooksSource:
@@ -1662,7 +1662,7 @@

jobsSource:
@@ -1736,7 +1736,7 @@

logsSource:
@@ -1810,7 +1810,7 @@

logStreams<
Source:
@@ -1884,7 +1884,7 @@

migrations<
Source:
@@ -1911,6 +1911,80 @@

Type:
+

+ + + +
+

organizations :OrganizationsManager

+ + + + +
+

Organizations Manager

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
Type:
+
    +
  • + +OrganizationsManager + + +
  • +
+ + + + +
@@ -1958,7 +2032,7 @@

promptsSource:
@@ -2033,7 +2107,7 @@

resour
Source:
@@ -2108,7 +2182,7 @@

rolesSource:
@@ -2183,7 +2257,7 @@

rulesSource:
@@ -2257,7 +2331,7 @@

rulesConf
Source:
@@ -2331,7 +2405,7 @@

statsSource:
@@ -2405,7 +2479,7 @@

tenantSource:
@@ -2479,7 +2553,7 @@

ticketsSource:
@@ -2554,7 +2628,7 @@

userBlocks<
Source:
@@ -2629,7 +2703,7 @@

usersSource:
@@ -2713,7 +2787,7 @@

addHookS
Source:
@@ -3018,7 +3092,7 @@

a
Source:
@@ -3397,7 +3471,7 @@

Source:
@@ -3754,7 +3828,7 @@

assi
Source:
@@ -4111,7 +4185,7 @@

assi
Source:
@@ -4494,7 +4568,7 @@

blackli
Source:
@@ -4794,7 +4868,7 @@

Source:
@@ -5012,7 +5086,7 @@

createCli
Source:
@@ -5230,7 +5304,7 @@

crea
Source:
@@ -5448,7 +5522,7 @@

creat
Source:
@@ -5666,7 +5740,7 @@

cre
Source:
@@ -5884,7 +5958,7 @@

Source:
@@ -6102,7 +6176,7 @@

cr
Source:
@@ -6318,7 +6392,7 @@

Source:
@@ -6502,7 +6576,7 @@

Source:
@@ -6682,7 +6756,7 @@

createHook<
Source:
@@ -6900,7 +6974,7 @@

create
Source:
@@ -7118,7 +7192,7 @@

Source:
@@ -7310,7 +7384,7 @@

c
Source:
@@ -7528,7 +7602,7 @@

createRole<
Source:
@@ -7747,7 +7821,7 @@

createRule<
Source:
@@ -7965,7 +8039,7 @@

createUser<
Source:
@@ -8185,7 +8259,7 @@

deleteA
Source:
@@ -8369,7 +8443,7 @@

Source:
@@ -8619,7 +8693,7 @@

deleteCli
Source:
@@ -8888,7 +8962,7 @@

dele
Source:
@@ -9157,7 +9231,7 @@

delet
Source:
@@ -9426,7 +9500,7 @@

del
Source:
@@ -9695,7 +9769,7 @@

Source:
@@ -9966,7 +10040,7 @@

de
Source:
@@ -10150,7 +10224,7 @@

Source:
@@ -10419,7 +10493,7 @@

deleteHook<
Source:
@@ -10688,7 +10762,7 @@

delete
Source:
@@ -10957,7 +11031,7 @@

d
Source:
@@ -11226,7 +11300,7 @@

deleteRole<
Source:
@@ -11495,7 +11569,7 @@

deleteRule<
Source:
@@ -11764,7 +11838,7 @@

dele
Source:
@@ -12033,7 +12107,7 @@

deleteUser<
Source:
@@ -12302,7 +12376,7 @@

Source:
@@ -12603,7 +12677,7 @@

Source:
@@ -12900,7 +12974,7 @@

exportUser
Source:
@@ -13314,7 +13388,7 @@

getAcce
Source:
@@ -13422,7 +13496,7 @@

ge
Source:
@@ -13606,7 +13680,7 @@

g
Source:
@@ -13786,7 +13860,7 @@

ge
Source:
@@ -14039,7 +14113,7 @@

Source:
@@ -14292,7 +14366,7 @@

getClientSource:
@@ -14561,7 +14635,7 @@

getCli
Source:
@@ -14888,7 +14962,7 @@

getClients<
Source:
@@ -15215,7 +15289,7 @@

getConne
Source:
@@ -15484,7 +15558,7 @@

getConn
Source:
@@ -15811,7 +15885,7 @@

getCus
Source:
@@ -16080,7 +16154,7 @@

getCu
Source:
@@ -16196,7 +16270,7 @@

getDaily
Source:
@@ -16496,7 +16570,7 @@

g
Source:
@@ -16712,7 +16786,7 @@

getEm
Source:
@@ -17027,7 +17101,7 @@

getEm
Source:
@@ -17296,7 +17370,7 @@

getGrantsSource:
@@ -17700,7 +17774,7 @@

Source:
@@ -17965,7 +18039,7 @@

Source:
@@ -18230,7 +18304,7 @@

Source:
@@ -18444,7 +18518,7 @@

get
Source:
@@ -18624,7 +18698,7 @@

Source:
@@ -18838,7 +18912,7 @@

Source:
@@ -19052,7 +19126,7 @@

Source:
@@ -19232,7 +19306,7 @@

Source:
@@ -19412,7 +19486,7 @@

ge
Source:
@@ -19592,7 +19666,7 @@

getHookSource:
@@ -19861,7 +19935,7 @@

getHooksSource:
@@ -20188,7 +20262,7 @@

getHook
Source:
@@ -20458,7 +20532,7 @@

getJobSource:
@@ -20732,7 +20806,7 @@

getLogSource:
@@ -21001,7 +21075,7 @@

getLogsSource:
@@ -21508,7 +21582,7 @@

getLogStr
Source:
@@ -21777,7 +21851,7 @@

getMigra
Source:
@@ -21962,7 +22036,7 @@

g
Source:
@@ -22186,7 +22260,7 @@

get
Source:
@@ -22370,7 +22444,7 @@

getR
Source:
@@ -22639,7 +22713,7 @@

get
Source:
@@ -22966,7 +23040,7 @@

getRoleSource:
@@ -23235,7 +23309,7 @@

getRolesSource:
@@ -23562,7 +23636,7 @@

getRuleSource:
@@ -23831,7 +23905,7 @@

getRulesSource:
@@ -24158,7 +24232,7 @@

getRul
Source:
@@ -24342,7 +24416,7 @@

getT
Source:
@@ -24526,7 +24600,7 @@

getUserSource:
@@ -24791,7 +24865,7 @@

getUserB
Source:
@@ -25060,7 +25134,7 @@

Source:
@@ -25329,7 +25403,7 @@

getUserLog
Source:
@@ -25704,7 +25778,7 @@

get
Source:
@@ -26079,7 +26153,7 @@

getUserRo
Source:
@@ -26454,7 +26528,7 @@

getUsersSource:
@@ -26855,7 +26929,7 @@

getUse
Source:
@@ -27211,7 +27285,7 @@

getUser
Source:
@@ -27363,6 +27437,78 @@

Parameters:
+ + + params.from + + + + + +String + + + + + + + + + <optional>
+ + + + + + + + + + + +

Optional id from which to start selection.

+ + + + + + + + + params.take + + + + + +Number + + + + + + + + + <optional>
+ + + + + + + + + + + +

The total amount of entries to retrieve when using the from parameter. Defaults to 50.

+ + + + + + cb @@ -27444,13 +27590,13 @@
Returns:
Examples
var params = {
-  id: 'ROLE_ID'
+  id: 'ROLE_ID',
   per_page: 50,
   page: 0
 };

- This method takes a roleId and returns all users within that role + This method takes a roleId and returns all users within that role. Supports offset (page, per_page) and checkpoint pagination (from, take). You must use checkpoint pagination to retrieve beyond the first 1000 records.

management.getUsersInRole(params, function (err, users) {
@@ -27511,7 +27657,7 @@ 

importUser
Source:
@@ -27939,7 +28085,7 @@

importU
Source:
@@ -28365,7 +28511,7 @@

Source:
@@ -28634,7 +28780,7 @@

linkUsersSource:
@@ -29021,7 +29167,7 @@

Source:
@@ -29286,7 +29432,7 @@

remo
Source:
@@ -29591,7 +29737,7 @@

Source:
@@ -29970,7 +30116,7 @@

Source:
@@ -30327,7 +30473,7 @@

re
Source:
@@ -30684,7 +30830,7 @@

Source:
@@ -30955,7 +31101,7 @@

Source:
@@ -31205,7 +31351,7 @@

setRule
Source:
@@ -31562,7 +31708,7 @@

unblockUse
Source:
@@ -31831,7 +31977,7 @@

unblockUse
Source:
@@ -32100,7 +32246,7 @@

unlinkUser
Source:
@@ -32423,7 +32569,7 @@

upda
Source:
@@ -32732,7 +32878,7 @@

Source:
@@ -32985,7 +33131,7 @@

updateCli
Source:
@@ -33291,7 +33437,7 @@

upda
Source:
@@ -33601,7 +33747,7 @@

updat
Source:
@@ -33907,7 +34053,7 @@

up
Source:
@@ -34160,7 +34306,7 @@

u
Source:
@@ -34466,7 +34612,7 @@

u
Source:
@@ -34718,7 +34864,7 @@

u
Source:
@@ -34968,7 +35114,7 @@

Source:
@@ -35219,7 +35365,7 @@

Source:
@@ -35470,7 +35616,7 @@

Source:
@@ -35771,7 +35917,7 @@

Source:
@@ -36072,7 +36218,7 @@

Source:
@@ -36322,7 +36468,7 @@

updateHook<
Source:
@@ -36627,7 +36773,7 @@

upda
Source:
@@ -36932,7 +37078,7 @@

update
Source:
@@ -37237,7 +37383,7 @@

updat
Source:
@@ -37457,7 +37603,7 @@

Source:
@@ -37673,7 +37819,7 @@

u
Source:
@@ -37979,7 +38125,7 @@

updateRole<
Source:
@@ -38284,7 +38430,7 @@

updateRule<
Source:
@@ -38589,7 +38735,7 @@

u
Source:
@@ -38805,7 +38951,7 @@

updateUser<
Source:
@@ -39111,7 +39257,7 @@

upd
Source:
@@ -39420,7 +39566,7 @@

ver
Source:
@@ -39658,7 +39804,7 @@

Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.ManagementTokenProvider.html b/docs/module-management.ManagementTokenProvider.html index e0d63a373..247a40851 100644 --- a/docs/module-management.ManagementTokenProvider.html +++ b/docs/module-management.ManagementTokenProvider.html @@ -24,7 +24,7 @@
@@ -673,7 +673,7 @@
Returns:

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.MigrationsManager.html b/docs/module-management.MigrationsManager.html index 165961592..ff7888969 100644 --- a/docs/module-management.MigrationsManager.html +++ b/docs/module-management.MigrationsManager.html @@ -24,7 +24,7 @@
@@ -885,7 +885,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.OrganizationsManager.html b/docs/module-management.OrganizationsManager.html new file mode 100644 index 000000000..e2c3882ed --- /dev/null +++ b/docs/module-management.OrganizationsManager.html @@ -0,0 +1,6650 @@ + + + + + + OrganizationsManager - Documentation + + + + + + + + + + + + + + + + + +
+ +

OrganizationsManager

+ + + + + + + +
+ +
+ +

+ management. + + OrganizationsManager +

+ +

OrganizationsManager +The organizations class provides a simple abstraction for performing CRUD operations +on Auth0 OrganizationsManager.

+ + +
+ +
+
+ + +
+ + +

Constructor

+ + +

new OrganizationsManager(options)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
options + + +Object + + + + +

The client options.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
baseUrl + + +String + + + + + + + + + + +

The URL of the API.

+ +
headers + + +Object + + + + + + <optional>
+ + + + + +
+

Headers to be included in all requests.

+ +
retry + + +Object + + + + + + <optional>
+ + + + + +
+

Retry Policy Config

+ +
+ + +
+ + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + +

Members

+ + + +
+

(inner) auth0RestClient :external:RestClient

+ + + + +
+

Provides an abstraction layer for performing CRUD operations on +https://auth0.com/docs/api/v2.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
Type:
+ + + + + + +
+ + + +
+

(inner) clientOptions :Object

+ + + + +
+

Options object for the Rest Client instance.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
Type:
+
    +
  • + +Object + + +
  • +
+ + + + + +
+ + + + + +

Methods

+ + + +
+ + + +

addEnabledConnection(data, cbopt) → {Promise|undefined}

+ + + + + +
+

Add an enabled connection for an organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + + + + + +

ID of the Organization.

+ +
data + + +Object + + + + + + + + + + +

enable connection data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
connection_id + + +String + + + + +

connection ID to enable

+ +
assign_membership_on_login + + +Boolean + + + + +

flag to allow assign membership on login

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id :'ORGANIZATION_ID'};
+var data = { "connection_id" : "CONNECTION_ID", assign_membership_on_login: false };
+
+management.organizations.addEnabledConnection(params, data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+});
+ +
+ +
+ + +
+ + + +

addMemberRoles(data, cbopt) → {Promise|undefined}

+ + + + + +
+

Add a Role to a Member in an organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + + + + + +

ID of the Organization.

+ +
params.user_id + + +String + + + + + + + + + + +

ID of the user.

+ +
data + + +Object + + + + + + + + + + +

Add member roles data.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
roles + + +Array + + + + +

Array of role IDs.

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  {id : 'ORGANIZATION_ID', user_id: 'user_id'};
+var data = { roles: ["ROLE_ID_1", "ROLE_ID_2"]}
+
+management.organizations.addMemberRoles(params, data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+});
+ +
+ +
+ + +
+ + + +

addMembers(data, cbopt) → {Promise|undefined}

+ + + + + +
+

Add members in an organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + + + + + +

ID of the Organization.

+ +
data + + +Object + + + + + + + + + + +

add members data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
members + + +Array + + + + +

Array of user IDs

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id :'ORGANIZATION_ID'};
+var data = { members: [ 'USER_ID1', 'USER_ID2' ] }
+management.organizations.addMembers(params, data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+});
+ +
+ +
+ + +
+ + + +

create(data, cbopt) → {Promise|undefined}

+ + + + + +
+

Create a new organization.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
data + + +Object + + + + + + + + + + +

Organization data object.

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.organizations.create(data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Organization created.
+});
+ +
+ +
+ + +
+ + + +

createInvitation(data, cbopt) → {Promise|undefined}

+ + + + + +
+

Create an invitation in an organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + + + + + +

ID of the Organization.

+ +
data + + +Array + + + + + + + + + + +

Invitation data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
inviter + + +Object + + + + + + + + + + +

The person who is sending the invite.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +String + + + + +

Name of the person who is sending the invite

+ +
+ + +
invitee + + +Object + + + + + + + + + + +

Invitee to whom invitation is intended for

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
email + + +Object + + + + +

Email of the invitee to whom invitation is intended for

+ +
+ + +
client_id + + +String + + + + + + + + + + +

Auth0 client used to resolve the default application login URI. This endpoint must expect &invitation=... and &organization=... parameters (added by API2) to continue the flow with /authorize. If client_id does not have configured login URI, use the tenant level default login route if configured, otherwise return 400

+ +
connection_id + + +String + + + + + + <optional>
+ + + + + +
+

Force user to authenticate against a specific identity provider.

+ +
app_metadata + + +Object + + + + + + <optional>
+ + + + + +
+

Application metadata to be assigned to the user after accept the invitation.

+ +
user_metadata + + +Object + + + + + + <optional>
+ + + + + +
+

User metadata to be assigned to the user after accept the invitation.

+ +
roles + + +Array + + + + + + <optional>
+ + + + + +
+

List of roles to be assigned to the user

+ +
ttl_sec + + +Number + + + + + + <optional>
+ + + + + +
+

Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days). Upper limit on ttl_sec is 30 days.

+ +
send_invitation_email + + +Boolean + + + + + + <optional>
+ + + + + +
+

Whether the user will receive an invitation email (true) or no email (false). Default is true.

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id :'ORGANIZATION_ID'};
+var data = {
+  client_id: CLIENT_ID,
+  invitee: { email: 'invitee@example.com' },
+  inviter: { name: 'John Doe' }
+};
+
+management.organizations.createInvitation(params, data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+});
+ +
+ +
+ + +
+ + + +

delete(params, cbopt) → {Promise|undefined}

+ + + + + +
+

Delete an existing organization.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params + + +Object + + + + + + + + + + +

Organization parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id + + +String + + + + +

Organization ID.

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.organizations.delete({ id: ORGANIZATION_ID }, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Organization deleted.
+});
+ +
+ +
+ + +
+ + + +

deleteInvitation(cbopt) → {Promise|undefined}

+ + + + + +
+

Delete an invitation from an organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + + + + + +

ID of the Organization.

+ +
params.invitation_id + + +String + + + + + + + + + + +

Invitation ID

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id :'ORGANIZATION_ID', invitation_id: 'INVITATION_ID };
+
+management.organizations.deleteInvitation(params, function (err) {
+  if (err) {
+    // Handle error.
+  }
+});
+ +
+ +
+ + +
+ + + +

getAll(paramsopt, cbopt) → {Promise|undefined}

+ + + + + +
+

Get all organizations.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params + + +Object + + + + + + <optional>
+ + + + + +
+

Organizations parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
per_page + + +Number + + + + + + <optional>
+ + + + + +
+

Number of results per page.

+ +
page + + +Number + + + + + + <optional>
+ + + + + +
+

Page number, zero indexed.

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +

+ This method takes an optional object as first argument that may be used to + specify pagination settings. If pagination options are not present, + the first page of a limited number of results will be returned. +

+ +
// Pagination settings.
+var params = {
+  per_page: 10,
+  page: 0
+};
+
+management.organizations.getAll(params, function (err, organizations) {
+  console.log(organizations.length);
+});
+ +
+ +
+ + +
+ + + +

getByID(params, cbopt) → {Promise|undefined}

+ + + + + +
+

Get an Auth0 organization.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params + + +Object + + + + + + + + + + +

Organization parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id + + +String + + + + +

Organization ID.

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.organizations.getByID({ id: ORGANIZATION_ID }, function (err, role) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(organization);
+});
+ +
+ +
+ + +
+ + + +

getByName(params, cbopt) → {Promise|undefined}

+ + + + + +
+

Get an Auth0 organization.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params + + +Object + + + + + + + + + + +

Organization parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
name + + +String + + + + +

Organization name.

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.organizations.getByName({ name: ORGANIZATION_NAME}, function (err, role) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(organization);
+});
+ +
+ +
+ + +
+ + + +

getEnabledConnection(organization_idopt, cbopt) → {Promise|undefined}

+ + + + + +
+

Get Enabled Connection in a Organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
organization_id + + +String + + + + + + <optional>
+ + + + + +
+

Organization ID

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Examples
+ +
var params = {id : 'ORGANIZATION_ID', connection_id: 'CONNECTION_ID'}
+ +

+ This methods takes the organization ID and connection ID and returns the enabled connection +

+ +
management.organizations.getEnabledConnections( {id : 'ORGANIZATION_ID', connection_id: 'CONNECTION_ID'}, function (err, enabled_connection) {
+  console.log(enabled_connection);
+});
+ +
+ +
+ + +
+ + + +

getEnabledConnections(organization_idopt, cbopt) → {Promise|undefined}

+ + + + + +
+

Get Enabled Connections in a Organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
organization_id + + +String + + + + + + <optional>
+ + + + + +
+

Organization ID

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Examples
+ +
var params = {id : 'ORGANIZATION_ID'}
+ +

+ This method takes an organization ID and returns the enabled connections in an Organization +

+ +
management.organizations.getEnabledConnections( {id : 'ORGANIZATION_ID'}, function (err, enabled_connections) {
+  console.log(enabled_connections);
+});
+ +
+ +
+ + +
+ + + +

getInvitation(organization_idopt, cbopt) → {Promise|undefined}

+ + + + + +
+

Get an Invitation in a Organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
organization_id + + +String + + + + + + <optional>
+ + + + + +
+

Organization ID

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Examples
+ +
var params = {id : 'ORGANIZATION_ID', invitation_id: 'INVITATION_ID'}
+ +

+ This methods takes the organization ID and user ID and returns the invitation +

+ +
management.organizations.getInvitation({id : 'ORGANIZATION_ID', invitation_id: 'INVITATION_ID'}, function (err, invite) {
+  console.log(invite);
+});
+ +
+ +
+ + +
+ + + +

getInvitations(cbopt) → {Promise|undefined}

+ + + + + +
+

Get Invites in a Organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + <optional>
+ + + + + +
+

Organization ID

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Examples
+ +
var params = {id : 'ORGANIZATION_ID'}
+ +

+ This method takes an organization ID and returns the invites in an Organization +

+ +
management.organizations.getInvitations( {id : 'ORGANIZATION_ID'}, function (err, invites) {
+  console.log(invites);
+});
+ +
+ +
+ + +
+ + + +

getMemberRoles(cbopt) → {Promise|undefined}

+ + + + + +
+

Get Roles from a Member in a Organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + + + + + +

ID of the Organization.

+ +
params.user_id + + +String + + + + + + + + + + +

ID of the user.

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Examples
+ +
var params = {id : 'ORGANIZATION_ID', user_id: 'user_id'}
+ +

+ This methods takes the organization ID and user ID and returns the roles +

+ +
management.organizations.getMemberRoles( {id : 'ORGANIZATION_ID', user_id: 'user_id'}, function (err, roles) {
+  console.log(roles);
+});
+ +
+ +
+ + +
+ + + +

getMembers(cbopt) → {Promise|undefined}

+ + + + + +
+

Get Members in a Organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + <optional>
+ + + + + +
+

Organization ID

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Examples
+ +
var params = {id : 'ORGANIZATION_ID'}
+ +

+ This method takes an organization ID and returns the members in an Organization +

+ +
management.organizations.getMembers( {id : 'ORGANIZATION_ID'}, function (err, members) {
+  console.log(members);
+});
+ +
+ +
+ + +
+ + + +

removeEnabledConnection(cbopt) → {Promise|undefined}

+ + + + + +
+

Remove an enabled connection from an organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + + + + + +

ID of the Organization.

+ +
params.connection_id + + +String + + + + + + + + + + +

ID of the Connection.

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id :'ORGANIZATION_ID', connection_id: 'CONNECTION_ID' };
+
+management.organizations.removeEnabledConnection(params, function (err) {
+  if (err) {
+    // Handle error.
+  }
+});
+ +
+ +
+ + +
+ + + +

removeMemberRoles(data, cbopt) → {Promise|undefined}

+ + + + + +
+

Remove Roles from a Member of an organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + + + + + +

ID of the Organization.

+ +
params.user_id + + +String + + + + + + + + + + +

Id of the User

+ +
data + + +Object + + + + + + + + + + +

Remove member roles data.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
roles + + +Array + + + + +

Array of role IDs.

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id :'ORGANIZATION_ID', user_id: 'USER_ID };
+var data = { roles: ["ROLE_ID_1", "ROLE_ID_2"]}
+
+management.organizations.removeMemberRoles(params, data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+});
+ +
+ +
+ + +
+ + + +

removeMembers(data, cbopt) → {Promise|undefined}

+ + + + + +
+

Remove members from an organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + + + + + +

ID of the Organization.

+ +
data + + +Object + + + + + + + + + + +

add members data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
members + + +Array + + + + +

Array of user IDs

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id :'ORGANIZATION_ID' };
+var data = { members: [ 'USER_ID1', 'USER_ID2' ] }
+
+management.organizations.removeMembers(params, data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+});
+ +
+ +
+ + +
+ + + +

update(params, data, cbopt) → {Promise|undefined}

+ + + + + +
+

Update an existing organization.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params + + +Object + + + + + + + + + + +

Organization parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id + + +String + + + + +

Organization ID.

+ +
+ + +
data + + +Object + + + + + + + + + + +

Updated organization data.

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var data = { display_name: 'New name' };
+var params = { id: ORGANIZATION_ID };
+
+management.organizations.update(params, data, function (err, organization) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(organization.name);  // 'New name'
+});
+ +
+ +
+ + +
+ + + +

updateEnabledConnection(data, cbopt) → {Promise|undefined}

+ + + + + +
+

Update an enabled connection from an organization

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params.id + + +String + + + + + + + + + + +

ID of the Organization.

+ +
params.connection_id + + +String + + + + + + + + + + +

ID of the Connection.

+ +
data + + +Object + + + + + + + + + + +

Updated connection.

+ +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id :'ORGANIZATION_ID', connection_id: 'CONNECTION_ID' };
+var data = { assign_membership_on_login: true };
+
+management.organizations.updateEnabledConnection(params, data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+});
+ +
+ +
+ + + + + + +
+ +
+ + + + +
+ +
+ +
+ Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme. +
+ + + + + \ No newline at end of file diff --git a/docs/module-management.PromptsManager.html b/docs/module-management.PromptsManager.html index 0e8b9429a..ec4bb20a2 100644 --- a/docs/module-management.PromptsManager.html +++ b/docs/module-management.PromptsManager.html @@ -24,7 +24,7 @@
@@ -839,7 +839,7 @@

Source:
@@ -1712,7 +1712,7 @@

Source:
@@ -2257,7 +2257,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.ResourceServersManager.html b/docs/module-management.ResourceServersManager.html index fde62c6a4..9318cd96a 100644 --- a/docs/module-management.ResourceServersManager.html +++ b/docs/module-management.ResourceServersManager.html @@ -24,7 +24,7 @@
@@ -1904,7 +1904,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.RetryRestClient.html b/docs/module-management.RetryRestClient.html index 198d27719..18bd5fbe0 100644 --- a/docs/module-management.RetryRestClient.html +++ b/docs/module-management.RetryRestClient.html @@ -24,7 +24,7 @@
@@ -417,7 +417,7 @@
Parameters:

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.RolesManager.html b/docs/module-management.RolesManager.html index eb4979601..42a495de7 100644 --- a/docs/module-management.RolesManager.html +++ b/docs/module-management.RolesManager.html @@ -24,7 +24,7 @@
@@ -925,7 +925,7 @@

assignRole
Source:
@@ -1282,7 +1282,7 @@

assignUser
Source:
@@ -3122,6 +3122,78 @@

Parameters:
+ + + params.from + + + + + +String + + + + + + + + + <optional>
+ + + + + + + + + + + +

Optional id from which to start selection.

+ + + + + + + + + params.take + + + + + +Number + + + + + + + + + <optional>
+ + + + + + + + + + + +

The total amount of entries to retrieve when using the from parameter. Defaults to 50.

+ + + + + + cb @@ -3203,13 +3275,13 @@
Returns:
Examples
var params = {
-  roleId: 'ROLE_ID'
+  roleId: 'ROLE_ID',
   per_page: 50,
   page: 0
 };

- This method takes a roleId and returns all users within that role + This method takes a roleId and returns all users within that role. Supports offset (page, per_page) and checkpoint pagination (from, take). You must use checkpoint pagination to retrieve beyond the first 1000 records.

management.roles.getUsers(params, function (err, users) {
@@ -3651,7 +3723,7 @@ 

removeRole
Source:
@@ -4293,7 +4365,7 @@

Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.RulesConfigsManager.html b/docs/module-management.RulesConfigsManager.html index e10323da1..b8d4b17d7 100644 --- a/docs/module-management.RulesConfigsManager.html +++ b/docs/module-management.RulesConfigsManager.html @@ -24,7 +24,7 @@
@@ -1317,7 +1317,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.RulesManager.html b/docs/module-management.RulesManager.html index f02cdbf92..9eb31b5b2 100644 --- a/docs/module-management.RulesManager.html +++ b/docs/module-management.RulesManager.html @@ -24,7 +24,7 @@
@@ -1910,7 +1910,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.StatsManager.html b/docs/module-management.StatsManager.html index e0656b2f3..7b5fdf0de 100644 --- a/docs/module-management.StatsManager.html +++ b/docs/module-management.StatsManager.html @@ -24,7 +24,7 @@
@@ -919,7 +919,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.TenantManager.html b/docs/module-management.TenantManager.html index 4e96d27fa..897504fd8 100644 --- a/docs/module-management.TenantManager.html +++ b/docs/module-management.TenantManager.html @@ -24,7 +24,7 @@
@@ -871,7 +871,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.TicketsManager.html b/docs/module-management.TicketsManager.html index 711fcbe5c..32bcbb757 100644 --- a/docs/module-management.TicketsManager.html +++ b/docs/module-management.TicketsManager.html @@ -24,7 +24,7 @@
@@ -423,7 +423,7 @@

Methods

-

changePassword(cbopt) → {Promise}

+

changePassword(data, cbopt) → {Promise}

@@ -510,6 +510,391 @@
Parameters:
+ + + data + + + + + +Object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
result_url + + +String + + + + + + <optional>
+ + + + + +
+

URL the user will be redirected to once ticket is used.

+ +
user_id + + +String + + + + + + <optional>
+ + + + + +
+

user_id for whom the ticket should be created. (Conflicts with: connection_id, email)

+ +
client_id + + +String + + + + + + <optional>
+ + + + + +
+

ID of the client.

+ +
organization_id + + +String + + + + + + <optional>
+ + + + + +
+

ID of the organization.

+ +
connection_id + + +String + + + + + + <optional>
+ + + + + +
+

ID of the connection.

+ +
ttl_sec + + +Integer + + + + + + <optional>
+ + + + + +
+

Number of seconds for which the ticket is valid before expiration.

+ +
email + + +String + + + + + + <optional>
+ + + + + +
+

Email of the user. (Requires: connection_id)

+ +
mark_email_as_verified + + +Boolean + + + + + + <optional>
+ + + + + +
+

Whether to set the email_verified attribute to true (true) or whether it should not be updated (false).

+ +
includeEmailInRedirect + + +Boolean + + + + + + <optional>
+ + + + + +
+

Whether to include the email address as part of the returnUrl in the reset_email (true), or not (false).

+ +
+ + + + + + + cb @@ -652,7 +1037,7 @@

verifyEmai
Source:
@@ -1003,6 +1388,78 @@

Parameters:
+ + + + client_id + + + + + +String + + + + + + + + + <optional>
+ + + + + + + + + + + +

client ID.

+ + + + + + + + + organization_id + + + + + +String + + + + + + + + + <optional>
+ + + + + + + + + + + +

organization ID.

+ + + + + @@ -1121,7 +1578,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.UserBlocksManager.html b/docs/module-management.UserBlocksManager.html index 4264e49f3..180f4bced 100644 --- a/docs/module-management.UserBlocksManager.html +++ b/docs/module-management.UserBlocksManager.html @@ -24,7 +24,7 @@
@@ -1432,7 +1432,7 @@
Example

- Generated by JSDoc 3.6.6 on Fri Feb 05 2021 10:43:06 GMT-0800 (Pacific Standard Time) using the Minami theme. + Generated by JSDoc 3.6.6 on Wed Mar 24 2021 15:48:14 GMT-0700 (Pacific Daylight Time) using the Minami theme.
diff --git a/docs/module-management.UsersManager.html b/docs/module-management.UsersManager.html index 1c942f68a..2f910404d 100644 --- a/docs/module-management.UsersManager.html +++ b/docs/module-management.UsersManager.html @@ -24,7 +24,7 @@
@@ -1058,7 +1058,7 @@

createSource:
@@ -1276,7 +1276,7 @@

deleteSource:
@@ -1547,7 +1547,7 @@

deleteAllSource:
@@ -1731,7 +1731,7 @@

Source:
@@ -2028,7 +2028,7 @@

getSource:
@@ -2293,7 +2293,7 @@

getAllSource:
@@ -2620,7 +2620,7 @@

getByEmail<
Source:
@@ -2976,7 +2976,7 @@

Source:
@@ -3241,7 +3241,7 @@

getPerm
Source:
@@ -3459,6 +3459,271 @@

Example

+
+ + + +

getUserOrganizations(data, cbopt) → {Promise|undefined}

+ + + + + +
+

Get a list of organizations for a user.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
data + + +Object + + + + + + + + + + +

The user data object.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id + + +String + + + + +

The user id.

+ +
+ + +
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.users.getUserOrganizations({ id: USER_ID }, function (err, orgs) {
+  console.log(orgs);
+});
+ +
+ +
+ +
@@ -3506,7 +3771,7 @@

getUserRo
Source:
@@ -3771,7 +4036,7 @@

Source:
@@ -4040,7 +4305,7 @@