diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..6a263cd81 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @auth0/sdk-team-approvers diff --git a/.gitignore b/.gitignore index 11444ff23..00d4c0462 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ node_modules # Compressed files. *.tgz -# InelliJ IDEA +# IntelliJ IDEA .idea build @@ -43,4 +43,7 @@ test-results.xml # Release process .release -.release-tmp-*/ \ No newline at end of file +.release-tmp-*/ + +# npm +package-lock.json \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 06f7972ba..faad18685 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Change Log +## [v2.17.0](https://github.com/auth0/node-auth0/tree/v2.17.0) (2019-04-15) + +[Full Changelog](https://github.com/auth0/node-auth0/compare/v2.16.0...v2.17.0) + +**Added** + +* Add method to assign users to a role [\#348](https://github.com/auth0/node-auth0/pull/348) ([pushpabrol](https://github.com/pushpabrol)) +* Add support for roles and permissions [\#344](https://github.com/auth0/node-auth0/pull/344) ([pushpabrol](https://github.com/pushpabrol)) + +## [v2.16.0](https://github.com/auth0/node-auth0/tree/v2.16.0) (2019-03-18) + +[Full Changelog](https://github.com/auth0/node-auth0/compare/v2.15.0...v2.16.0) + +**Added** + +* Add support for Auth0 Grants [\#343](https://github.com/auth0/node-auth0/pull/343) ([jsmpereira](https://github.com/jsmpereira)) + +## [v2.15.0](https://github.com/auth0/node-auth0/tree/v2.15.0) (2019-03-11) + +[Full Changelog](https://github.com/auth0/node-auth0/compare/v2.14.0...v2.15.0) + +**Added** + +* Add users-exports endpoint [\#340](https://github.com/auth0/node-auth0/pull/340) ([arjenvanderende](https://github.com/arjenvanderende)) + +**Fixed** + +* Don't validate id_token when alg is HS256 and there is no clientSecret [\#330](https://github.com/auth0/node-auth0/pull/330) ([luisrudge](https://github.com/luisrudge)) + ## [v2.14.0](https://github.com/auth0/node-auth0/tree/v2.14.0) (2018-11-12) [Full Changelog](https://github.com/auth0/node-auth0/compare/v2.13.0...v2.14.0) diff --git a/docs/RetryRestClient.js.html b/docs/RetryRestClient.js.html index 0cf54eb1e..2539ec61e 100644 --- a/docs/RetryRestClient.js.html +++ b/docs/RetryRestClient.js.html @@ -24,7 +24,7 @@
@@ -207,7 +207,7 @@

RetryRestClient.js


diff --git a/docs/auth_DatabaseAuthenticator.js.html b/docs/auth_DatabaseAuthenticator.js.html index 9cfabf416..bcb4fcd0c 100644 --- a/docs/auth_DatabaseAuthenticator.js.html +++ b/docs/auth_DatabaseAuthenticator.js.html @@ -24,7 +24,7 @@
@@ -164,7 +164,7 @@

auth/DatabaseAuthenticator.js

* @param {Object} data User credentials object. * @param {String} data.email User email address. * @param {String} data.password User password. - * @param {Stinrg} data.connection Identity provider in use. + * @param {String} data.connection Identity provider in use. * @param {Function} [cb] Method callback. * * @return {Promise|undefined} @@ -345,7 +345,7 @@

auth/DatabaseAuthenticator.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/auth_OAUthWithIDTokenValidation.js.html b/docs/auth_OAUthWithIDTokenValidation.js.html index c8d5b0180..d6664e141 100644 --- a/docs/auth_OAUthWithIDTokenValidation.js.html +++ b/docs/auth_OAUthWithIDTokenValidation.js.html @@ -24,7 +24,7 @@
@@ -45,6 +45,9 @@

auth/OAUthWithIDTokenValidation.js

var ArgumentError = require('rest-facade').ArgumentError; +var HS256_IGNORE_VALIDATION_MESSAGE = + 'Validation of `id_token` requires a `clientSecret` when using the HS256 algorithm. To ensure tokens are validated, please switch the signing algorithm to RS256 or provide a `clientSecret` in the constructor.'; + /** * @class * Abstracts the `oauth.create` method with additional id_token validation @@ -99,6 +102,9 @@

auth/OAUthWithIDTokenValidation.js

if (r.id_token) { function getKey(header, callback) { if (header.alg === 'HS256') { + if (!_this.clientSecret) { + return callback({ message: HS256_IGNORE_VALIDATION_MESSAGE }); + } return callback(null, Buffer.from(_this.clientSecret, 'base64')); } _this._jwksClient.getSigningKey(header.kid, function(err, key) { @@ -118,11 +124,15 @@

auth/OAUthWithIDTokenValidation.js

audience: this.clientId, issuer: 'https://' + this.domain + '/' }, - function(err, payload) { - if (err) { - return rej(err); + function(err) { + if (!err) { + return res(r); + } + if (err.message && err.message.includes(HS256_IGNORE_VALIDATION_MESSAGE)) { + console.warn(HS256_IGNORE_VALIDATION_MESSAGE); + return res(r); } - return res(r); + return rej(err); } ); }); @@ -148,7 +158,7 @@

auth/OAUthWithIDTokenValidation.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/auth_OAuthAuthenticator.js.html b/docs/auth_OAuthAuthenticator.js.html index 31055ed63..3481f6a34 100644 --- a/docs/auth_OAuthAuthenticator.js.html +++ b/docs/auth_OAuthAuthenticator.js.html @@ -24,7 +24,7 @@
@@ -424,7 +424,7 @@

auth/OAuthAuthenticator.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/auth_PasswordlessAuthenticator.js.html b/docs/auth_PasswordlessAuthenticator.js.html index 49e45b1be..01335de0c 100644 --- a/docs/auth_PasswordlessAuthenticator.js.html +++ b/docs/auth_PasswordlessAuthenticator.js.html @@ -24,7 +24,7 @@
@@ -286,7 +286,7 @@

auth/PasswordlessAuthenticator.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/auth_TokensManager.js.html b/docs/auth_TokensManager.js.html index dab714d38..4fd3eb8fa 100644 --- a/docs/auth_TokensManager.js.html +++ b/docs/auth_TokensManager.js.html @@ -24,7 +24,7 @@
@@ -226,7 +226,7 @@

auth/TokensManager.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/auth_UsersManager.js.html b/docs/auth_UsersManager.js.html index 49fa17592..345cfface 100644 --- a/docs/auth_UsersManager.js.html +++ b/docs/auth_UsersManager.js.html @@ -24,7 +24,7 @@
@@ -224,7 +224,7 @@

auth/UsersManager.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/auth_index.js.html b/docs/auth_index.js.html index 09545aa68..2f29d7cdb 100644 --- a/docs/auth_index.js.html +++ b/docs/auth_index.js.html @@ -24,7 +24,7 @@
@@ -632,7 +632,7 @@

auth/index.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/external-RestClient.html b/docs/external-RestClient.html index 65462a15f..428fc8d88 100644 --- a/docs/external-RestClient.html +++ b/docs/external-RestClient.html @@ -24,7 +24,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +

+ RestClient +

+ + +
+ +
+
+ + +

Simple facade for consuming a REST API endpoint.

+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
@@ -1139,7 +1239,7 @@


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/index.html b/docs/index.html index 284900d46..59b2d5896 100644 --- a/docs/index.html +++ b/docs/index.html @@ -24,7 +24,7 @@
@@ -151,7 +151,7 @@

License

This project is licensed under the MIT license. See the

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/index.js.html b/docs/index.js.html index 1c8d473a0..094cc993b 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_BlacklistedTokensManager.js.html b/docs/management_BlacklistedTokensManager.js.html index 48fdcb021..ca8b9a674 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_ClientGrantsManager.js.html b/docs/management_ClientGrantsManager.js.html index 02d124357..35705ce1a 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_ClientsManager.js.html b/docs/management_ClientsManager.js.html index ee848a5a2..c976734cd 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_ConnectionsManager.js.html b/docs/management_ConnectionsManager.js.html index 15c95b0b1..2652dc8d3 100644 --- a/docs/management_ConnectionsManager.js.html +++ b/docs/management_ConnectionsManager.js.html @@ -24,7 +24,7 @@
@@ -232,7 +232,7 @@

management/ConnectionsManager.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_CustomDomainsManager.js.html b/docs/management_CustomDomainsManager.js.html index 09e419d59..c9ed7853b 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_DeviceCredentialsManager.js.html b/docs/management_DeviceCredentialsManager.js.html index f5dc2e012..88683e316 100644 --- a/docs/management_DeviceCredentialsManager.js.html +++ b/docs/management_DeviceCredentialsManager.js.html @@ -24,7 +24,7 @@
@@ -177,7 +177,7 @@

management/DeviceCredentialsManager.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_EmailProviderManager.js.html b/docs/management_EmailProviderManager.js.html index 38f961049..01384f0f8 100644 --- a/docs/management_EmailProviderManager.js.html +++ b/docs/management_EmailProviderManager.js.html @@ -24,7 +24,7 @@
@@ -132,7 +132,10 @@

management/EmailProviderManager.js

* }); * * @param {Function} [cb] Callback function. - * + * @param {Object} [params] Clients parameters. + * @param {Number} [params.fields] A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve: name, enabled, settings fields. + * @param {Number} [params.include_fields] true if the fields specified are to be excluded from the result, false otherwise (defaults to true) + * @return {Promise|undefined} */ utils.wrapPropertyMethod(EmailProviderManager, 'get', 'resource.getAll'); @@ -195,7 +198,7 @@

management/EmailProviderManager.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_EmailTemplatesManager.js.html b/docs/management_EmailTemplatesManager.js.html index b926f4b92..6438643cb 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_GrantsManager.js.html b/docs/management_GrantsManager.js.html new file mode 100644 index 000000000..ccceff56b --- /dev/null +++ b/docs/management_GrantsManager.js.html @@ -0,0 +1,179 @@ + + + + + + management/GrantsManager.js - Documentation + + + + + + + + + + + + + + + + + +
+ +

management/GrantsManager.js

+ + + + + + + +
+
+
var ArgumentError = require('rest-facade').ArgumentError;
+var utils = require('../utils');
+var Auth0RestClient = require('../Auth0RestClient');
+var RetryRestClient = require('../RetryRestClient');
+/**
+ * @class GrantsManager
+ * Auth0 Grants Manager.
+ *
+ * See {@link https://auth0.com/docs/api/v2#!/Grants Grants}
+ *
+ * @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 GrantsManager = function(options) {
+  if (options === null || typeof options !== 'object') {
+    throw new ArgumentError('Must provide client 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 = {
+    errorFormatter: { message: 'message', name: 'error' },
+    headers: options.headers,
+    query: { repeatParams: false }
+  };
+
+  /**
+   * Provides an abstraction layer for consuming the
+   * {@link https://auth0.com/docs/api/v2#!/Grants Auth0 Grants endpoint}.
+   *
+   * @type {external:RestClient}
+   */
+  var auth0RestClient = new Auth0RestClient(
+    options.baseUrl + '/grants/:id',
+    clientOptions,
+    options.tokenProvider
+  );
+  this.resource = new RetryRestClient(auth0RestClient, options.retry);
+};
+
+/**
+ * Get all Auth0 Grants.
+ *
+ * @method    getAll
+ * @memberOf  module:management.GrantsManager.prototype
+ *
+ * @example
+ * var params = {
+ *   per_page: 10,
+ *   page: 0,
+ *   include_totals: true,
+ *   user_id: 'USER_ID',
+ *   client_id: 'CLIENT_ID',
+ *   audience: 'AUDIENCE'
+ * };
+ *
+ * management.getGrants(params, function (err, grants) {
+ *   console.log(grants.length);
+ * });
+ *
+ * @param   {Object}    params                Grants parameters.
+ * @param   {Number}    params.per_page       Number of results per page.
+ * @param   {Number}    params.page           Page number, zero indexed.
+ * @param   {Boolean}   params.include_totals true if a query summary must be included in the result, false otherwise. Default false;
+ * @param   {String}    params.user_id        The user_id of the grants to retrieve.
+ * @param   {String}    params.client_id      The client_id of the grants to retrieve.
+ * @param   {String}    params.audience       The audience of the grants to retrieve.
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(GrantsManager, 'getAll', 'resource.getAll');
+
+/**
+ * Delete an Auth0 grant.
+ *
+ * @method    delete
+ * @memberOf  module:management.GrantsManager.prototype
+ *
+ * @example
+ * var params = {
+ *    id: 'GRANT_ID',
+ *    user_id: 'USER_ID'
+ * };
+ *
+ * management.deleteGrant(params, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   // Grant deleted.
+ * });
+ *
+ * @param   {Object}    params         Grant parameters.
+ * @param   {String}    params.id      Grant ID.
+ * @param   {String}    params.user_id The user_id of the grants to delete.
+ * @param   {Function}  [cb]           Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(GrantsManager, 'delete', 'resource.delete');
+
+module.exports = GrantsManager;
+
+
+
+ + + + +
+ +
+ +
+ Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme. +
+ + + + + diff --git a/docs/management_GuardianManager.js.html b/docs/management_GuardianManager.js.html index fd969d25b..a83fef1f9 100644 --- a/docs/management_GuardianManager.js.html +++ b/docs/management_GuardianManager.js.html @@ -24,7 +24,7 @@
@@ -328,7 +328,7 @@

management/GuardianManager.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_JobsManager.js.html b/docs/management_JobsManager.js.html index 0b1a0388d..9b1f553c9 100644 --- a/docs/management_JobsManager.js.html +++ b/docs/management_JobsManager.js.html @@ -24,7 +24,7 @@
@@ -98,6 +98,19 @@

management/JobsManager.js

options.tokenProvider ); this.jobs = new RetryRestClient(auth0RestClient, options.retry); + + /** + * Provides an abstraction layer for consuming the + * {@link https://auth0.com/docs/api/v2#!/Jobs/post_users_exports Create job to export users endpoint} + * + * @type {external:RestClient} + */ + const usersExportsRestClient = new Auth0RestClient( + options.baseUrl + '/jobs/users-exports', + clientOptions, + options.tokenProvider + ); + this.usersExports = new RetryRestClient(usersExportsRestClient, options.retry); }; /** @@ -155,7 +168,7 @@

management/JobsManager.js

* send_completion_email: false //optional * }; * - * management.jobs.get(params, function (err) { + * management.jobs.importUsers(params, function (err) { * if (err) { * // Handle error. * } @@ -235,6 +248,63 @@

management/JobsManager.js

return promise; }; +/** + * Export all users to a file using a long running job. + * + * @method exportUsers + * @memberOf module:management.JobsManager.prototype + * + * @example + * var data = { + * connection_id: 'con_0000000000000001', + * format: 'csv', + * limit: 5, + * fields: [ + * { + * "name": "user_id" + * }, + * { + * "name": "name" + * }, + * { + * "name": "email" + * }, + * { + * "name": "identities[0].connection", + * "export_as": "provider" + * }, + * { + * "name": "user_metadata.some_field" + * } + * ] + * } + * + * management.jobs.exportUsers(data, function (err, results) { + * if (err) { + * // Handle error. + * } + * + * // Retrieved job. + * console.log(results); + * }); + * + * @param {Object} data Users export data. + * @param {String} [data.connection_id] The connection id of the connection from which users will be exported + * @param {String} [data.format] The format of the file. Valid values are: "json" and "csv". + * @param {Number} [data.limit] Limit the number of records. + * @param {Object[]} [data.fields] A list of fields to be included in the CSV. If omitted, a set of predefined fields will be exported. + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +JobsManager.prototype.exportUsers = function(data, cb) { + if (cb && cb instanceof Function) { + return this.usersExports.create(data, cb); + } + + return this.usersExports.create(data); +}; + /** * Send a verification email to a user. * @@ -284,7 +354,7 @@

management/JobsManager.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_LogsManager.js.html b/docs/management_LogsManager.js.html index 6c9f5b9ea..a1c5c3285 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_ManagementTokenProvider.js.html b/docs/management_ManagementTokenProvider.js.html index 2b5b18db8..d54e67e7f 100644 --- a/docs/management_ManagementTokenProvider.js.html +++ b/docs/management_ManagementTokenProvider.js.html @@ -24,7 +24,7 @@
@@ -189,7 +189,7 @@

management/ManagementTokenProvider.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_ResourceServersManager.js.html b/docs/management_ResourceServersManager.js.html index 3cfaa5da4..6e22790ed 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_RolesManager.js.html b/docs/management_RolesManager.js.html new file mode 100644 index 000000000..adcf4d6a0 --- /dev/null +++ b/docs/management_RolesManager.js.html @@ -0,0 +1,462 @@ + + + + + + management/RolesManager.js - Documentation + + + + + + + + + + + + + + + + + +
+ +

management/RolesManager.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 RolesManager
+ * The role class provides a simple abstraction for performing CRUD operations
+ * on Auth0 RolesManager.
+ * @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 RolesManager = 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#!/RolesManager Auth0 RolesManagers}.
+   *
+   * @type {external:RestClient}
+   */
+  var auth0RestClient = new Auth0RestClient(
+    options.baseUrl + '/roles/:id',
+    clientOptions,
+    options.tokenProvider
+  );
+  this.resource = new RetryRestClient(auth0RestClient, options.retry);
+
+  var permissionsInRoleClient = new Auth0RestClient(
+    options.baseUrl + '/roles/:id/permissions',
+    clientOptions,
+    options.tokenProvider
+  );
+  this.permissions = new RetryRestClient(permissionsInRoleClient, options.retry);
+
+  var usersInRoleClient = new Auth0RestClient(
+    options.baseUrl + '/roles/:id/users',
+    clientOptions,
+    options.tokenProvider
+  );
+  this.users = new RetryRestClient(usersInRoleClient, options.retry);
+};
+
+/**
+ * Create a new role.
+ *
+ * @method    create
+ * @memberOf  module:management.RolesManager.prototype
+ *
+ * @example
+ * management.roles.create(data, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   // Role created.
+ * });
+ *
+ * @param   {Object}    data     Role data object.
+ * @param   {Function}  [cb]     Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(RolesManager, 'create', 'resource.create');
+
+/**
+ * Get all roles.
+ *
+ * @method    getAll
+ * @memberOf  module:management.RolesManager.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.roles.getAll(params, function (err, roles) {
+ *   console.log(roles.length);
+ * });
+ *
+ * @param   {Object}    [params]          Roles 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(RolesManager, 'getAll', 'resource.getAll');
+
+/**
+ * Get an Auth0 role.
+ *
+ * @method    get
+ * @memberOf  module:management.RolesManager.prototype
+ *
+ * @example
+ * management.roles.get({ id: ROLE_ID }, function (err, role) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   console.log(role);
+ * });
+ *
+ * @param   {Object}    params        Role parameters.
+ * @param   {String}    params.id     Role ID.
+ * @param   {Function}  [cb]          Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(RolesManager, 'get', 'resource.get');
+
+/**
+ * Update an existing role.
+ *
+ * @method    update
+ * @memberOf  module:management.RolesManager.prototype
+ *
+ * @example
+ * var data = { name: 'New name' };
+ * var params = { id: ROLE_ID };
+ *
+ * // Using auth0 instance.
+ * management.updateRole(params, data, function (err, role) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   console.log(role.name);  // 'New name'
+ * });
+ *
+ * // Using the roles manager directly.
+ * management.roles.update(params, data, function (err, role) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   console.log(role.name);  // 'New name'
+ * });
+ *
+ * @param   {Object}    params        Role parameters.
+ * @param   {String}    params.id     Role ID.
+ * @param   {Object}    data          Updated role data.
+ * @param   {Function}  [cb]          Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(RolesManager, 'update', 'resource.patch');
+
+/**
+ * Delete an existing role.
+ *
+ * @method    delete
+ * @memberOf  module:management.RolesManager.prototype
+ *
+ * @example
+ * management.roles.delete({ id: ROLE_ID }, function (err) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   // Role deleted.
+ * });
+ *
+ * @param   {Object}    params        Role parameters.
+ * @param   {String}    params.id     Role ID.
+ * @param   {Function}  [cb]          Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+utils.wrapPropertyMethod(RolesManager, 'delete', 'resource.delete');
+
+/**
+ * Get Permissions in a Role
+ *
+ * @method    getPermissionsInRole
+ * @memberOf  module:management.RolesManager.prototype
+ *
+ * @example
+ * var params = {id : 'ROLE_ID'}
+ * @example <caption>
+ *   This method takes a first argument as the roleId and returns the permissions within that role
+ * </caption>
+ *
+ * management.roles.getPermissions( {id : 'ROLE_ID'}, function (err, permissions) {
+ *   console.log(permissions);
+ * });
+ *
+ * @param   {String}    [email]           Email address of user(s) to find
+ * @param   {Function}  [cb]              Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+RolesManager.prototype.getPermissions = function(params, callback) {
+  return this.permissions.getAll(params, callback);
+};
+
+/**
+ * Add permissions in a role
+ *
+ * @method    addPermissions
+ * @memberOf  module:management.RolesManager.prototype
+ *
+ * @example
+ * var params =  { id :'ROLE_ID'};
+ * var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+ *
+ * management.roles.addPermissions(params, data, function (err, user) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   // permissions added.
+ * });
+ *
+ * @param   {String}    params.id                ID of the Role.
+ * @param   {Object}    data                permissions data
+ * @param   {String}    data.permissions    Array of permissions
+ * @param   {String}    data.permissions.permission_name  Name of a permission
+ * @param   {String}    data.permissions.resource_server_identifier  Identifier for a resource
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+
+RolesManager.prototype.addPermissions = function(params, data, cb) {
+  data = data || {};
+  params = params || {};
+
+  // Require a user ID.
+  if (!params.id) {
+    throw new ArgumentError('The roleId passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The role Id has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.permissions.create(params, data, cb);
+  }
+
+  return this.permissions.create(params, data);
+};
+
+/**
+ * Remove permissions from a role
+ *
+ * @method    removePermissions
+ * @memberOf  module:management.RolesManager.prototype
+ *
+ * @example
+ * var params =  { id :'ROLE_ID'};
+ * var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+ *
+ * management.roles.removePermissions(params, data, function (err, user) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   // permissions added.
+ * });
+ *
+ * @param   {String}    params.id                ID of the Role.
+ * @param   {Object}    data                permissions data
+ * @param   {String}    data.permissions    Array of permissions
+ * @param   {String}    data.permissions.permission_name  Name of a permission
+ * @param   {String}    data.permissions.resource_server_identifier  Identifier for a resource
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+
+RolesManager.prototype.removePermissions = function(params, data, cb) {
+  data = data || {};
+  params = params || {};
+
+  // Require a user ID.
+  if (!params.id) {
+    throw new ArgumentError('The roleId passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The role Id has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.permissions.delete(params, data, cb);
+  }
+
+  return this.permissions.delete(params, data);
+};
+
+/**
+ * Get Users in a Role
+ *
+ * @method    getUsers
+ * @memberOf  module:management.RolesManager.prototype
+ *
+ * @example
+ * params = {id : 'ROLE_ID'}
+ * @example <caption>
+ *   This method takes a roleId and returns the users with that role assigned
+ * </caption>
+ *
+ * management.roles.getUsers( {id : 'ROLE_ID'}, function (err, users) {
+ *   console.log(users);
+ * });
+ *
+ * @param   {String}    [email]           Email address of user(s) to find
+ * @param   {Function}  [cb]              Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+RolesManager.prototype.getUsers = function(params, callback) {
+  return this.users.getAll(params, callback);
+};
+
+/**
+ * Assign users to a role
+ *
+ * @method    assignUsers
+ * @memberOf  module:management.RolesManager.prototype
+ *
+ * @example
+ * var params =  { id :'ROLE_ID'};
+ * var data = { "users" : ["userId1","userId2"]};
+ *
+ * management.roles.assignUsers(params, data, function (err, user) {
+ *   if (err) {
+ *     // Handle error.
+ *   }
+ *
+ *   // permissions added.
+ * });
+ *
+ * @param   {String}    params.id                ID of the Role.
+ * @param   {Object}    data                permissions data
+ * @param   {String}    data.permissions    Array of permissions
+ * @param   {String}    data.permissions.permission_name  Name of a permission
+ * @param   {String}    data.permissions.resource_server_identifier  Identifier for a resource
+ * @param   {Function}  [cb]                  Callback function.
+ *
+ * @return  {Promise|undefined}
+ */
+
+RolesManager.prototype.assignUsers = function(params, data, cb) {
+  data = data || {};
+  params = params || {};
+
+  // Require a user ID.
+  if (!params.id) {
+    throw new ArgumentError('The roleId passed in params cannot be null or undefined');
+  }
+  if (typeof params.id !== 'string') {
+    throw new ArgumentError('The role Id has to be a string');
+  }
+
+  if (cb && cb instanceof Function) {
+    return this.permissions.create(params, data, cb);
+  }
+
+  return this.users.create(params, data);
+};
+
+module.exports = RolesManager;
+
+
+
+ + + + +
+ +
+ +
+ Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme. +
+ + + + + diff --git a/docs/management_RulesConfigsManager.js.html b/docs/management_RulesConfigsManager.js.html index 18de21ac5..4164615e5 100644 --- a/docs/management_RulesConfigsManager.js.html +++ b/docs/management_RulesConfigsManager.js.html @@ -24,7 +24,7 @@
@@ -179,7 +179,7 @@

management/RulesConfigsManager.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_RulesManager.js.html b/docs/management_RulesManager.js.html index 8f51c048f..7cde7ef0c 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_StatsManager.js.html b/docs/management_StatsManager.js.html index aff6e68c8..93c852667 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_TenantManager.js.html b/docs/management_TenantManager.js.html index 2a14fe60a..db15c4e7b 100644 --- a/docs/management_TenantManager.js.html +++ b/docs/management_TenantManager.js.html @@ -24,7 +24,7 @@
@@ -161,7 +161,7 @@

management/TenantManager.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_TicketsManager.js.html b/docs/management_TicketsManager.js.html index ce0b83bb6..418b10d7e 100644 --- a/docs/management_TicketsManager.js.html +++ b/docs/management_TicketsManager.js.html @@ -24,7 +24,7 @@
@@ -166,7 +166,7 @@

management/TicketsManager.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_UsersManager.js.html b/docs/management_UsersManager.js.html index 76adaeaa4..9f330abbb 100644 --- a/docs/management_UsersManager.js.html +++ b/docs/management_UsersManager.js.html @@ -24,7 +24,7 @@
@@ -162,6 +162,30 @@

management/UsersManager.js

recoveryCodeRegenerationAuth0RestClients, options.retry ); + + /** + * Provides an abstraction layer for CRD on roles for a user + * + * @type {external:RestClient} + */ + var userRolesClient = new Auth0RestClient( + options.baseUrl + '/users/:id/roles', + clientOptions, + options.tokenProvider + ); + this.roles = new RetryRestClient(userRolesClient, options.retry); + + /** + * Provides an abstraction layer for CRD on permissions directly on a user + * + * @type {external:RestClient} + */ + var userPermissionsClient = new Auth0RestClient( + options.baseUrl + '/users/:id/permissions', + clientOptions, + options.tokenProvider + ); + this.permissions = new RetryRestClient(userPermissionsClient, options.retry); }; /** @@ -664,6 +688,232 @@

management/UsersManager.js

return this.recoveryCodeRegenerations.create(params, {}); }; +/** + * Get a list of roles for a user. + * + * @method getUserRoles + * @memberOf module:management.UsersManager.prototype + * + * @example + * management.users.getRoles({ id: USER_ID }, function (err, roles) { + * console.log(roles); + * }); + * + * @param {Object} data The user data object. + * @param {String} data.id The user id. + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +UsersManager.prototype.getRoles = function() { + return this.roles.getAll.apply(this.roles, arguments); +}; + +/** + * Assign roles to a user + * + * @method assignRoles + * @memberOf module:management.RolesManager.prototype + * + * @example + * var params = { id : 'USER_ID'; + * var data = { "roles" : ["roleId1", "roleID2"]}; + * + * management.users.assignRoles(params, data, function (err, user) { + * if (err) { + * // Handle error. + * } + * + * // roles added. + * }); + * + * @param {Object} params params object + * @param {String} params.id user_id + * @param {String} data data object containing list of role IDs + * @param {String} data.roles Array of role IDs + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ + +UsersManager.prototype.assignRoles = function(params, data, cb) { + var query = params || {}; + data = data || {}; + + // Require a user ID. + if (!params.id) { + throw new ArgumentError('The user_id cannot be null or undefined'); + } + if (typeof params.id !== 'string') { + throw new ArgumentError('The user_id has to be a string'); + } + + if (cb && cb instanceof Function) { + return this.roles.create(query, data, cb); + } + + return this.roles.create(query, data); +}; + +/** + * Remove roles from a user + * + * @method removeRoles + * @memberOf module:management.RolesManager.prototype + * + * @example + * var params = { id : 'USER_ID'; + * var data = { "roles" : ["roleId1", "roleID2"]}; + * + * management.users.removeRoles(params, data, function (err, user) { + * if (err) { + * // Handle error. + * } + * + * // roles removed. + * }); + * + * @param {Object} params params object + * @param {String} params.id user_id + * @param {String} data data object containing list of role IDs + * @param {String} data.roles Array of role IDs + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ + +UsersManager.prototype.removeRoles = function(params, data, cb) { + var query = params || {}; + data = data || {}; + + // Require a user ID. + if (!params.id) { + throw new ArgumentError('The user_id cannot be null or undefined'); + } + if (typeof params.id !== 'string') { + throw new ArgumentError('The user_id has to be a string'); + } + + if (cb && cb instanceof Function) { + return this.roles.delete(query, data, cb); + } + + return this.roles.delete(query, data); +}; + +/** + * Get a list of permissions for a user. + * + * @method getPermissions + * @memberOf module:management.UsersManager.prototype + * + * @example + * management.users.getPermissions({ id: USER_ID }, function (err, permissions) { + * console.log(permissions); + * }); + * + * @param {Object} data The user data object. + * @param {String} data.id The user id. + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +UsersManager.prototype.getPermissions = function() { + return this.permissions.getAll.apply(this.permissions, arguments); +}; + +/** + * Assign permissions to a user + * + * @method assignPermissions + * @memberOf module:management.permissionsManager.prototype + * + * @example + * var params = { id : 'USER_ID'; + * var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]}; + * + * management.users.assignPermissions(params, data, function (err, user) { + * if (err) { + * // Handle error. + * } + * + * // permissions added. + * }); + * + * @param {Object} params params object + * @param {String} params.id user_id + * @param {String} data data object containing list of permissions + * @param {String} data.permissions Array of permission IDs + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ + +UsersManager.prototype.assignPermissions = function(params, data, cb) { + var query = params || {}; + data = data || {}; + + // Require a user ID. + if (!params.id) { + throw new ArgumentError('The user_id cannot be null or undefined'); + } + if (typeof params.id !== 'string') { + throw new ArgumentError('The user_id has to be a string'); + } + + if (cb && cb instanceof Function) { + return this.permissions.create(query, data, cb); + } + + return this.permissions.create(query, data); +}; + +/** + * Remove permissions from a user + * + * @method removePermissions + * @memberOf module:management.permissionsManager.prototype + * + * @example + * var params = { id : 'USER_ID'; + * var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]}; + * + * management.users.removePermissions(params, data, function (err, user) { + * if (err) { + * // Handle error. + * } + * + * // permissions removed. + * }); + * + * @param {Object} params params object + * @param {String} params.id user_id + * @param {String} data data object containing list of permission IDs + * @param {String} data.permissions Array of permission IDs + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ + +UsersManager.prototype.removePermissions = function(params, data, cb) { + var query = params || {}; + data = data || {}; + + // Require a user ID. + if (!params.id) { + throw new ArgumentError('The user_id cannot be null or undefined'); + } + if (typeof params.id !== 'string') { + throw new ArgumentError('The user_id has to be a string'); + } + + if (cb && cb instanceof Function) { + return this.permissions.delete(query, data, cb); + } + + return this.permissions.delete(query, data); +}; + module.exports = UsersManager;

@@ -677,7 +927,7 @@

management/UsersManager.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/management_index.js.html b/docs/management_index.js.html index 9e4daa584..4d6da6415 100644 --- a/docs/management_index.js.html +++ b/docs/management_index.js.html @@ -24,7 +24,7 @@
@@ -52,6 +52,7 @@

management/index.js

// Managers. var ClientsManager = require('./ClientsManager'); var ClientGrantsManager = require('./ClientGrantsManager'); +var GrantsManager = require('./GrantsManager'); var UsersManager = require('./UsersManager'); var ConnectionsManager = require('./ConnectionsManager'); var BlacklistedTokensManager = require('./BlacklistedTokensManager'); @@ -69,6 +70,7 @@

management/index.js

var EmailTemplatesManager = require('./EmailTemplatesManager'); var GuardianManager = require('./GuardianManager'); var CustomDomainsManager = require('./CustomDomainsManager'); +var RolesManager = require('./RolesManager'); var BASE_URL_FORMAT = 'https://%s/api/v2'; var MANAGEMENT_API_AUD_FORMAT = 'https://%s/api/v2/'; @@ -190,6 +192,14 @@

management/index.js

*/ this.clientGrants = new ClientGrantsManager(managerOptions); + /** + * Simple abstraction for performing CRUD operations on the grants + * endpoint. + * + * @type {GrantsManager} + */ + this.grants = new GrantsManager(managerOptions); + /** * Simple abstraction for performing CRUD operations on the * users endpoint. @@ -311,6 +321,14 @@

management/index.js

* @type {RulesConfigsManager} */ this.rulesConfigs = new RulesConfigsManager(managerOptions); + + /** + * Simple abstraction for performing CRUD operations on the + * roles endpoint. + * + * @type {RolesManager} + */ + this.roles = new RolesManager(managerOptions); }; /** @@ -599,8 +617,8 @@

management/index.js

/** * Get all Auth0 Client Grants. * - * @method getAll - * @memberOf module:management.ClientGrantsManager.prototype + * @method getClientGrants + * @memberOf module:management.ManagementClient.prototype * * @example <caption> * This method takes an optional object as first argument that may be used to @@ -630,8 +648,8 @@

management/index.js

/** * Create an Auth0 client grant. * - * @method create - * @memberOf module:management.ClientGrantsManager.prototype + * @method createClientGrant + * @memberOf module:management.ManagementClient.prototype * * @example * management.clientGrants.create(data, function (err) { @@ -652,8 +670,8 @@

management/index.js

/** * Update an Auth0 client grant. * - * @method update - * @memberOf module:management.ClientGrantsManager.prototype + * @method updateClientGrant + * @memberOf module:management.ManagementClient.prototype * * @example * var data = { @@ -683,8 +701,8 @@

management/index.js

/** * Delete an Auth0 client grant. * - * @method delete - * @memberOf module:management.ClientGrantsManager.prototype + * @method deleteClientGrant + * @memberOf module:management.ManagementClient.prototype * * @example * management.clientGrants.delete({ id: GRANT_ID }, function (err) { @@ -703,6 +721,68 @@

management/index.js

*/ utils.wrapPropertyMethod(ManagementClient, 'deleteClientGrant', 'clientGrants.delete'); +/** + * Get all Auth0 Grants. + * + * @method getGrants + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var params = { + * per_page: 10, + * page: 0, + * include_totals: true, + * user_id: USER_ID, + * client_id: CLIENT_ID, + * audience: AUDIENCE + * }; + * + * management.getGrants(params, function (err, grants) { + * console.log(grants.length); + * }); + * + * @param {Object} params Grants parameters. + * @param {Number} params.per_page Number of results per page. + * @param {Number} params.page Page number, zero indexed. + * @param {Boolean} params.include_totals true if a query summary must be included in the result, false otherwise. Default false; + * @param {String} params.user_id The user_id of the grants to retrieve. + * @param {String} params.client_id The client_id of the grants to retrieve. + * @param {String} params.audience The audience of the grants to retrieve. + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'getGrants', 'grants.getAll'); + +/** + * Delete an Auth0 grant. + * + * @method deleteGrant + * @memberOf module:management.GrantsManager.prototype + * + * @example + * var params = { + * id: GRANT_ID, + * user_id: USER_ID + * }; + * + * management.deleteGrant(params, function (err) { + * if (err) { + * // Handle error. + * } + * + * // Grant deleted. + * }); + * + * @param {Object} params Grant parameters. + * @param {String} params.id Grant ID. + * @param {String} params.user_id The user_id of the grants to delete. + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'deleteGrant', 'grants.delete'); + /** * Create an Auth0 credential. * @@ -1276,6 +1356,176 @@

management/index.js

*/ utils.wrapPropertyMethod(ManagementClient, 'getUserLogs', 'users.logs'); +/** + * Get user's roles + * + * @method getUserRoles + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true }; + * + * management.getUserRoles(params, function (err, logs) { + * if (err) { + * // Handle error. + * } + * + * console.log(logs); + * }); + * + * @param {Object} params Get roles data. + * @param {String} params.id User id. + * @param {Number} params.per_page Number of results per page. + * @param {Number} params.page Page number, zero indexed. + * @param {String} params.sort The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1. + * @param {Boolean} params.include_totals true if a query summary must be included in the result, false otherwise. Default false; + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'getUserRoles', 'users.getRoles'); + +/** + * Asign roles to a user + * + * @method assignRolestoUser + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var parms = { id : 'USER_ID'}; + * var data = { "roles" :["role1"]}; + * + * management.assignRolestoUser(params, data, function (err) { + * if (err) { + * // Handle error. + * } + * + * // User assigned roles. + * }); + * + * @param {Object} params params object + * @param {String} params.id user_id + * @param {String} data data object containing list of role IDs + * @param {String} data.roles Array of role IDs + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'assignRolestoUser', 'users.assignRoles'); + +/** + * Remove roles from a user + * + * @method removeRolesFromUser + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var parms = { id : 'USER_ID'}; + * var data = { "roles" :["role1"]}; + * + * management.removeRolesFromUser(params, data, function (err) { + * if (err) { + * // Handle error. + * } + * + * // User assigned roles. + * }); + * + * @param {Object} params params object + * @param {String} params.id user_id + * @param {String} data data object containing list of role IDs + * @param {String} data.roles Array of role IDs + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'removeRolesFromUser', 'users.removeRoles'); + +/** + * Get user's permissions + * + * @method getUserPermissions + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true }; + * + * management.getUserPermissions(params, function (err, logs) { + * if (err) { + * // Handle error. + * } + * + * console.log(logs); + * }); + * + * @param {Object} params Get permissions data. + * @param {String} params.id User id. + * @param {Number} params.per_page Number of results per page. + * @param {Number} params.page Page number, zero indexed. + * @param {String} params.sort The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1. + * @param {Boolean} params.include_totals true if a query summary must be included in the result, false otherwise. Default false; + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'getUserPermissions', 'users.getPermissions'); + +/** + * Asign permissions to a user + * + * @method assignPermissionsToUser + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var parms = { id : 'USER_ID'}; + * var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]}; + * + * management.assignPermissionsToUser(params, data, function (err) { + * if (err) { + * // Handle error. + * } + * + * // User assigned permissions. + * }); + * + * @param {Object} params params object + * @param {String} params.id user_id + * @param {String} data data object containing list of permissions + * @param {String} data.permissions Array of permission IDs + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'assignPermissionsToUser', 'users.assignPermissions'); + +/** + * Remove permissions from a user + * + * @method removePermissionsFromUser + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var parms = { id : 'USER_ID'}; + * var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]}; + * + * management.removePermissionsFromUser(params, data, function (err) { + * if (err) { + * // Handle error. + * } + * + * // User assigned permissions. + * }); + * + * @param {Object} params params object + * @param {String} params.id user_id + * @param {String} data data object containing list of permission IDs + * @param {String} data.permissions Array of permission IDs + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'removePermissionsFromUser', 'users.removePermissions'); + /** * Get a list of a user's Guardian enrollments. * @@ -1430,7 +1680,10 @@

management/index.js

* }); * * @param {Function} [cb] Callback function. - * + * @param {Object} [params] Clients parameters. + * @param {Number} [params.fields] A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve: name, enabled, settings fields. + * @param {Number} [params.include_fields] true if the fields specified are to be excluded from the result, false otherwise (defaults to true) + * @return {Promise|undefined} */ utils.wrapPropertyMethod(ManagementClient, 'getEmailProvider', 'emailProvider.get'); @@ -1649,6 +1902,57 @@

management/index.js

*/ utils.wrapPropertyMethod(ManagementClient, 'importUsers', 'jobs.importUsers'); +/** + * Export all users to a file using a long running job. + * + * @method exportUsers + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var data = { + * connection_id: 'con_0000000000000001', + * format: 'csv', + * limit: 5, + * fields: [ + * { + * "name": "user_id" + * }, + * { + * "name": "name" + * }, + * { + * "name": "email" + * }, + * { + * "name": "identities[0].connection", + * "export_as": "provider" + * }, + * { + * "name": "user_metadata.some_field" + * } + * ] + * } + * + * management.exportUsers(data, function (err, results) { + * if (err) { + * // Handle error. + * } + * + * // Retrieved job. + * console.log(results); + * }); + * + * @param {Object} data Users export data. + * @param {String} [data.connection_id] The connection id of the connection from which users will be exported + * @param {String} [data.format] The format of the file. Valid values are: "json" and "csv". + * @param {Number} [data.limit] Limit the number of records. + * @param {Object[]} [data.fields] A list of fields to be included in the CSV. If omitted, a set of predefined fields will be exported. + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'exportUsers', 'jobs.exportUsers'); + /** * Send a verification email to a user. * @@ -1982,8 +2286,8 @@

management/index.js

/** * Create an Auth0 Custom Domain. * - * @method create - * @memberOf module:management.CustomDomainsManager.prototype + * @method createCustomDomain + * @memberOf module:management.ManagementClient.prototype * * @example * management.createCustomDomain(data, function (err) { @@ -2004,8 +2308,8 @@

management/index.js

/** * Get all Auth0 CustomDomains. * - * @method getAll - * @memberOf module:management.CustomDomainsManager.prototype + * @method getCustomDomains + * @memberOf module:management.ManagementClient.prototype * * @example * management.getCustomDomains(function (err, customDomains) { @@ -2019,8 +2323,8 @@

management/index.js

/** * Get a Custom Domain. * - * @method get - * @memberOf module:management.CustomDomainsManager.prototype + * @method getCustomDomain + * @memberOf module:management.ManagementClient.prototype * * @example * management.getCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err, customDomain) { @@ -2042,8 +2346,8 @@

management/index.js

/** * Verify a Custom Domain. * - * @method verify - * @memberOf module:management.CustomDomainsManager.prototype + * @method verifyCustomDomain + * @memberOf module:management.ManagementClient.prototype * * @example * management.verifyCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err, customDomain) { @@ -2065,8 +2369,8 @@

management/index.js

/** * Delete a Custom Domain. * - * @method delete - * @memberOf module:management.CustomDomainsManager.prototype + * @method deleteCustomDomain + * @memberOf module:management.ManagementClient.prototype * * @example * management.deleteCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err) { @@ -2089,7 +2393,7 @@

management/index.js

* Create a Guardian enrollment ticket. * * @method createGuardianEnrollmentTicket - * @memberOf module:management.GuardianManager.prototype + * @memberOf module:management.ManagementClient.prototype * * @example * management.createGuardianEnrollmentTicket(function (err, ticket) { @@ -2110,7 +2414,7 @@

management/index.js

* Get a list of Guardian factors and statuses. * * @method getGuardianFactors - * @memberOf module:management.GuardianManager.prototype + * @memberOf module:management.ManagementClient.prototype * * management.getGuardianFactors(function (err, factors) { * console.log(factors.length); @@ -2126,7 +2430,7 @@

management/index.js

* Get Guardian factor provider configuration * * @method getGuardianFactorProvider - * @memberOf module:management.GuardianManager.prototype + * @memberOf module:management.ManagementClient.prototype * * management.getFactorProvider({ name: 'sms', provider: 'twilio'}, function (err, provider) { * console.log(provider); @@ -2147,7 +2451,7 @@

management/index.js

* Update Guardian's factor provider * * @method updateFactorProvider - * @memberOf module:management.GuardianManager.prototype + * @memberOf module:management.ManagementClient.prototype * * management.updateGuardianFactorProvider({ name: 'sms', provider: 'twilio' }, { * messaging_service_sid: 'XXXXXXXXXXXXXX', @@ -2173,7 +2477,7 @@

management/index.js

* Get Guardian enrollment and verification factor templates * * @method getGuardianFactorTemplates - * @memberOf module:management.GuardianManager.prototype + * @memberOf module:management.ManagementClient.prototype * * management.getGuardianFactorTemplates({ name: 'sms' }, function (err, templates) { * console.log(templates); @@ -2194,7 +2498,7 @@

management/index.js

* Update Guardian enrollment and verification factor templates * * @method updateGuardianFactorTemplates - * @memberOf module:management.GuardianManager.prototype + * @memberOf module:management.ManagementClient.prototype * * management.updateGuardianFactorTemplates({ name: 'sms' }, { * enrollment_message: "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.", @@ -2219,7 +2523,7 @@

management/index.js

* Update Guardian Factor * * @method updateGuardianFactor - * @memberOf module.GuardianManager.prototype + * @memberOf module:management.ManagementClient.prototype * * management.updateGuardianFactor({ name: 'sms' }, { * enabled: true @@ -2235,6 +2539,232 @@

management/index.js

*/ utils.wrapPropertyMethod(ManagementClient, 'updateGuardianFactor', 'guardian.factors.update'); +/** + * Get all roles. + * + * @method getRoles + * @memberOf module:management.ManagementClient.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.getRoles(params, function (err, roles) { + * console.log(roles.length); + * }); + * + * @param {Object} [params] Roles 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(ManagementClient, 'getRoles', 'roles.getAll'); + +/** + * Create a new role. + * + * @method createRole + * @memberOf module:management.ManagementClient.prototype + * + * @example + * data = {"name": "test1","description": "123"} + * management.createRole(data, function (err) { + * if (err) { + * // Handle error. + * } + * + * // Role created. + * }); + * + * @param {Object} data Role data object. + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'createRole', 'roles.create'); + +/** + * Get an Auth0 role. + * + * @method getRole + * @memberOf module:management.ManagementClient.prototype + * + * @example + * management.getRole({ id: ROLE_ID }, function (err, role) { + * if (err) { + * // Handle error. + * } + * + * console.log(role); + * }); + * + * @param {Object} params Role parameters. + * @param {String} params.id Role ID. + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'getRole', 'roles.get'); + +/** + * Delete an existing role. + * + * @method deleteRole + * @memberOf module:management.ManagementClient.prototype + * + * @example + * management.deleteRole({ id: ROLE_ID }, function (err) { + * if (err) { + * // Handle error. + * } + * + * // Role deleted. + * }); + * + * @param {Object} params Role parameters. + * @param {String} params.id Role ID. + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'deleteRole', 'roles.delete'); + +/** + * Update an existing role. + * + * @method updateRole + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var params = { id: ROLE_ID }; + * var data = { name: 'my-role'}; + * management.updateRole(params, data, function (err, role) { + * if (err) { + * // Handle error. + * } + * + * console.log(role.name); // 'my-role'. + * }); + * + * @param {Object} params Role parameters. + * @param {String} params.id Role ID. + * @param {Object} data Updated role data. + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'updateRole', 'roles.update'); + +/** + * Get permissions for a given role + * + * @method getPermissionsInRole + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var params = { id :'ROLE_ID'}; + * @example <caption> + * This method takes a roleId and + * returns all permissions within that role + * + * </caption> + * + * management.getPermissionsInRole(params, function (err, permissions) { + * console.log(permissions); + * }); + * + * @param {String} [roleId] Id of the role + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'getPermissionsInRole', 'roles.getPermissions'); + +/** + * Add permissions in a role + * + * @method addPermissionsInRole + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var params = { id :'ROLE_ID'}; + * var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]}; + * + * management.addPermissionsInRole(params, data, function (err, permissions) { + * console.log(permissions); + * }); + * + * @param {String} params.id ID of the Role. + * @param {Object} data permissions data + * @param {String} data.permissions Array of permissions + * @param {String} data.permissions.permission_name Name of a permission + * @param {String} data.permissions.resource_server_identifier Identifier for a resource + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'addPermissionsInRole', 'roles.addPermissions'); + +/** + * Remove permissions from a role + * + * @method removePermissionsFromRole + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var params = { id :'ROLE_ID'}; + * var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]}; + * + * management.removePermissionsFromRole(params, data, function (err, permissions) { + * console.log(permissions); + * }); + * + * @param {String} params.id ID of the Role. + * @param {Object} data permissions data + * @param {String} data.permissions Array of permissions + * @param {String} data.permissions.permission_name Name of a permission + * @param {String} data.permissions.resource_server_identifier Identifier for a resource + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'removePermissionsFromRole', 'roles.removePermissions'); + +/** + * Get users in a given role + * + * @method getUsersInRole + * @memberOf module:management.ManagementClient.prototype + * + * @example + * var params = { id :'ROLE_ID'}; + * @example <caption> + * This method takes a roleId and + * returns all users within that role + * + * </caption> + * + * management.getUsersInRole(params, function (err, users) { + * console.log(users); + * }); + * + * @param {String} [roleId] Id of the role + * @param {Function} [cb] Callback function. + * + * @return {Promise|undefined} + */ +utils.wrapPropertyMethod(ManagementClient, 'getUsersInRole', 'roles.getUsers'); + module.exports = ManagementClient; @@ -2248,7 +2778,7 @@

management/index.js


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-auth.AuthenticationClient.html b/docs/module-auth.AuthenticationClient.html index fb612176b..86d7d5b8a 100644 --- a/docs/module-auth.AuthenticationClient.html +++ b/docs/module-auth.AuthenticationClient.html @@ -24,7 +24,7 @@
@@ -3894,7 +3894,7 @@
Examples

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-auth.DatabaseAuthenticator.html b/docs/module-auth.DatabaseAuthenticator.html index b7b29e7b2..edaf06cc6 100644 --- a/docs/module-auth.DatabaseAuthenticator.html +++ b/docs/module-auth.DatabaseAuthenticator.html @@ -24,7 +24,7 @@
@@ -1590,7 +1590,7 @@
Parameters:
-Stinrg +String @@ -1738,7 +1738,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-auth.OAUthWithIDTokenValidation.html b/docs/module-auth.OAUthWithIDTokenValidation.html index 8697b3777..e9938b53c 100644 --- a/docs/module-auth.OAUthWithIDTokenValidation.html +++ b/docs/module-auth.OAUthWithIDTokenValidation.html @@ -24,7 +24,7 @@
@@ -101,7 +101,7 @@

Source:
@@ -414,7 +414,7 @@
Parameters:

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-auth.OAuthAuthenticator.html b/docs/module-auth.OAuthAuthenticator.html index 1a653544b..53f0c464f 100644 --- a/docs/module-auth.OAuthAuthenticator.html +++ b/docs/module-auth.OAuthAuthenticator.html @@ -24,7 +24,7 @@
@@ -1796,7 +1796,7 @@
Returns:

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-auth.PasswordlessAuthenticator.html b/docs/module-auth.PasswordlessAuthenticator.html index e81cdc6c4..e7917a34b 100644 --- a/docs/module-auth.PasswordlessAuthenticator.html +++ b/docs/module-auth.PasswordlessAuthenticator.html @@ -24,7 +24,7 @@
@@ -1492,7 +1492,7 @@
Examples

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-auth.TokensManager.html b/docs/module-auth.TokensManager.html index 97a1daf27..9cce2d10d 100644 --- a/docs/module-auth.TokensManager.html +++ b/docs/module-auth.TokensManager.html @@ -24,7 +24,7 @@
@@ -352,7 +352,7 @@
Parameters:

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-auth.UsersManager.html b/docs/module-auth.UsersManager.html index 1b625dd20..384968aae 100644 --- a/docs/module-auth.UsersManager.html +++ b/docs/module-auth.UsersManager.html @@ -24,7 +24,7 @@
@@ -1009,7 +1009,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-auth.html b/docs/module-auth.html index 249e89209..fe29f3866 100644 --- a/docs/module-auth.html +++ b/docs/module-auth.html @@ -24,7 +24,7 @@
@@ -108,7 +108,7 @@

Classes


- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.BlacklistedTokensManager.html b/docs/module-management.BlacklistedTokensManager.html index 0451d5674..7a5b7f786 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.ClientGrantsManager.html b/docs/module-management.ClientGrantsManager.html index dee679a9a..c6582dd4c 100644 --- a/docs/module-management.ClientGrantsManager.html +++ b/docs/module-management.ClientGrantsManager.html @@ -24,7 +24,7 @@
@@ -717,1097 +717,14 @@
Example
-

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

- - - - - -
-

Create an Auth0 client grant.

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
data - - -Object - - - - - - - - - - -

The client data object.

- -
cb - - -function - - - - - - <optional>
- - - - - -
-

Callback function.

- -
- - - - - - - - - - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -Promise -| - -undefined - - -
-
- - - -
- - - -
-
Example
- -
management.clientGrants.create(data, function (err) {
-  if (err) {
-    // Handle error.
-  }
-
-  // Client grant created.
-});
- -
- -
- - -
- - - -

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

- - - - - -
-

Delete an Auth0 client grant.

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
params - - -Object - - - - - - - - - - -

Client parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - - -String - - - - -

Client grant ID.

- -
- - -
cb - - -function - - - - - - <optional>
- - - - - -
-

Callback function.

- -
- - - - - - - - - - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -Promise -| - -undefined - - -
-
- - - -
- - - -
-
Example
- -
management.clientGrants.delete({ id: GRANT_ID }, function (err) {
-  if (err) {
-    // Handle error.
-  }
-
-  // Grant deleted.
-});
- -
- -
- - -
- - - -

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

- - - - - -
-

Delete an Auth0 client grant.

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
params - - -Object - - - - - - - - - - -

Client parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - - -String - - - - -

Client grant ID.

- -
- - -
cb - - -function - - - - - - <optional>
- - - - - -
-

Callback function.

- -
- - - - - - - - - - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -Promise -| - -undefined - - -
-
- - - -
- - - -
-
Example
- -
management.clientGrants.delete({ id: GRANT_ID }, function (err) {
-  if (err) {
-    // Handle error.
-  }
-
-  // Grant deleted.
-});
- -
- -
- - -
- - - -

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

- - - - - -
-

Get all Auth0 Client Grants.

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

Client Grants 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.getClientGrants(params, function (err, grants) {
-  console.log(grants.length);
-});
- -
- -
- - -
- - - -

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

+

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

-

Get all Auth0 Client Grants.

+

Delete an Auth0 client grant.

@@ -1843,7 +760,7 @@

getAllSource:
@@ -1904,8 +821,6 @@
Parameters:
- <optional>
- @@ -1916,7 +831,7 @@
Parameters:
-

Client Grants parameters.

+

Client parameters.

@@ -1930,8 +845,6 @@
Parameters:
Type - Attributes - @@ -1944,70 +857,24 @@
Parameters:
- per_page - - - - - -Number - - - - - - - - - <optional>
- - - - - - - - - - - -

Number of results per page.

- - - - - - - - - page + id -Number +String - - - <optional>
- - - - - - - -

Page number, zero indexed.

+

Client grant ID.

@@ -2102,21 +969,12 @@
Returns:
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.clientGrants.delete({ id: GRANT_ID }, function (err) {
+  if (err) {
+    // Handle error.
+  }
 
-management.clientGrants.getAll(params, function (err, grants) {
-  console.log(grants.length);
+  // Grant deleted.
 });
@@ -2128,14 +986,14 @@
Example
-

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

+

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

-

Update an Auth0 client grant.

+

Get all Auth0 Client Grants.

@@ -2171,7 +1029,7 @@

updateSource:
@@ -2232,6 +1090,8 @@
Parameters:
+ <optional>
+ @@ -2242,7 +1102,7 @@
Parameters:
-

Client parameters.

+

Client Grants parameters.

@@ -2256,6 +1116,8 @@
Parameters:
Type + Attributes + @@ -2268,32 +1130,34 @@
Parameters:
- id + per_page -String +Number + + + <optional>
+ - + - -

Client grant ID.

- - + + - - - + + +

Number of results per page.

@@ -2302,13 +1166,13 @@
Parameters:
- data + page -Object +Number @@ -2317,6 +1181,8 @@
Parameters:
+ <optional>
+ @@ -2327,7 +1193,15 @@
Parameters:
-

Updated client data.

+

Page number, zero indexed.

+ + + + + + + + @@ -2414,19 +1288,21 @@
Returns:
Example
-
var data = {
-  client_id: CLIENT_ID,
-  audience: AUDIENCE,
-  scope: []
+        

+ 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
 };
-var params = { id: CLIENT_GRANT_ID };
 
-management.clientGrants.update(params, data, function (err, grant) {
-  if (err) {
-    // Handle error.
-  }
 
-  console.log(grant.id);
+management.clientGrants.getAll(params, function (err, grants) {
+  console.log(grants.length);
 });
@@ -2760,7 +1636,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.ClientsManager.html b/docs/module-management.ClientsManager.html index 02612947b..e6e53026f 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.ConnectionsManager.html b/docs/module-management.ConnectionsManager.html index 7ebfbcc77..49b038240 100644 --- a/docs/module-management.ConnectionsManager.html +++ b/docs/module-management.ConnectionsManager.html @@ -24,7 +24,7 @@
@@ -1899,7 +1899,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.CustomDomainsManager.html b/docs/module-management.CustomDomainsManager.html index 6c4def656..cd019aa11 100644 --- a/docs/module-management.CustomDomainsManager.html +++ b/docs/module-management.CustomDomainsManager.html @@ -24,7 +24,7 @@
@@ -792,224 +792,6 @@
Example
-
- - - -

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

- - - - - -
-

Create an Auth0 Custom Domain.

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
data - - -Object - - - - - - - - - - -

The custom domain data object.

- -
cb - - -function - - - - - - <optional>
- - - - - -
-

Callback function.

- -
- - - - - - - - - - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -Promise -| - -undefined - - -
-
- - - -
- - - -
-
Example
- -
management.createCustomDomain(data, function (err) {
-  if (err) {
-    // Handle error.
-  }
-
-  // CustomDomain created.
-});
- -
- -
- -
@@ -1057,7 +839,7 @@

deleteSource:
@@ -1266,7 +1048,7 @@
Returns:
Example
-
management.deleteCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err) {
+    
management.customDomains.delete({ id: CUSTOM_DOMAIN_ID }, function (err) {
   if (err) {
     // Handle error.
   }
@@ -1283,14 +1065,14 @@ 
Example
-

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

+

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

-

Delete a Custom Domain.

+

Get a Custom Domain.

@@ -1326,7 +1108,7 @@

deleteSource:
@@ -1535,12 +1317,12 @@
Returns:
Example
-
management.customDomains.delete({ id: CUSTOM_DOMAIN_ID }, function (err) {
+    
management.customDomains.get({ id: CUSTOM_DOMAIN_ID }, function (err, customDomain) {
   if (err) {
     // Handle error.
   }
 
-  // CustomDomain deleted.
+  console.log(customDomain);
 });
@@ -1552,14 +1334,14 @@
Example
-

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

+

getAll() → {Promise|undefined}

-

Get a Custom Domain.

+

Get all Auth0 CustomDomains.

@@ -1595,7 +1377,7 @@

getSource:
@@ -1614,925 +1396,6 @@

get - - - - Name - - - Type - - - Attributes - - - - - Description - - - - - - - - - params - - - - - -Object - - - - - - - - - - - - - - - - - - -

Custom Domain parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - - -String - - - - -

Custom Domain ID.

- -
- - - - - - - - - - cb - - - - - -function - - - - - - - - - <optional>
- - - - - - - - - - - -

Callback function.

- - - - - - - - - - - - - - - - - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -Promise -| - -undefined - - -
-
- - - -
- - - -
-
Example
- -
management.getCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err, customDomain) {
-  if (err) {
-    // Handle error.
-  }
-
-  console.log(customDomain);
-});
- -
- -

- - -
- - - -

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

- - - - - -
-

Get a Custom Domain.

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
params - - -Object - - - - - - - - - - -

Custom Domain parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - - -String - - - - -

Custom Domain ID.

- -
- - -
cb - - -function - - - - - - <optional>
- - - - - -
-

Callback function.

- -
- - - - - - - - - - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -Promise -| - -undefined - - -
-
- - - -
- - - -
-
Example
- -
management.customDomains.get({ id: CUSTOM_DOMAIN_ID }, function (err, customDomain) {
-  if (err) {
-    // Handle error.
-  }
-
-  console.log(customDomain);
-});
- -
- -
- - -
- - - -

getAll() → {Promise|undefined}

- - - - - -
-

Get all Auth0 CustomDomains.

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -Promise -| - -undefined - - -
-
- - - -
- - - -
-
Example
- -
management.getCustomDomains(function (err, customDomains) {
-  console.log(customDomains.length);
-});
- -
- -
- - -
- - - -

getAll() → {Promise|undefined}

- - - - - -
-

Get all Auth0 CustomDomains.

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -Promise -| - -undefined - - -
-
- - - -
- - - -
-
Example
- -
management.customDomains.getAll(function (err, customDomains) {
-  console.log(customDomains.length);
-});
- -
- -
- - -
- - - -

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

- - - - - -
-

Verify a Custom Domain.

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
params - - -Object - - - - - - - - - - -

Custom Domain parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - - -String - - - - -

Custom Domain ID.

- -
- - -
cb - - -function - - - - - - <optional>
- - - - - -
-

Callback function.

- -
- - @@ -2574,12 +1437,8 @@
Returns:
Example
-
management.verifyCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err, customDomain) {
-  if (err) {
-    // Handle error.
-  }
-
-  console.log(customDomain);
+    
management.customDomains.getAll(function (err, customDomains) {
+  console.log(customDomains.length);
 });
@@ -2872,7 +1731,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.DeviceCredentialsManager.html b/docs/module-management.DeviceCredentialsManager.html index 01d6666b7..cf109bcaf 100644 --- a/docs/module-management.DeviceCredentialsManager.html +++ b/docs/module-management.DeviceCredentialsManager.html @@ -24,7 +24,7 @@
@@ -1179,7 +1179,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.EmailProviderManager.html b/docs/module-management.EmailProviderManager.html index 52441ed0a..2ddc399ed 100644 --- a/docs/module-management.EmailProviderManager.html +++ b/docs/module-management.EmailProviderManager.html @@ -24,7 +24,7 @@
@@ -759,7 +759,7 @@

deleteSource:
@@ -900,7 +900,7 @@
Example
-

get(cbopt) → {Promise|undefined}

+

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

@@ -1022,6 +1022,141 @@
Parameters:
+ + + + params + + + + + +Object + + + + + + + + + <optional>
+ + + + + + + + + + + +

Clients parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
fields + + +Number + + + + + + <optional>
+ + + + + +
+

A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve: name, enabled, settings fields.

+ +
include_fields + + +Number + + + + + + <optional>
+ + + + + +
+

true if the fields specified are to be excluded from the result, false otherwise (defaults to true)

+ +
+ + + + + + @@ -1123,7 +1258,7 @@

updateSource:
@@ -1345,7 +1480,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.EmailTemplatesManager.html b/docs/module-management.EmailTemplatesManager.html index 2495916b4..ade45bd25 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.GrantsManager.html b/docs/module-management.GrantsManager.html new file mode 100644 index 000000000..99216617b --- /dev/null +++ b/docs/module-management.GrantsManager.html @@ -0,0 +1,1524 @@ + + + + + + GrantsManager - Documentation + + + + + + + + + + + + + + + + + +
+ +

GrantsManager

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

+ management. + + GrantsManager +

+ +

GrantsManager +Auth0 Grants Manager.

+

See Grants

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

Constructor

+ + +

new GrantsManager(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 consuming the +Auth0 Grants endpoint.

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

(inner) clientOptions :Object

+ + + + +
+

Options object for the Rest Client instance.

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

Methods

+ + + +
+ + + +

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

+ + + + + +
+

Delete an Auth0 grant.

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

Grant parameters.

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

Grant ID.

+ +
user_id + + +String + + + + +

The user_id of the grants to delete.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params = {
+   id: 'GRANT_ID',
+   user_id: 'USER_ID'
+};
+
+management.deleteGrant(params, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Grant deleted.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Delete an Auth0 grant.

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

Grant parameters.

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

Grant ID.

+ +
user_id + + +String + + + + +

The user_id of the grants to delete.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params = {
+   id: GRANT_ID,
+   user_id: USER_ID
+};
+
+management.deleteGrant(params, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Grant deleted.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get all Auth0 Grants.

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

Grants parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
per_page + + +Number + + + + +

Number of results per page.

+ +
page + + +Number + + + + +

Page number, zero indexed.

+ +
include_totals + + +Boolean + + + + +

true if a query summary must be included in the result, false otherwise. Default false;

+ +
user_id + + +String + + + + +

The user_id of the grants to retrieve.

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

The client_id of the grants to retrieve.

+ +
audience + + +String + + + + +

The audience of the grants to retrieve.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params = {
+  per_page: 10,
+  page: 0,
+  include_totals: true,
+  user_id: 'USER_ID',
+  client_id: 'CLIENT_ID',
+  audience: 'AUDIENCE'
+};
+
+management.getGrants(params, function (err, grants) {
+  console.log(grants.length);
+});
+ +
+ +
+ + + + + + +
+ +
+ + + + +
+ +
+ +
+ Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme. +
+ + + + + \ No newline at end of file diff --git a/docs/module-management.GuardianManager.html b/docs/module-management.GuardianManager.html index eff768fda..d6bd3438b 100644 --- a/docs/module-management.GuardianManager.html +++ b/docs/module-management.GuardianManager.html @@ -24,7 +24,7 @@
@@ -894,186 +894,6 @@
Example
-
- - - -

createGuardianEnrollmentTicket(cbopt) → {Promise|undefined}

- - - - - -
-

Create a Guardian enrollment ticket.

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
cb - - -function - - - - - - <optional>
- - - - - -
-

Callback function.

- -
- - - - - - - - - - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -Promise -| - -undefined - - -
-
- - - -
- - - -
-
Example
- -
management.createGuardianEnrollmentTicket(function (err, ticket) {
-  console.log(ticket);
-});
- -
- -
- -
@@ -1620,7 +1440,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.JobsManager.html b/docs/module-management.JobsManager.html index a17cf8ff0..c2adbe428 100644 --- a/docs/module-management.JobsManager.html +++ b/docs/module-management.JobsManager.html @@ -24,7 +24,7 @@
@@ -391,6 +391,81 @@

(inner) + + + +
Type:
+ + + + + + +

+ + + +
+

(inner, constant) usersExportsRestClient :external:RestClient

+ + + + +
+

Provides an abstraction layer for consuming the +Create job to export users endpoint

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + +
@@ -419,6 +494,420 @@

Methods

+
+ + + +

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

+ + + + + +
+

Export all users to a file using a long running job.

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

Users export data.

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

The connection id of the connection from which users will be exported

+ +
format + + +String + + + + + + <optional>
+ + + + + +
+

The format of the file. Valid values are: "json" and "csv".

+ +
limit + + +Number + + + + + + <optional>
+ + + + + +
+

Limit the number of records.

+ +
fields + + +Array.<Object> + + + + + + <optional>
+ + + + + +
+

A list of fields to be included in the CSV. If omitted, a set of predefined fields will be exported.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var data = {
+  connection_id: 'con_0000000000000001',
+  format: 'csv',
+  limit: 5,
+  fields: [
+    {
+      "name": "user_id"
+    },
+    {
+      "name": "name"
+    },
+    {
+      "name": "email"
+    },
+    {
+      "name": "identities[0].connection",
+      "export_as": "provider"
+    },
+    {
+      "name": "user_metadata.some_field"
+    }
+  ]
+}
+
+management.jobs.exportUsers(data, function (err, results) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Retrieved job.
+  console.log(results);
+});
+ +
+ +
+ +
@@ -466,7 +955,7 @@

getSource:
@@ -742,7 +1231,7 @@

importUser
Source:
@@ -1062,7 +1551,7 @@

Example
send_completion_email: false //optional }; -management.jobs.get(params, function (err) { +management.jobs.importUsers(params, function (err) { if (err) { // Handle error. } @@ -1120,7 +1609,7 @@

verifyEmai
Source:
@@ -1360,7 +1849,7 @@

Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.LogsManager.html b/docs/module-management.LogsManager.html index a476b9d52..c15ce93bc 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.ManagementClient.html b/docs/module-management.ManagementClient.html index bc804d928..f65be0741 100644 --- a/docs/module-management.ManagementClient.html +++ b/docs/module-management.ManagementClient.html @@ -24,7 +24,7 @@
@@ -106,7 +106,7 @@

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

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

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

clientsSource:
@@ -948,7 +948,7 @@

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

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

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

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

emailTe
Source:
@@ -1275,6 +1275,81 @@

Type:
+

+ + + +
+

grants :GrantsManager

+ + + + +
+

Simple abstraction for performing CRUD operations on the grants +endpoint.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
Type:
+
    +
  • + +GrantsManager + + +
  • +
+ + + + +
@@ -1323,7 +1398,7 @@

guardianSource:
@@ -1397,7 +1472,7 @@

jobsSource:
@@ -1471,7 +1546,7 @@

logsSource:
@@ -1546,7 +1621,7 @@

resour
Source:
@@ -1573,6 +1648,81 @@

Type:
+

+ + + +
+

roles :RolesManager

+ + + + +
+

Simple abstraction for performing CRUD operations on the +roles endpoint.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + +
Type:
+
    +
  • + +RolesManager + + +
  • +
+ + + + +
@@ -1621,7 +1771,7 @@

rulesSource:
@@ -1695,7 +1845,7 @@

rulesConf
Source:
@@ -1769,7 +1919,7 @@

statsSource:
@@ -1843,7 +1993,7 @@

tenantSource:
@@ -1917,7 +2067,7 @@

ticketsSource:
@@ -1992,7 +2142,7 @@

usersSource:
@@ -2033,14 +2183,14 @@

Methods

-

blacklistToken(token, cbopt) → {Promise|undefined}

+

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

-

Blacklist a new token.

+

Add permissions in a role

@@ -2076,7 +2226,7 @@

blackli
Source:
@@ -2122,7 +2272,41 @@

Parameters:
- token + params.id + + + + + +String + + + + + + + + + + + + + + + + + + +

ID of the Role.

+ + + + + + + + + data @@ -2147,7 +2331,7 @@
Parameters:
-

Token data.

+

permissions data

@@ -2173,7 +2357,7 @@
Parameters:
- aud + permissions @@ -2190,7 +2374,50 @@
Parameters:
-

Audience (your app client ID).

+

Array of permissions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2199,7 +2426,7 @@
Parameters:
- + + + + + +
NameTypeDescription
permission_name + + +String + + + + +

Name of a permission

jtiresource_server_identifier @@ -2216,7 +2443,15 @@
Parameters:
-

The JWT ID claim.

+

Identifier for a resource

+ +
+ @@ -2311,17 +2546,11 @@
Returns:
Example
-
var token = {
- aud: 'aud',
- jti: 'jti'
-};
-
-management.blacklistToken(token, function (err) {
-  if (err) {
-    // Handle error.
-  }
+    
var params = { id :'ROLE_ID'};
+var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
 
-  // Token blacklisted.
+management.addPermissionsInRole(params, data, function (err, permissions) {
+  console.log(permissions);
 });
@@ -2333,14 +2562,14 @@
Example
-

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

+

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

-

Configure the email provider.

+

Asign permissions to a user

@@ -2376,7 +2605,7 @@

Source:
@@ -2422,7 +2651,7 @@

Parameters:
- data + params @@ -2447,43 +2676,50 @@
Parameters:
-

The email provider data object.

+

params object

- - - - + - - - cb + + + + + + + + + + + + + + + + + + + + + + + - - @@ -2492,129 +2728,42 @@
Parameters:
NameTypeDescription
id -function +String - - <optional>
- - - - - -
-

Callback function.

+

user_id

- - - - - - - - - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -Promise -| - -undefined - - -
-
- + + + -
- - - -
-
Example
- -
management.configureEmailProvider(data, function (err) {
-  if (err) {
-    // Handle error.
-  }
-
-  // Email provider configured.
-});
- -
-

- + + + data -
- - - -

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

- - - - - -
-

Create an Auth0 client.

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- + + + +String + + + + + + + + + + -
Parameters:
- + +

data object containing list of permissions

+ + @@ -2626,8 +2775,6 @@
Parameters:
- - @@ -2640,32 +2787,32 @@
Parameters:
- + - - + + - + + +
TypeAttributes
datapermissions -Object +String - - + + +

Array of permission IDs

-
- -

The client data object.

@@ -2752,12 +2899,15 @@
Returns:
Example
-
management.createClient(data, function (err) {
+    
var parms =  { id : 'USER_ID'};
+var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+
+management.assignPermissionsToUser(params, data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Client created.
+  // User assigned permissions.
 });
@@ -2769,14 +2919,14 @@
Example
-

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

+

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

-

Create a new connection.

+

Asign roles to a user

@@ -2812,7 +2962,7 @@

creat
Source:
@@ -2858,7 +3008,7 @@

Parameters:
- data + params @@ -2883,43 +3033,50 @@
Parameters:
-

Connection data object.

+

params object

- - + + + + + + + + + + + + + + + + + + + - + - - @@ -2928,6 +3085,136 @@
Parameters:
NameTypeDescription
cbid -function +String - - <optional>
- - - - - -
-

Callback function.

+

user_id

+ + + + + + + + + data + + + + + +String + + + + + + + + + + + + + + + + + + +

data object containing list of role IDs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
roles + + +String + + + + +

Array of role IDs

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

Callback function.

+ + + + + + + + + @@ -2940,7 +3227,6 @@
Parameters:
-
Returns:
@@ -2970,12 +3256,15 @@
Returns:
Example
-
management.createConnection(data, function (err) {
+    
var parms =  { id : 'USER_ID'};
+var data = { "roles" :["role1"]};
+
+management.assignRolestoUser(params, data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Conection created.
+  // User assigned roles.
 });
@@ -2987,14 +3276,14 @@
Example
-

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

+

blacklistToken(token, cbopt) → {Promise|undefined}

-

Create an Auth0 credential.

+

Blacklist a new token.

@@ -3030,7 +3319,7 @@

Source:
@@ -3076,7 +3365,7 @@

Parameters:
- data + token @@ -3101,7 +3390,84 @@
Parameters:
-

The device credential data object.

+

Token data.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
aud + + +String + + + + +

Audience (your app client ID).

+ +
jti + + +String + + + + +

The JWT ID claim.

+ +
+ @@ -3188,12 +3554,17 @@
Returns:
Example
-
management.createConnection(data, function (err) {
+    
var token = {
+ aud: 'aud',
+ jti: 'jti'
+};
+
+management.blacklistToken(token, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Credential created.
+  // Token blacklisted.
 });
@@ -3205,14 +3576,14 @@
Example
-

createEmailVerificationTicket(cbopt) → {Promise}

+

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

-

Create an email verification ticket.

+

Configure the email provider.

@@ -3248,7 +3619,7 @@

Source:
@@ -3292,6 +3663,40 @@
Parameters:
+ + + data + + + + + +Object + + + + + + + + + + + + + + + + + + +

The email provider data object.

+ + + + + + cb @@ -3355,6 +3760,9 @@
Returns:
Promise +| + +undefined
@@ -3369,15 +3777,12 @@
Returns:
Example
-
var data = {
-  user_id: '{USER_ID}',
-  result_url: '{REDIRECT_URL}' // Optional redirect after the ticket is used.
-};
-
-auth0.createEmailVerificationTicket(data, function (err) {
+    
management.configureEmailProvider(data, function (err) {
   if (err) {
     // Handle error.
   }
+
+  // Email provider configured.
 });
@@ -3389,14 +3794,14 @@
Example
-

createPasswordChangeTicket(cbopt) → {Promise}

+

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

-

Create a new password change ticket.

+

Create an Auth0 client.

@@ -3432,7 +3837,7 @@

Source:
@@ -3476,6 +3881,40 @@
Parameters:
+ + + data + + + + + +Object + + + + + + + + + + + + + + + + + + +

The client data object.

+ + + + + + cb @@ -3539,6 +3978,9 @@
Returns:
Promise +| + +undefined
@@ -3553,17 +3995,12 @@
Returns:
Example
-
var params = {
-  result_url: '{REDIRECT_URL}',  // Redirect after using the ticket.
-  user_id: '{USER_ID}',  // Optional.
-  email: '{USER_EMAIL}',  // Optional.
-  new_password: '{PASSWORD}'
-};
-
-auth0.createPasswordChangeTicket(params, function (err) {
+    
management.createClient(data, function (err) {
   if (err) {
     // Handle error.
   }
+
+  // Client created.
 });
@@ -3575,14 +4012,14 @@
Example
-

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

+

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

-

Create a new resource server.

+

Create an Auth0 client grant.

@@ -3618,7 +4055,7 @@

c
Source:
@@ -3689,7 +4126,7 @@

Parameters:
-

Resource Server data object.

+

The client data object.

@@ -3776,12 +4213,12 @@
Returns:
Example
-
management.createResourceServer(data, function (err) {
+    
management.clientGrants.create(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Resource Server created.
+  // Client grant created.
 });
@@ -3793,14 +4230,14 @@
Example
-

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

+

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

-

Create a new rule.

+

Create a new connection.

@@ -3836,7 +4273,7 @@

createRule<
Source:
@@ -3907,7 +4344,7 @@

Parameters:
-

Rule data object.

+

Connection data object.

@@ -3994,12 +4431,12 @@
Returns:
Example
-
management.createRule(data, function (err) {
+    
management.createConnection(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Rule created.
+  // Conection created.
 });
@@ -4011,14 +4448,14 @@
Example
-

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

+

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

-

Create a new user.

+

Create an Auth0 Custom Domain.

@@ -4054,7 +4491,7 @@

createUser<
Source:
@@ -4125,7 +4562,7 @@

Parameters:
-

User data.

+

The custom domain data object.

@@ -4212,12 +4649,12 @@
Returns:
Example
-
management.createUser(data, function (err) {
+    
management.createCustomDomain(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // User created.
+  // CustomDomain created.
 });
@@ -4229,14 +4666,14 @@
Example
-

deleteAllUsers(cbopt) → {Promise|undefined}

+

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

-

Delete all users.

+

Create an Auth0 credential.

@@ -4260,8 +4697,6 @@

deleteA -
Deprecated:
  • This method will be removed in the next major release.
- @@ -4274,7 +4709,7 @@

deleteA
Source:
@@ -4318,6 +4753,40 @@

Parameters:
+ + + data + + + + + +Object + + + + + + + + + + + + + + + + + + +

The device credential data object.

+ + + + + + cb @@ -4347,7 +4816,7 @@
Parameters:
-

Callback function

+

Callback function.

@@ -4398,12 +4867,12 @@
Returns:
Example
-
management.deleteAllUsers(function (err) {
+    
management.createConnection(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Users deleted
+  // Credential created.
 });
@@ -4415,14 +4884,14 @@
Example
-

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

+

createEmailVerificationTicket(cbopt) → {Promise}

-

Delete an Auth0 client.

+

Create an email verification ticket.

@@ -4458,7 +4927,7 @@

deleteCli
Source:
@@ -4502,91 +4971,6 @@

Parameters:
- - - params - - - - - -Object - - - - - - - - - - - - - - - - - - -

Client parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
client_id - - -String - - - - -

Application client ID.

- -
- - - - - - - cb @@ -4650,9 +5034,6 @@
Returns:
Promise -| - -undefined
@@ -4667,12 +5048,15 @@
Returns:
Example
-
management.deleteClient({ client_id: CLIENT_ID }, function (err) {
+    
var data = {
+  user_id: '{USER_ID}',
+  result_url: '{REDIRECT_URL}' // Optional redirect after the ticket is used.
+};
+
+auth0.createEmailVerificationTicket(data, function (err) {
   if (err) {
     // Handle error.
   }
-
-  // Client deleted.
 });
@@ -4684,14 +5068,14 @@
Example
-

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

+

createGuardianEnrollmentTicket(cbopt) → {Promise|undefined}

-

Delete an existing connection.

+

Create a Guardian enrollment ticket.

@@ -4727,7 +5111,7 @@

delet
Source:
@@ -4773,13 +5157,13 @@

Parameters:
- params + cb -Object +function @@ -4788,6 +5172,8 @@
Parameters:
+ <optional>
+ @@ -4798,62 +5184,155 @@
Parameters:
-

Connection parameters.

+

Callback function.

- + + - - - - - - + + +
Name
- Type - - - Description - - - - - - - id - - - - -String - - - + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.createGuardianEnrollmentTicket(function (err, ticket) {
+  console.log(ticket);
+});
+ +
+ +

+ +
- -

Connection ID.

- - - + + +

createPasswordChangeTicket(cbopt) → {Promise}

- - - - - + +
+

Create a new password change ticket.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + @@ -4919,9 +5398,6 @@
Returns:
Promise -| - -undefined
@@ -4936,12 +5412,17 @@
Returns:
Example
-
management.deleteConnection({ id: CONNECTION_ID }, function (err) {
+    
var params = {
+  result_url: '{REDIRECT_URL}',  // Redirect after using the ticket.
+  user_id: '{USER_ID}',  // Optional.
+  email: '{USER_EMAIL}',  // Optional.
+  new_password: '{PASSWORD}'
+};
+
+auth0.createPasswordChangeTicket(params, function (err) {
   if (err) {
     // Handle error.
   }
-
-  // Conection deleted.
 });
@@ -4953,14 +5434,14 @@
Example
-

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

+

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

-

Delete an Auth0 device credential.

+

Create a new resource server.

@@ -4996,7 +5477,7 @@

Source:
@@ -5042,7 +5523,7 @@

Parameters:
- + @@ -5205,14 +5635,12 @@
Returns:
Example
-
var params = { id: CREDENTIAL_ID };
-
-management.deleteDeviceCredential(params, function (err) {
+    
management.createResourceServer(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Credential deleted.
+  // Resource Server created.
 });
@@ -5224,14 +5652,14 @@
Example
-

deleteEmailProvider(cbopt) → {Promise|undefined}

+

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

-

Delete email provider.

+

Create a new role.

@@ -5267,7 +5695,7 @@

de
Source:
@@ -5311,6 +5739,40 @@

Parameters:
+ + + + + + + + + + + + + + + + + + @@ -5391,12 +5853,13 @@
Returns:
Example
-
management.deleteEmailProvider(function (err) {
+    
data = {"name": "test1","description": "123"}
+management.createRole(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Email provider deleted.
+  // Role created.
 });
@@ -5408,14 +5871,14 @@
Example
-

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

+

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

-

Delete a user's Guardian enrollment.

+

Create a new rule.

@@ -5451,7 +5914,7 @@

Source:
@@ -5522,58 +5985,7 @@
Parameters:

@@ -5660,12 +6072,12 @@
Returns:
Example
-
management.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err) {
+    
management.createRule(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Email provider deleted.
+  // Rule created.
 });
@@ -5677,14 +6089,14 @@
Example
-

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

+

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

-

Delete an existing resource server.

+

Create a new user.

@@ -5720,7 +6132,7 @@

d
Source:
@@ -5766,7 +6178,7 @@

Parameters:
- + @@ -5929,12 +6290,12 @@
Returns:
Example
-
management.deleteResourceServer({ id: RESOURCE_SERVER_ID }, function (err) {
+    
management.createUser(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Resource Server deleted.
+  // User created.
 });
@@ -5946,14 +6307,14 @@
Example
-

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

+

deleteAllUsers(cbopt) → {Promise|undefined}

-

Delete an existing rule.

+

Delete all users.

@@ -5977,6 +6338,8 @@

deleteRule< +
Deprecated:
  • This method will be removed in the next major release.
+ @@ -5989,7 +6352,7 @@

deleteRule<
Source:
@@ -6033,91 +6396,6 @@

Parameters:
- - - - - - - - - - - - - - - - - - @@ -6147,7 +6425,7 @@
Parameters:
@@ -6198,12 +6476,12 @@
Returns:
Example
-
auth0.deleteRule({ id: RULE_ID }, function (err) {
+    
management.deleteAllUsers(function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Rule deleted.
+  // Users deleted
 });
@@ -6215,14 +6493,14 @@
Example
-

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

+

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

-

Delete rules config.

+

Delete an Auth0 client.

@@ -6258,7 +6536,7 @@

dele
Source:
@@ -6329,7 +6607,7 @@

Parameters:
- + @@ -6467,12 +6745,12 @@
Returns:
Example
-
management.deleteRulesConfig({ key: RULE_CONFIG_KEY }, function (err) {
+    
management.deleteClient({ client_id: CLIENT_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Rules Config deleted.
+  // Client deleted.
 });
@@ -6484,14 +6762,14 @@
Example
-

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

+

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

-

Delete a user by its id.

+

Delete an Auth0 client grant.

@@ -6527,7 +6805,7 @@

deleteUser<
Source:
@@ -6598,7 +6876,7 @@

Parameters:
@@ -6685,7 +6963,7 @@
Parameters:
@@ -6736,12 +7014,12 @@
Returns:
Example
-
management.deleteUser({ id: USER_ID }, function (err) {
+    
management.clientGrants.delete({ id: GRANT_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // User deleted.
+  // Grant deleted.
 });
@@ -6753,14 +7031,14 @@
Example
-

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

+

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

-

Delete a multifactor provider for a user.

+

Delete an existing connection.

@@ -6796,7 +7074,7 @@

Source:
@@ -6867,7 +7145,7 @@

Parameters:
+ + + + +
NameTypeAttributesDescription
paramsdata @@ -5067,58 +5548,7 @@
Parameters:
-

Credential parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - - -String - - - - -

Device credential ID.

- -
- +

Resource Server data object.

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

Role data object.

+ +
cb -

The Guardian enrollment data object.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - - -String - - - - -

The Guardian enrollment id.

- -
- +

Rule data object.

paramsdata @@ -5791,58 +6203,7 @@
Parameters:
-

Resource Server parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - - -String - - - - -

Resource Server ID.

- -
- +

User data.

params - - -Object - - - - - - - - - - -

Rule parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - - -String - - - - -

Rule ID.

- -
- - -
cb -

Callback function.

+

Callback function

-

Rule Configs parameters.

+

Client parameters.

@@ -6355,7 +6633,7 @@
Parameters:
keyclient_id @@ -6372,7 +6650,7 @@
Parameters:
-

Rule Configs key.

+

Application client ID.

-

The user data object..

+

Client parameters.

@@ -6641,7 +6919,7 @@
Parameters:
-

The user id.

+

Client grant ID.

-

Callback function

+

Callback function.

-

Data object.

+

Connection parameters.

@@ -6910,7 +7188,15 @@
Parameters:
-

The user id.

+

Connection ID.

+ +
+ @@ -6919,47 +7205,13 @@
Parameters:
- provider + cb -String - - - - - - - - - - -

Multifactor provider.

- - - - - - - - - - - - - - - - - cb - - - - - -function +function @@ -6980,7 +7232,7 @@
Parameters:
-

Callback function

+

Callback function.

@@ -7031,14 +7283,12 @@
Returns:
Example
-
var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
-
-management.deleteUserMultifactor(params, function (err, user) {
+    
management.deleteConnection({ id: CONNECTION_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Users accounts unlinked.
+  // Conection deleted.
 });
@@ -7050,14 +7300,14 @@
Example
-

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

+

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

-

Delete a multifactor provider for a user.

+

Delete a Custom Domain.

@@ -7081,10 +7331,6 @@

-
Deprecated:
  • The function name has a typo. -We're shipping this so it doesn't break compatibility. -Use deleteUserMultifactor instead.
- @@ -7097,7 +7343,7 @@

Source:
@@ -7168,7 +7414,7 @@

Parameters:
-

Data object.

+

Custom Domain parameters.

@@ -7211,33 +7457,7 @@
Parameters:
-

The user id.

- - - - - - - - - provider - - - - - -String - - - - - - - - - - -

Multifactor provider.

+

Custom Domain ID.

@@ -7281,7 +7501,7 @@
Parameters:
-

Callback function

+

Callback function.

@@ -7332,14 +7552,12 @@
Returns:
Example
-
var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
-
-management.deleteUserMultifcator(params, function (err, user) {
+    
management.deleteCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Users accounts unlinked.
+  // CustomDomain deleted.
 });
@@ -7351,14 +7569,14 @@
Example
-

getActiveUsersCount(cbopt) → {Promise|undefined}

+

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

-

Get a the active users count.

+

Delete an Auth0 device credential.

@@ -7394,7 +7612,7 @@

ge
Source:
@@ -7438,6 +7656,91 @@

Parameters:
+ + + params + + + + + +Object + + + + + + + + + + + + + + + + + + +

Credential parameters.

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

Device credential ID.

+ +
+ + + + + + + cb @@ -7518,12 +7821,14 @@
Returns:
Example
-
management.getActiveUsersCount(function (err, usersCount) {
+    
var params = { id: CREDENTIAL_ID };
+
+management.deleteDeviceCredential(params, function (err) {
   if (err) {
     // Handle error.
   }
 
-  console.log(usersCount);
+  // Credential deleted.
 });
@@ -7535,14 +7840,14 @@
Example
-

getBlacklistedTokens(cbopt) → {Promise|undefined}

+

deleteEmailProvider(cbopt) → {Promise|undefined}

-

Get all blacklisted tokens.

+

Delete email provider.

@@ -7578,7 +7883,7 @@

g
Source:
@@ -7702,8 +8007,12 @@

Returns:
Example
-
management.getBlacklistedTokens(function (err, tokens) {
-  console.log(tokens.length);
+    
management.deleteEmailProvider(function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Email provider deleted.
 });
@@ -7715,14 +8024,14 @@
Example
-

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

+

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

-

Get an Auth0 client.

+

Delete a user's Guardian enrollment.

@@ -7758,7 +8067,7 @@

getClientSource:
@@ -7804,7 +8113,7 @@
Parameters:
- params + data @@ -7829,7 +8138,7 @@
Parameters:
-

Client parameters.

+

The Guardian enrollment data object.

@@ -7855,7 +8164,7 @@
Parameters:
- client_id + id @@ -7872,7 +8181,7 @@
Parameters:
-

Application client ID.

+

The Guardian enrollment id.

@@ -7967,12 +8276,12 @@
Returns:
Example
-
management.getClient({ client_id: CLIENT_ID }, function (err, client) {
+    
management.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  console.log(client);
+  // Email provider deleted.
 });
@@ -7984,14 +8293,14 @@
Example
-

getClientInfo() → {Object}

+

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

-

Return an object with information about the current client,

+

Delete an existing resource server.

@@ -8027,23 +8336,7635 @@

getClien
Source:
- + + + + + + + + + + + + + +

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

Resource Server parameters.

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

Resource Server ID.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.deleteResourceServer({ id: RESOURCE_SERVER_ID }, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Resource Server deleted.
+});
+ +
+ +

+ + +
+ + + +

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

+ + + + + +
+

Delete an existing role.

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

Role parameters.

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

Role ID.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.deleteRole({ id: ROLE_ID }, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Role deleted.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Delete an existing rule.

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

Rule parameters.

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

Rule ID.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
auth0.deleteRule({ id: RULE_ID }, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Rule deleted.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Delete rules config.

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

Rule Configs parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
key + + +String + + + + +

Rule Configs key.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.deleteRulesConfig({ key: RULE_CONFIG_KEY }, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Rules Config deleted.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Delete a user by its id.

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

The user data object..

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

The user id.

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

Callback function

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.deleteUser({ id: USER_ID }, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // User deleted.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Delete a multifactor provider for a user.

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

Data object.

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

The user id.

+ +
provider + + +String + + + + +

Multifactor provider.

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

Callback function

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
+
+management.deleteUserMultifactor(params, function (err, user) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Users accounts unlinked.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Delete a multifactor provider for a user.

+
+ + + + + +
+ + + + + + + + + + + + + + + + +
Deprecated:
  • The function name has a typo. +We're shipping this so it doesn't break compatibility. +Use deleteUserMultifactor instead.
+ + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
params + + +Object + + + + + + + + + + +

Data object.

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

The user id.

+ +
provider + + +String + + + + +

Multifactor provider.

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

Callback function

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
+
+management.deleteUserMultifcator(params, function (err, user) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Users accounts unlinked.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Export all users to a file using a long running job.

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

Users export data.

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

The connection id of the connection from which users will be exported

+ +
format + + +String + + + + + + <optional>
+ + + + + +
+

The format of the file. Valid values are: "json" and "csv".

+ +
limit + + +Number + + + + + + <optional>
+ + + + + +
+

Limit the number of records.

+ +
fields + + +Array.<Object> + + + + + + <optional>
+ + + + + +
+

A list of fields to be included in the CSV. If omitted, a set of predefined fields will be exported.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var data = {
+  connection_id: 'con_0000000000000001',
+  format: 'csv',
+  limit: 5,
+  fields: [
+    {
+      "name": "user_id"
+    },
+    {
+      "name": "name"
+    },
+    {
+      "name": "email"
+    },
+    {
+      "name": "identities[0].connection",
+      "export_as": "provider"
+    },
+    {
+      "name": "user_metadata.some_field"
+    }
+  ]
+}
+
+management.exportUsers(data, function (err, results) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Retrieved job.
+  console.log(results);
+});
+ +
+ +
+ + +
+ + + +

getActiveUsersCount(cbopt) → {Promise|undefined}

+ + + + + +
+

Get a the active users count.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.getActiveUsersCount(function (err, usersCount) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(usersCount);
+});
+ +
+ +
+ + +
+ + + +

getBlacklistedTokens(cbopt) → {Promise|undefined}

+ + + + + +
+

Get all blacklisted tokens.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.getBlacklistedTokens(function (err, tokens) {
+  console.log(tokens.length);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get an Auth0 client.

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

Client parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
client_id + + +String + + + + +

Application client ID.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.getClient({ client_id: CLIENT_ID }, function (err, client) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(client);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get all Auth0 Client Grants.

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

Client Grants 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.getClientGrants(params, function (err, grants) {
+  console.log(grants.length);
+});
+ +
+ +
+ + +
+ + + +

getClientInfo() → {Object}

+ + + + + +
+

Return an object with information about the current client,

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Object + + +
+
+ + +
+

Object containing client information.

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

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

+ + + + + +
+

Get all Auth0 clients.

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

Clients 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.getClients(params, function (err, clients) {
+  console.log(clients.length);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get an Auth0 connection.

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

Connection parameters.

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

Connection ID.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.getConnection({ id: CONNECTION_ID }, function (err, connection) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(connection);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get all connections.

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

Connections params.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.getConnections(params, function (err, connections) {
+  console.log(connections.length);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get a Custom Domain.

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

Custom Domain parameters.

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

Custom Domain ID.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.getCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err, customDomain) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(customDomain);
+});
+ +
+ +
+ + +
+ + + +

getCustomDomains() → {Promise|undefined}

+ + + + + +
+

Get all Auth0 CustomDomains.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.getCustomDomains(function (err, customDomains) {
+  console.log(customDomains.length);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get the daily stats.

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

Stats parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
from + + +String + + + + +

The first day in YYYYMMDD format.

+ +
to + + +String + + + + +

The last day in YYYYMMDD format.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params = {
+  from: '{YYYYMMDD}',  // First day included in the stats.
+  to: '{YYYYMMDD}'  // Last day included in the stats.
+};
+
+management.getDaily(params, function (err, stats) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(stats);
+});
+ +
+ +
+ + +
+ + + +

getDeviceCredentials(cbopt) → {Promise|undefined}

+ + + + + +
+

Get all Auth0 credentials.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.getDeviceCredentials(function (err, credentials) {
+  console.log(credentials.length);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get the email provider.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
cb + + +function + + + + + + <optional>
+ + + + + +
+

Callback function.

+ +
params + + +Object + + + + + + <optional>
+ + + + + +
+

Clients parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
fields + + +Number + + + + + + <optional>
+ + + + + +
+

A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve: name, enabled, settings fields.

+ +
include_fields + + +Number + + + + + + <optional>
+ + + + + +
+

true if the fields specified are to be excluded from the result, false otherwise (defaults to true)

+ +
+ + +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.getEmailProvider(function (err, provider) {
+  console.log(provider.length);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get all Auth0 Grants.

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

Grants parameters.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
per_page + + +Number + + + + +

Number of results per page.

+ +
page + + +Number + + + + +

Page number, zero indexed.

+ +
include_totals + + +Boolean + + + + +

true if a query summary must be included in the result, false otherwise. Default false;

+ +
user_id + + +String + + + + +

The user_id of the grants to retrieve.

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

The client_id of the grants to retrieve.

+ +
audience + + +String + + + + +

The audience of the grants to retrieve.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params = {
+  per_page: 10,
+  page: 0,
+  include_totals: true,
+  user_id: USER_ID,
+  client_id: CLIENT_ID,
+  audience: AUDIENCE
+};
+
+management.getGrants(params, function (err, grants) {
+  console.log(grants.length);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get a single Guardian enrollment.

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

The Guardian enrollment data object.

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

The Guardian enrollment id.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
+  console.log(enrollment);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get a list of a user's Guardian enrollments.

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
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.getGuardianEnrollments({ id: USER_ID }, function (err, enrollments) {
+  console.log(enrollments);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get a job by its ID.

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

Job parameters.

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

Job ID.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params = {
+  id: '{JOB_ID}'
+};
+
+management.getJob(params, function (err, job) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Retrieved job.
+  console.log(job);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get an Auth0 log.

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

Log parameters.

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

Event ID.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.getLog({ id: EVENT_ID }, function (err, log) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(log);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get all logs.

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

Logs params.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeAttributesDescription
q + + +String + + + + + + <optional>
+ + + + + +
+

Search Criteria using Query String Syntax

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

Page number. Zero based

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

The amount of entries per page

+ +
sort + + +String + + + + + + <optional>
+ + + + + +
+

The field to use for sorting.

+ +
fields + + +String + + + + + + <optional>
+ + + + + +
+

A comma separated list of fields to include or exclude

+ +
include_fields + + +Boolean + + + + + + <optional>
+ + + + + +
+

true if the fields specified are to be included in the result, false otherwise.

+ +
include_totals + + +Boolean + + + + + + <optional>
+ + + + + +
+

true if a query summary must be included in the result, false otherwise. Default false

+ +
+ + +
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 and the search query. 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: 2
+};
+
+management.getLogs(params, function (err, logs) {
+  console.log(logs.length);
+});
+ +
+ +
+ + +
+ + + +

getPermissionsInRole(roleIdopt, cbopt) → {Promise|undefined}

+ + + + + +
+

Get permissions for a given role

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

Id of the role

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

Callback function.

+ +
@@ -8069,22 +15990,38 @@
Returns:
-Object +Promise +| + +undefined
-
-

Object containing client information.

-
-
+
+
Examples
+ +
var params =  { id :'ROLE_ID'};
+ +

+ This method takes a roleId and + returns all permissions within that role + +

+ +
management.getPermissionsInRole(params, function (err, permissions) {
+  console.log(permissions);
+});
+ +
+
@@ -8092,14 +16029,14 @@
Returns:
-

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

+

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

-

Get all Auth0 clients.

+

Get a Resource Server.

@@ -8135,7 +16072,7 @@

getClients<
Source:
@@ -8196,8 +16133,6 @@

Parameters:
- <optional>
- @@ -8208,7 +16143,7 @@
Parameters:
-

Clients parameters.

+

Resource Server parameters.

@@ -8222,8 +16157,6 @@
Parameters:
Type - Attributes - @@ -8236,70 +16169,24 @@
Parameters:
- per_page - - - - - -Number - - - - - - - - - <optional>
- - - - - - - - - - - -

Number of results per page.

- - - - - - - - - page + id -Number +String - - - <optional>
- - - - - - - -

Page number, zero indexed.

+

Resource Server ID.

@@ -8394,20 +16281,12 @@
Returns:
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.getResourceServer({ id: RESOURCE_SERVER_ID }, function (err, resourceServer) {
+  if (err) {
+    // Handle error.
+  }
 
-management.getClients(params, function (err, clients) {
-  console.log(clients.length);
+  console.log(resourceServer);
 });
@@ -8419,14 +16298,14 @@
Example
-

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

+

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

-

Get an Auth0 connection.

+

Get all resource servers.

@@ -8462,7 +16341,7 @@

getConne
Source:
@@ -8523,6 +16402,8 @@

Parameters:
+ <optional>
+ @@ -8533,7 +16414,7 @@
Parameters:
-

Connection parameters.

+

Resource Servers parameters.

@@ -8547,6 +16428,8 @@
Parameters:
Type + Attributes + @@ -8559,24 +16442,70 @@
Parameters:
- id + per_page -String +Number + + + <optional>
+ + + + + + + -

Connection ID.

+

Number of results per page.

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

Page number, zero indexed.

@@ -8671,12 +16600,20 @@
Returns:
Example
-
management.getConnection({ id: CONNECTION_ID }, function (err, connection) {
-  if (err) {
-    // Handle error.
-  }
+        

+ 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
+};
 
-  console.log(connection);
+management.getResourceServers(params, function (err, resourceServers) {
+  console.log(resourceServers.length);
 });
@@ -8688,14 +16625,14 @@
Example
-

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

+

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

-

Get all connections.

+

Get an Auth0 role.

@@ -8731,7 +16668,7 @@

getConn
Source:
@@ -8792,8 +16729,6 @@

Parameters:
- <optional>
- @@ -8804,7 +16739,7 @@
Parameters:
-

Connections params.

+

Role parameters.

@@ -8818,8 +16753,6 @@
Parameters:
Type - Attributes - @@ -8832,70 +16765,24 @@
Parameters:
- per_page - - - - - -Number - - - - - - - - - <optional>
- - - - - - - - - - - -

Number of results per page.

- - - - - - - - - page + id -Number +String - - - <optional>
- - - - - - - -

Page number, zero indexed.

+

Role ID.

@@ -8990,20 +16877,12 @@
Returns:
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.getRole({ id: ROLE_ID }, function (err, role) {
+  if (err) {
+    // Handle error.
+  }
 
-management.getConnections(params, function (err, connections) {
-  console.log(connections.length);
+  console.log(role);
 });
@@ -9015,14 +16894,14 @@
Example
-

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

+

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

-

Get the daily stats.

+

Get all roles.

@@ -9058,7 +16937,7 @@

getDaily
Source:
@@ -9119,6 +16998,8 @@

Parameters:
+ <optional>
+ @@ -9129,7 +17010,7 @@
Parameters:
-

Stats parameters.

+

Roles parameters.

@@ -9143,6 +17024,8 @@
Parameters:
Type + Attributes + @@ -9155,24 +17038,34 @@
Parameters:
- from + per_page -String +Number + + + <optional>
+ + + + + + + -

The first day in YYYYMMDD format.

+

Number of results per page.

@@ -9181,24 +17074,34 @@
Parameters:
- to + page -String +Number + + + <optional>
+ + + + + + + -

The last day in YYYYMMDD format.

+

Page number, zero indexed.

@@ -9293,17 +17196,20 @@
Returns:
Example
-
var params = {
-  from: '{YYYYMMDD}',  // First day included in the stats.
-  to: '{YYYYMMDD}'  // Last day included in the stats.
+        

+ 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.getDaily(params, function (err, stats) {
-  if (err) {
-    // Handle error.
-  }
-
-  console.log(stats);
+management.getRoles(params, function (err, roles) {
+  console.log(roles.length);
 });
@@ -9315,14 +17221,14 @@
Example
-

getDeviceCredentials(cbopt) → {Promise|undefined}

+

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

-

Get all Auth0 credentials.

+

Get an Auth0 rule.

@@ -9358,7 +17264,7 @@

g
Source:
@@ -9404,13 +17310,13 @@

Parameters:
- cb + params -function +Object @@ -9419,8 +17325,6 @@
Parameters:
- <optional>
- @@ -9431,155 +17335,62 @@
Parameters:
-

Callback function.

+

Rule parameters.

- - - - - - - - - - - - - - - - - - - - -
-
Returns:
+ + + + - -
-
- Type: -
-
+
-Promise -| - -undefined - - - - - - - - + - -
-
Example
- -
management.getDeviceCredentials(function (err, credentials) {
-  console.log(credentials.length);
-});
- -
- - - -
- - - -

getEmailProvider(cbopt) → {Promise|undefined}

- - - - - -
-

Get the email provider.

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - + - +
+ + + - - + + + + + + + + + -
Parameters:
+ +
NameTypeDescription
id + + +String + + +

Rule ID.

+ +
- - - - - - - - - - - - - - - - - - + + + - @@ -9662,8 +17473,12 @@
Returns:
Example
-
management.getEmailProvider(function (err, provider) {
-  console.log(provider.length);
+    
management.getRule({ id: RULE_ID }, function (err, rule) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(rule);
 });
@@ -9675,14 +17490,14 @@
Example
-

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

+

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

-

Get a single Guardian enrollment.

+

Get all rules.

@@ -9718,7 +17533,7 @@

Source:
@@ -9764,7 +17579,7 @@

Parameters:
- + + + @@ -9815,24 +17634,70 @@
Parameters:
- + + + + + + + + + + + + + + + + + + + + + @@ -9927,8 +17792,20 @@
Returns:
Example
-
management.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
-  console.log(enrollment);
+        

+ 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.getRules(params, function (err, rules) {
+  console.log(rules.length);
 });
@@ -9940,14 +17817,14 @@
Example
-

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

+

getRulesConfigs() → {Promise|undefined}

-

Get a list of a user's Guardian enrollments.

+

Get rules config.

@@ -9983,7 +17860,7 @@

Source:
@@ -10002,114 +17879,149 @@

Parameters:

- -
NameTypeAttributesDescription
dataparams @@ -9779,6 +17594,8 @@
Parameters:
+ <optional>
+ @@ -9789,7 +17606,7 @@
Parameters:
-

The Guardian enrollment data object.

+

Rules parameters.

@@ -9803,6 +17620,8 @@
Parameters:
TypeAttributes
idper_page -String +Number + + <optional>
+ + + + + +
-

The Guardian enrollment id.

+

Number of results per page.

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

Page number, zero indexed.

- - - - - - - - + + + + + + + + + +
+
Returns:
+ +
+
+ Type: +
+
+Promise +| + +undefined + + +
+
-
- - - + - - - - - +
management.getRulesConfigs(function (err, rulesConfigs) {
+  if (err) {
+    // Handle error.
+  }
 
-            
-                
+ + +
- + -
- + + + + @@ -10192,8 +18104,12 @@
Returns:
Example
-
management.getGuardianEnrollments({ id: USER_ID }, function (err, enrollments) {
-  console.log(enrollments);
+    
management.getSettings(function (err, settings) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(settings);
 });
@@ -10205,14 +18121,14 @@
Example
-

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

+

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

-

Get a job by its ID.

+

Get a user by its id.

@@ -10248,7 +18164,7 @@

getJobSource:
@@ -10294,7 +18210,7 @@
Parameters:

- + @@ -10457,17 +18373,8 @@
Returns:
Example
-
var params = {
-  id: '{JOB_ID}'
-};
-
-management.getJob(params, function (err, job) {
-  if (err) {
-    // Handle error.
-  }
-
-  // Retrieved job.
-  console.log(job);
+    
management.getUser({ id: USER_ID }, function (err, user) {
+  console.log(user);
 });
@@ -10479,14 +18386,14 @@
Example
-

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

+

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

-

Get an Auth0 log.

+

Get user's log events.

@@ -10522,7 +18429,7 @@

getLogSource:
@@ -10593,7 +18500,7 @@
Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10731,12 +18742,14 @@
Returns:
Example
-
management.getLog({ id: EVENT_ID }, function (err, log) {
+    
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
+
+management.getUserLogs(params, function (err, logs) {
   if (err) {
     // Handle error.
   }
 
-  console.log(log);
+  console.log(logs);
 });
@@ -10748,14 +18761,14 @@
Example
-

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

+

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

-

Get all logs.

+

Get user's permissions

@@ -10791,7 +18804,7 @@

getLogsSource:
@@ -10826,115 +18839,24 @@
Parameters:

- - - - - - - - - - - - - - - - - - - - - - - @@ -15807,14 +24164,19 @@
Returns:
Example
-
var params = { id: USER_ID, provider: 'auht0', user_id: OTHER_USER_ID };
+    
var data = {
+  client_id: CLIENT_ID,
+  audience: AUDIENCE,
+  scope: []
+};
+var params = { id: CLIENT_GRANT_ID };
 
-management.unlinkUsers(params, function (err, user) {
+management.clientGrants.update(params, data, function (err, grant) {
   if (err) {
     // Handle error.
   }
 
-  // Users accounts unlinked.
+  console.log(grant.id);
 });
@@ -15826,14 +24188,14 @@
Example
-

updateAppMetadata(params, metadata, cbopt) → {Promise|undefined}

+

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

-

Update the app metadata for a user.

+

Update an existing connection.

@@ -15869,7 +24231,7 @@

upda
Source:
@@ -15940,7 +24302,7 @@

Parameters:
@@ -16000,7 +24362,7 @@
Parameters:
- + @@ -16061,7 +24423,7 @@
Parameters:
@@ -16112,18 +24474,15 @@
Returns:
Example
-
var params = { id: USER_ID };
-var metadata = {
-  foo: 'bar'
-};
+    
var data = { name: 'newConnectionName' };
+var params = { id: CONNECTION_ID };
 
-management.updateAppMetadata(params, metadata, function (err, user) {
+management.updateConnection(params, data, function (err, connection) {
   if (err) {
     // Handle error.
   }
 
-  // Updated user.
-  console.log(user);
+  console.log(connection.name);  // 'newConnectionName'
 });
@@ -16135,14 +24494,14 @@
Example
-

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

+

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

-

Update an Auth0 client.

+

Update the email provider.

@@ -16178,7 +24537,7 @@

updateCli
Source:
@@ -16249,58 +24608,7 @@

Parameters:
@@ -16334,7 +24642,7 @@
Parameters:
@@ -16421,15 +24729,13 @@
Returns:
Example
-
var data = { name: 'newClientName' };
-var params = { client_id: CLIENT_ID };
-
-management.updateClient(params, data, function (err, client) {
+    
management.updateEmailProvider(params, data, function (err, provider) {
   if (err) {
     // Handle error.
   }
 
-  console.log(client.name);  // 'newClientName'
+  // Updated email provider.
+  console.log(provider);
 });
@@ -16441,14 +24747,14 @@
Example
-

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

+

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

-

Update an existing connection.

+

Update an existing resource server.

@@ -16484,7 +24790,7 @@

updat
Source:
@@ -16555,7 +24861,7 @@

Parameters:
@@ -16640,7 +24946,7 @@
Parameters:
@@ -16727,15 +25033,15 @@
Returns:
Example
-
var data = { name: 'newConnectionName' };
-var params = { id: CONNECTION_ID };
+    
var data = { name: 'newResourceServerName' };
+var params = { id: RESOURCE_SERVER_ID };
 
-management.updateConnection(params, data, function (err, connection) {
+management.updateResourceServer(params, data, function (err, resourceServer) {
   if (err) {
     // Handle error.
   }
 
-  console.log(connection.name);  // 'newConnectionName'
+  console.log(resourceServer.name);  // 'newResourceServerName'
 });
@@ -16747,14 +25053,14 @@
Example
-

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

+

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

-

Update the email provider.

+

Update an existing role.

@@ -16790,7 +25096,7 @@

up
Source:
@@ -16861,7 +25167,58 @@

Parameters:
@@ -16895,7 +25252,7 @@
Parameters:
@@ -16982,13 +25339,14 @@
Returns:
Example
-
management.updateEmailProvider(params, data, function (err, provider) {
+    
var params = { id: ROLE_ID };
+var data = { name: 'my-role'};
+management.updateRole(params, data, function (err, role) {
   if (err) {
     // Handle error.
   }
 
-  // Updated email provider.
-  console.log(provider);
+  console.log(role.name); // 'my-role'.
 });
@@ -17000,14 +25358,14 @@
Example
-

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

+

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

-

Update an existing resource server.

+

Update an existing rule.

@@ -17043,7 +25401,7 @@

u
Source:
@@ -17114,7 +25472,7 @@

Parameters:
@@ -17199,7 +25557,7 @@
Parameters:
@@ -17286,15 +25644,14 @@
Returns:
Example
-
var data = { name: 'newResourceServerName' };
-var params = { id: RESOURCE_SERVER_ID };
-
-management.updateResourceServer(params, data, function (err, resourceServer) {
+    
var params = { id: RULE_ID };
+var data = { name: 'my-rule'};
+management.updateRule(params, data, function (err, rule) {
   if (err) {
     // Handle error.
   }
 
-  console.log(resourceServer.name);  // 'newResourceServerName'
+  console.log(rule.name); // 'my-rule'.
 });
@@ -17306,14 +25663,14 @@
Example
-

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

+

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

-

Update an existing rule.

+

Update the tenant settings.

@@ -17349,7 +25706,7 @@

updateRule<
Source:
@@ -17393,91 +25750,6 @@

Parameters:
- - - - - - - - - - - - - - - - - - @@ -17505,7 +25777,7 @@
Parameters:
@@ -17592,14 +25864,10 @@
Returns:
Example
-
var params = { id: RULE_ID };
-var data = { name: 'my-rule'};
-management.updateRule(params, data, function (err, rule) {
+    
management.updateTenantSettings(data, function (err) {
   if (err) {
     // Handle error.
   }
-
-  console.log(rule.name); // 'my-rule'.
 });
@@ -17611,14 +25879,14 @@
Example
-

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

+

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

-

Update the tenant settings.

+

Update a user by its id.

@@ -17654,7 +25922,7 @@

u
Source:
@@ -17698,6 +25966,91 @@

Parameters:
+ + + + + + + + + + + + + + + + + + @@ -17725,7 +26078,7 @@
Parameters:
@@ -17761,7 +26114,7 @@
Parameters:
@@ -17812,10 +26165,15 @@
Returns:
Example
-
management.updateTenantSettings(data, function (err) {
+    
var params = { id: USER_ID };
+
+management.updateUser(params, data, function (err, user) {
   if (err) {
     // Handle error.
   }
+
+  // Updated user.
+  console.log(user);
 });
@@ -17827,14 +26185,14 @@
Example
-

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

+

updateUserMetadata(params, metadata, cbopt) → {Promise|undefined}

-

Update a user by its id.

+

Update the user metadata for a user.

@@ -17870,7 +26228,7 @@

updateUser<
Source:
@@ -17941,7 +26299,7 @@

Parameters:
- + @@ -18114,8 +26472,11 @@
Returns:
Example
var params = { id: USER_ID };
+var metadata = {
+  address: '123th Node.js Street'
+};
 
-management.updateUser(params, data, function (err, user) {
+management.updateUserMetadata(params, metadata, function (err, user) {
   if (err) {
     // Handle error.
   }
@@ -18133,14 +26494,14 @@ 
Example
-

updateUserMetadata(params, metadata, cbopt) → {Promise|undefined}

+

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

-

Update the user metadata for a user.

+

Verify a Custom Domain.

@@ -18176,7 +26537,7 @@

upd
Source:
@@ -18247,7 +26608,7 @@

Parameters:
@@ -18305,40 +26666,6 @@
Parameters:
-
- - - - - - - - - - - - - - - - - @@ -18368,7 +26695,7 @@
Parameters:
@@ -18419,18 +26746,12 @@
Returns:
Example
-
var params = { id: USER_ID };
-var metadata = {
-  address: '123th Node.js Street'
-};
-
-management.updateUserMetadata(params, metadata, function (err, user) {
+    
management.verifyCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err, customDomain) {
   if (err) {
     // Handle error.
   }
 
-  // Updated user.
-  console.log(user);
+  console.log(customDomain);
 });
@@ -18454,7 +26775,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.ManagementTokenProvider.html b/docs/module-management.ManagementTokenProvider.html index 98a360c74..82e343e91 100644 --- a/docs/module-management.ManagementTokenProvider.html +++ b/docs/module-management.ManagementTokenProvider.html @@ -24,7 +24,7 @@
@@ -633,7 +633,7 @@
Returns:

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.ResourceServersManager.html b/docs/module-management.ResourceServersManager.html index 0c021904e..7b3909213 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.RetryRestClient.html b/docs/module-management.RetryRestClient.html index 482cb0539..6064aa6ff 100644 --- a/docs/module-management.RetryRestClient.html +++ b/docs/module-management.RetryRestClient.html @@ -24,7 +24,7 @@
@@ -377,7 +377,7 @@
Parameters:

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.RolesManager.html b/docs/module-management.RolesManager.html new file mode 100644 index 000000000..a5a59af78 --- /dev/null +++ b/docs/module-management.RolesManager.html @@ -0,0 +1,4226 @@ + + + + + + RolesManager - Documentation + + + + + + + + + + + + + + + + + +
+ +

RolesManager

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

+ management. + + RolesManager +

+ +

RolesManager +The role class provides a simple abstraction for performing CRUD operations +on Auth0 RolesManager.

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

Constructor

+ + +

new RolesManager(options)

+ + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ + +
NameTypeAttributesDescription
data - - -Object +
+
Example
- -
- + // Get Rules Configs. +}); - + - - -

The user data object.

- - +

getTenantSettings(cbopt) → {Promise|undefined}

- - - - - - + - - - +
+

Get the tenant settings..

+
- - - - + + + +
+ -
- - - + - + - + - + - - + + + + + + + + + + + +
Source:
+
+ + + + + + + + + + + + + + + + + +
Parameters:
+ + +
NameTypeDescription
id - - -String + + - - -

The user id.

- -
+ + + + + + + + + + + - - -
NameTypeAttributes
+ - -
Description
paramsdata @@ -10319,7 +18235,7 @@
Parameters:
-

Job parameters.

+

The user data object.

@@ -10362,7 +18278,7 @@
Parameters:
-

Job ID.

+

The user id.

-

Log parameters.

+

Get logs data.

@@ -10636,7 +18543,111 @@
Parameters:
-

Event ID.

+

User id.

+ +
per_page + + +Number + + + + +

Number of results per page.

+ +
page + + +Number + + + + +

Page number, zero indexed.

+ +
sort + + +String + + + + +

The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1.

+ +
include_totals + + +Boolean + + + + +

true if a query summary must be included in the result, false otherwise. Default false;

AttributesDescription
params - - -Object - - - - - - <optional>
- - - - - -
-

Logs params.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + + + - + - + + +
NameTypeAttributesDescription
q - - -String - - - - - - <optional>
- - - - - -
-

Search Criteria using Query String Syntax

- -
Description
pageparams -Number +Object @@ -10943,8 +18865,6 @@
Parameters:
- <optional>
- @@ -10955,43 +18875,50 @@
Parameters:
-

Page number. Zero based

+

Get permissions data.

-
+ + + + + + + + + + + + + + + + - + - - @@ -11000,34 +18927,24 @@
Parameters:
- + - - @@ -11036,34 +18953,24 @@
Parameters:
- + - - @@ -11072,34 +18979,24 @@
Parameters:
- + - - @@ -11121,21 +19018,11 @@
Parameters:
- - @@ -11230,20 +19117,14 @@
Returns:
Example
-

- This method takes an optional object as first argument that may be used to - specify pagination settings and the search query. 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: 2
-};
+    
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
 
-management.getLogs(params, function (err, logs) {
-  console.log(logs.length);
+management.getUserPermissions(params, function (err, logs) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(logs);
 });
@@ -11255,14 +19136,14 @@
Example
-

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

+

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

-

Get a Resource Server.

+

Get user's roles

@@ -11298,7 +19179,7 @@

getR
Source:
@@ -11362,46 +19243,150 @@

Parameters:
- - + + + + + + +
- - - - - - - - - - - @@ -15695,32 +24052,32 @@
Parameters:
- + + - + + - - -
NameTypeDescription
per_pageid -Number +String - - <optional>
- - - - - -
-

The amount of entries per page

+

User id.

sortper_page -String +Number - - <optional>
- - - - - -
-

The field to use for sorting.

+

Number of results per page.

fieldspage -String +Number - - <optional>
- - - - - -
-

A comma separated list of fields to include or exclude

+

Page number, zero indexed.

include_fieldssort -Boolean +String - - <optional>
- - - - - -
-

true if the fields specified are to be included in the result, false otherwise.

+

The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1.

- - <optional>
- - - - - -
-

true if a query summary must be included in the result, false otherwise. Default false

+

true if a query summary must be included in the result, false otherwise. Default false;

+

Get roles data.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -12101,14 +20297,18 @@
Returns:
-
Example
+
Examples
-
management.getRule({ id: RULE_ID }, function (err, rule) {
-  if (err) {
-    // Handle error.
-  }
+    
var params =  { id :'ROLE_ID'};
- console.log(rule); +

+ This method takes a roleId and + returns all users within that role + +

+ +
management.getUsersInRole(params, function (err, users) {
+  console.log(users);
 });
@@ -12120,14 +20320,15 @@
Example
-

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

+

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

-

Get all rules.

+

Given a path to a file and a connection id, create a new job that imports the +users contained in the file and associate them with the given connection.

@@ -12163,7 +20364,7 @@

getRulesSource:
@@ -12209,7 +20410,7 @@
Parameters:

- + - - @@ -12264,34 +20461,24 @@
Parameters:
- + - - @@ -12300,34 +20487,24 @@
Parameters:
- + - - @@ -12422,20 +20599,15 @@
Returns:
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
+    
var params = {
+  connection_id: '{CONNECTION_ID}',
+  users: '{PATH_TO_USERS_FILE}'
 };
 
-management.getRules(params, function (err, rules) {
-  console.log(rules.length);
+management.get(params, function (err) {
+  if (err) {
+    // Handle error.
+  }
 });
@@ -12447,14 +20619,14 @@
Example
-

getRulesConfigs() → {Promise|undefined}

+

linkUsers(userId, params, cbopt) → {Promise|undefined}

-

Get rules config.

+

Link the user with another account.

@@ -12490,7 +20662,7 @@

getRul
Source:
@@ -12509,149 +20681,174 @@

getRul +

Parameters:
+ - - - - - - - - - - - -
-
Returns:
- +
NameTypeDescription
id + + +String + + + + +

User id.

+ +
per_page + + +Number + + + + +

Number of results per page.

+ +
page + + +Number + + + + +

Page number, zero indexed.

+ +
sort + + +String + + + + -

Resource Server parameters.

+

The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1.

- - - - - - - - - - - - - - - - - - + + - - + @@ -11507,12 +19492,14 @@
Returns:
Example
-
management.getResourceServer({ id: RESOURCE_SERVER_ID }, function (err, resourceServer) {
+    
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
+
+management.getUserRoles(params, function (err, logs) {
   if (err) {
     // Handle error.
   }
 
-  console.log(resourceServer);
+  console.log(logs);
 });
@@ -11524,14 +19511,14 @@
Example
-

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

+

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

-

Get all resource servers.

+

Get all users.

@@ -11567,7 +19554,7 @@

get
Source:
@@ -11640,7 +19627,7 @@

Parameters:
+ + + + + + + + + + + + + + + + + + @@ -11834,12 +19857,13 @@
Example
// Pagination settings.
 var params = {
+  search_engine: 'v3',
   per_page: 10,
   page: 0
 };
 
-management.getResourceServers(params, function (err, resourceServers) {
-  console.log(resourceServers.length);
+auth0.getUsers(params, function (err, users) {
+  console.log(users.length);
 });
@@ -11851,14 +19875,14 @@
Example
-

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

+

getUsersByEmail(emailopt, cbopt) → {Promise|undefined}

-

Get an Auth0 rule.

+

Get users for a given email address

@@ -11894,7 +19918,7 @@

getRuleSource:
@@ -11940,13 +19964,13 @@
Parameters:

- + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
idinclude_totals -String +Boolean @@ -11412,7 +19397,7 @@
Parameters:
-

Resource Server ID.

+

true if a query summary must be included in the result, false otherwise. Default false;

-

Resource Servers parameters.

+

Users params.

@@ -11666,6 +19653,42 @@
Parameters:
search_engine + + +Number + + + + + + <optional>
+ + + + + +
+

The version of the search engine to use.

+ +
per_page
paramsemail -Object +String @@ -11955,6 +19979,8 @@
Parameters:
+ <optional>
+ @@ -11965,9 +19991,175 @@
Parameters:
-

Rule parameters.

+

Email Address of users to locate

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

Callback function.

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

+ This method takes an email address as the first argument, + and returns all users with that email address +

+ +
auth0.getUsersByEmail(email, function (err, users) {
+  console.log(users);
+});
+ +
+ + + + +
+ + + +

getUsersInRole(roleIdopt, cbopt) → {Promise|undefined}

+ + + + + +
+

Get users in a given role

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + +
+ + + + + + + + + +
Parameters:
+ @@ -11979,6 +20171,8 @@
Parameters:
+ + @@ -11991,7 +20185,7 @@
Parameters:
- + + - + + - - -
TypeAttributes
idroleId @@ -12004,19 +20198,21 @@
Parameters:
+ + <optional>
+ - + -
-

Rule ID.

-
+ +
+

Id of the role

paramsdata @@ -12224,8 +20425,6 @@
Parameters:
- <optional>
- @@ -12236,7 +20435,7 @@
Parameters:
-

Rules parameters.

+

Users import data.

@@ -12250,8 +20449,6 @@
Parameters:
TypeAttributes
per_pageconnectionId -Number +String - - <optional>
- - - - - -
-

Number of results per page.

+

Connection for the users insertion.

pageusers -Number +String - - <optional>
- - - - - -
-

Page number, zero indexed.

+

Path to the users data file.

+ + - -
-
- Type: -
-
+
-Promise -| -undefined + + + + - - + + + + + - + + + + + - // Get Rules Configs. -}); + + -
- + -

getTenantSettings(cbopt) → {Promise|undefined}

+
+ + + + + - -
-

Get the tenant settings..

-
+
+ + + - + - + @@ -13571,13 +21772,13 @@
Parameters:
- + - + + +
NameTypeAttributesDescription
userId + + +String -
-
Example
-
management.getRulesConfigs(function (err, rulesConfigs) {
-  if (err) {
-    // Handle error.
-  }
+            
+            
+ - + - - + + +

ID of the primary user.

+ +
params + + +Object + + + + -
+ +
+

Secondary user data.

+ + - + + + + + + - + - + - + - + + + + - + + + + - + - -
Source:
-
- + - + - + + - - + + + + + + + + + -
Parameters:
+ +
NameTypeDescription
user_id + + +String - - + + +

ID of the user to be linked.

+ +
connection_id + + +String + + +

ID of the connection to be used.

+ +
- - - - - - - - - - - - - - - - - - + + + - @@ -12734,12 +20931,18 @@
Returns:
Example
-
management.getSettings(function (err, settings) {
+    
var userId = 'USER_ID';
+var params = {
+  user_id: 'OTHER_USER_ID',
+  connection_id: 'CONNECTION_ID'
+};
+
+management.linkUsers(userId, params, function (err, user) {
   if (err) {
     // Handle error.
   }
 
-  console.log(settings);
+  // Users linked.
 });
@@ -12751,14 +20954,14 @@
Example
-

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

+

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

-

Get a user by its id.

+

Generate new Guardian recovery code.

@@ -12794,7 +20997,7 @@

getUserSource:
@@ -13003,8 +21206,8 @@
Returns:
Example
-
management.getUser({ id: USER_ID }, function (err, user) {
-  console.log(user);
+    
management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
+  console.log(newRecoveryCode);
 });
@@ -13016,14 +21219,14 @@
Example
-

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

+

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

-

Get user's log events.

+

Remove permissions from a role

@@ -13059,7 +21262,7 @@

getUserLog
Source:
@@ -13105,7 +21308,41 @@

Parameters:

- + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - @@ -13372,14 +21582,11 @@
Returns:
Example
-
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-
-management.getUserLogs(params, function (err, logs) {
-  if (err) {
-    // Handle error.
-  }
+    
var params = { id :'ROLE_ID'};
+var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
 
-  console.log(logs);
+management.removePermissionsFromRole(params, data, function (err, permissions) {
+  console.log(permissions);
 });
@@ -13391,14 +21598,14 @@
Example
-

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

+

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

-

Get all users.

+

Remove permissions from a user

@@ -13434,7 +21641,7 @@

getUsersSource:
@@ -13495,8 +21702,6 @@
Parameters:

- - @@ -13535,34 +21738,32 @@
Parameters:
- + - - + + - + + +
NameTypeAttributesDescription
paramsparams.id + + +String + + + + + + + + + + +

ID of the Role.

+ +
data @@ -13130,7 +21367,7 @@
Parameters:
-

Get logs data.

+

permissions data

@@ -13156,7 +21393,7 @@
Parameters:
idpermissions @@ -13173,48 +21410,39 @@
Parameters:
-

User id.

- -
per_page - +

Array of permissions

-Number + + + + + + + - - + - + - + - - + + + + - + @@ -13234,7 +21462,7 @@
Parameters:
- + + +
NameType -

Number of results per page.

- -
Description
pagepermission_name -Number +String @@ -13225,7 +21453,7 @@
Parameters:
-

Page number, zero indexed.

+

Name of a permission

sortresource_server_identifier @@ -13251,33 +21479,15 @@
Parameters:
-

The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1.

+

Identifier for a resource

-
include_totals - - -Boolean - - - - -

true if a query summary must be included in the result, false otherwise. Default false;

- <optional>
- @@ -13507,7 +21712,7 @@
Parameters:
-

Users params.

+

params object

@@ -13521,8 +21726,6 @@
Parameters:
TypeAttributes
search_engineid -Number +String - - <optional>
- - + +
+

user_id

-
-
-

The version of the search engine to use.

per_pagedata -Number +String @@ -13586,8 +21787,6 @@
Parameters:
- <optional>
- @@ -13598,43 +21797,50 @@
Parameters:
-

Number of results per page.

+

data object containing list of permission IDs

-
+ + + + + + + + + + + + + + + + - + - - @@ -13729,21 +21935,15 @@
Returns:
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 = {
-  search_engine: 'v3',
-  per_page: 10,
-  page: 0
-};
+    
var parms =  { id : 'USER_ID'};
+var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
 
-auth0.getUsers(params, function (err, users) {
-  console.log(users.length);
+management.removePermissionsFromUser(params, data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // User assigned permissions.
 });
@@ -13755,14 +21955,14 @@
Example
-

getUsersByEmail(emailopt, cbopt) → {Promise|undefined}

+

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

-

Get users for a given email address

+

Remove roles from a user

@@ -13798,7 +21998,7 @@

getUse
Source:
@@ -13844,13 +22044,13 @@

Parameters:
- + + + + + + + + + + + + + + + + + + + @@ -13958,13 +22292,15 @@
Returns:
Example
-

- This method takes an email address as the first argument, - and returns all users with that email address -

- -
auth0.getUsersByEmail(email, function (err, users) {
-  console.log(users);
+    
var parms =  { id : 'USER_ID'};
+var data = { "roles" :["role1"]};
+
+management.removeRolesFromUser(params, data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // User assigned roles.
 });
@@ -13976,15 +22312,14 @@
Example
-

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

+

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

-

Given a path to a file and a connection id, create a new job that imports the -users contained in the file and associate them with the given connection.

+

Send a verification email to a user.

@@ -14020,7 +22355,7 @@

importUser
Source:
@@ -14091,7 +22426,7 @@

Parameters:
- - - - - - - - - - - - - - - - - + @@ -14256,11 +22565,10 @@
Returns:
Example
var params = {
-  connection_id: '{CONNECTION_ID}',
-  users: '{PATH_TO_USERS_FILE}'
+	user_id: '{USER_ID}'
 };
 
-management.get(params, function (err) {
+management.sendEmailVerification(function (err) {
   if (err) {
     // Handle error.
   }
@@ -14275,14 +22583,14 @@ 
Example
-

linkUsers(userId, params, cbopt) → {Promise|undefined}

+

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

-

Link the user with another account.

+

Set a new rules config.

@@ -14318,7 +22626,7 @@

linkUsersSource:
@@ -14350,8 +22658,59 @@
Parameters:

- - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14398,7 +22757,7 @@
Parameters:
- + - - - - - - - - - - - - - - - - - + @@ -14587,18 +22920,15 @@
Returns:
Example
-
var userId = 'USER_ID';
-var params = {
-  user_id: 'OTHER_USER_ID',
-  connection_id: 'CONNECTION_ID'
-};
+    
var params = { key: RULE_CONFIG_KEY };
+var data =   { value: RULES_CONFIG_VALUE };
 
-management.linkUsers(userId, params, function (err, user) {
+management.setRulesConfig(params, data, function (err, rulesConfig) {
   if (err) {
     // Handle error.
   }
 
-  // Users linked.
+  // Rules Config set.
 });
@@ -14610,14 +22940,14 @@
Example
-

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

+

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

-

Generate new Guardian recovery code.

+

Unlink the given accounts.

@@ -14653,7 +22983,7 @@

Source:
@@ -14699,7 +23029,7 @@

Parameters:
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14862,8 +23244,14 @@
Returns:
Example
-
management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
-  console.log(newRecoveryCode);
+    
var params = { id: USER_ID, provider: 'auht0', user_id: OTHER_USER_ID };
+
+management.unlinkUsers(params, function (err, user) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Users accounts unlinked.
 });
@@ -14875,14 +23263,14 @@
Example
-

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

+

updateAppMetadata(params, metadata, cbopt) → {Promise|undefined}

-

Send a verification email to a user.

+

Update the app metadata for a user.

@@ -14918,7 +23306,7 @@

Source:
@@ -14964,7 +23352,7 @@

Parameters:
- + - + @@ -15047,6 +23435,40 @@
Parameters:
+
+ + + + + + + + + + + + + + + + + @@ -15076,7 +23498,7 @@
Parameters:
@@ -15127,14 +23549,18 @@
Returns:
Example
-
var params = {
-	user_id: '{USER_ID}'
+    
var params = { id: USER_ID };
+var metadata = {
+  foo: 'bar'
 };
 
-management.sendEmailVerification(function (err) {
+management.updateAppMetadata(params, metadata, function (err, user) {
   if (err) {
     // Handle error.
   }
+
+  // Updated user.
+  console.log(user);
 });
@@ -15146,14 +23572,14 @@
Example
-

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

+

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

-

Set a new rules config.

+

Update an Auth0 client.

@@ -15189,7 +23615,7 @@

setRule
Source:
@@ -15260,7 +23686,7 @@

Parameters:
- + @@ -15342,61 +23768,10 @@
Parameters:
- - -
@@ -15483,15 +23858,15 @@
Returns:
Example
-
var params = { key: RULE_CONFIG_KEY };
-var data =   { value: RULES_CONFIG_VALUE };
+    
var data = { name: 'newClientName' };
+var params = { client_id: CLIENT_ID };
 
-management.setRulesConfig(params, data, function (err, rulesConfig) {
+management.updateClient(params, data, function (err, client) {
   if (err) {
     // Handle error.
   }
 
-  // Rules Config set.
+  console.log(client.name);  // 'newClientName'
 });
@@ -15503,14 +23878,14 @@
Example
-

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

+

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

-

Unlink the given accounts.

+

Update an Auth0 client grant.

@@ -15546,7 +23921,7 @@

unlinkUser
Source:
@@ -15617,7 +23992,7 @@

Parameters:
+ +
NameTypeDescription
pagepermissions -Number +String - - <optional>
- - - - - -
-

Page number, zero indexed.

+

Array of permission IDs

emailparams -String +Object @@ -13859,7 +22059,90 @@
Parameters:
- <optional>
+ + + + +
+

params object

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

user_id

+ +
+ + +
data + + +String + + + + @@ -13871,7 +22154,58 @@
Parameters:
-

Email Address of users to locate

+

data object containing list of role IDs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
roles + + +String + + + + +

Array of role IDs

+ +
+
-

Users import data.

+

User data object.

@@ -14117,33 +22452,7 @@
Parameters:
connectionId - - -String - - - - -

Connection for the users insertion.

- -
usersuser_id @@ -14160,7 +22469,7 @@
Parameters:
-

Path to the users data file.

+

ID of the user to be verified.

TypeAttributesAttributesDescription
params + + +Object + + + + + + + + + + +

Rule Config parameters.

+ + + + + + + + + + + + + @@ -14364,7 +22723,7 @@
Parameters:
- + - - + + - + + +
NameType
userIdkey @@ -14377,19 +22736,19 @@
Parameters:
- - + + +

Rule Config key.

-
-
-

ID of the primary user.

paramsdata @@ -14423,7 +22782,7 @@
Parameters:
-

Secondary user data.

+

Rule Config Data parameters.

@@ -14449,33 +22808,7 @@
Parameters:
user_id - - -String - - - - -

ID of the user to be linked.

- -
connection_idvalue @@ -14492,7 +22825,7 @@
Parameters:
-

ID of the connection to be used.

+

Rule Config Data value.

dataparams @@ -14724,7 +23054,7 @@
Parameters:
-

The user data object.

+

Linked users data.

@@ -14767,7 +23097,59 @@
Parameters:
-

The user id.

+

Primary user ID.

+ +
provider + + +String + + + + +

Identity provider in use.

+ +
user_id + + +String + + + + +

Secondary user ID.

dataparams @@ -14989,7 +23377,7 @@
Parameters:
-

User data object.

+

The user data object..

@@ -15015,7 +23403,7 @@
Parameters:
user_idid @@ -15032,7 +23420,7 @@
Parameters:
-

ID of the user to be verified.

+

The user id.

metadata + + +Object + + + + + + + + + + +

New app metadata.

+ +
cb -

Callback function.

+

Callback function

-

Rule Config parameters.

+

Client parameters.

@@ -15286,7 +23712,7 @@
Parameters:
keyclient_id @@ -15303,7 +23729,7 @@
Parameters:
-

Rule Config key.

+

Application client ID.

-

Rule Config Data parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
value - - -String - - - - -

Rule Config Data value.

- -
+ +
+

Updated client data.

-

Linked users data.

+

Client parameters.

@@ -15660,33 +24035,15 @@
Parameters:
-

Primary user ID.

+

Client grant ID.

-
provider - - -String - - - - -

Identity provider in use.

user_iddata -String +Object + - + - -

Secondary user ID.

-
+ +
+

Updated client data.

-

The user data object..

+

Connection parameters.

@@ -15983,7 +24345,7 @@
Parameters:
-

The user id.

+

Connection ID.

metadatadata @@ -16025,7 +24387,7 @@
Parameters:
-

New app metadata.

+

Updated connection data.

-

Callback function

+

Callback function.

-

Client parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
client_id - - -String - - - - -

Application client ID.

- -
- +

Email provider parameters.

-

Updated client data.

+

Updated email provider data.

-

Connection parameters.

+

Resource Server parameters.

@@ -16598,7 +24904,7 @@
Parameters:
-

Connection ID.

+

Resource Server ID.

-

Updated connection data.

+

Updated Resource Server data.

-

Email provider parameters.

+

Role parameters.

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

Role ID.

+ +
+
-

Updated email provider data.

+

Updated role data.

-

Resource Server parameters.

+

Rule parameters.

@@ -17157,7 +25515,7 @@
Parameters:
-

Resource Server ID.

+

Rule ID.

-

Updated Resource Server data.

+

Updated rule data.

params - - -Object - - - - - - - - - - -

Rule parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
id - - -String - - - - -

Rule ID.

- -
- - -
data -

Updated rule data.

+

The new tenant settings.

params + + +Object + + + + + + + + + + +

The user parameters.

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

The user id.

+ +
+ + +
data -

The new tenant settings.

+

New user data.

-

Callback function.

+

Callback function

-

The user parameters.

+

The user data object..

@@ -18001,7 +26359,7 @@
Parameters:
datametadata @@ -18026,7 +26384,7 @@
Parameters:
-

New user data.

+

New user metadata.

-

The user data object..

+

Custom Domain parameters.

@@ -18290,7 +26651,7 @@
Parameters:
-

The user id.

+

Custom Domain ID.

metadata - - -Object - - - - - - - - - - -

New user metadata.

- -
cb -

Callback function

+

Callback function.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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 +Auth0 RolesManagers.

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

(inner) clientOptions :Object

+ + + + +
+

Options object for the Rest Client instance.

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

Methods

+ + + +
+ + + +

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

+ + + + + +
+

Add permissions in a role

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

ID of the Role.

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

permissions data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
permissions + + +String + + + + +

Array of permissions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
permission_name + + +String + + + + +

Name of a permission

+ +
resource_server_identifier + + +String + + + + +

Identifier for a resource

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id :'ROLE_ID'};
+var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+
+management.roles.addPermissions(params, data, function (err, user) {
+  if (err) {
+    // Handle error.
+  }
+
+  // permissions added.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Assign roles to a user

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

params object

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

user_id

+ +
+ + +
data + + +String + + + + + + + + + + +

data object containing list of role IDs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
roles + + +String + + + + +

Array of role IDs

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id : 'USER_ID';
+var data = { "roles" : ["roleId1", "roleID2"]};
+
+management.users.assignRoles(params, data, function (err, user) {
+  if (err) {
+    // Handle error.
+  }
+
+  // roles added.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Assign users to a role

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

ID of the Role.

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

permissions data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
permissions + + +String + + + + +

Array of permissions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
permission_name + + +String + + + + +

Name of a permission

+ +
resource_server_identifier + + +String + + + + +

Identifier for a resource

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id :'ROLE_ID'};
+var data = { "users" : ["userId1","userId2"]};
+
+management.roles.assignUsers(params, data, function (err, user) {
+  if (err) {
+    // Handle error.
+  }
+
+  // permissions added.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Create a new role.

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

Role data object.

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

Callback function.

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

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

+ + + + + +
+

Delete an existing role.

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

Role parameters.

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

Role ID.

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

Callback function.

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

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

+ + + + + +
+

Get an Auth0 role.

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

Role parameters.

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

Role ID.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
management.roles.get({ id: ROLE_ID }, function (err, role) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(role);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get all roles.

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

Roles 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.roles.getAll(params, function (err, roles) {
+  console.log(roles.length);
+});
+ +
+ +
+ + +
+ + + +

getPermissionsInRole(emailopt, cbopt) → {Promise|undefined}

+ + + + + +
+

Get Permissions in a Role

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

Email address of user(s) to find

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

Callback function.

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

+ This method takes a first argument as the roleId and returns the permissions within that role +

+ +
management.roles.getPermissions( {id : 'ROLE_ID'}, function (err, permissions) {
+  console.log(permissions);
+});
+ +
+ +
+ + +
+ + + +

getUsers(emailopt, cbopt) → {Promise|undefined}

+ + + + + +
+

Get Users in a Role

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

Email address of user(s) to find

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

Callback function.

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

+ This method takes a roleId and returns the users with that role assigned +

+ +
management.roles.getUsers( {id : 'ROLE_ID'}, function (err, users) {
+  console.log(users);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Remove permissions from a role

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

ID of the Role.

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

permissions data

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
permissions + + +String + + + + +

Array of permissions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
permission_name + + +String + + + + +

Name of a permission

+ +
resource_server_identifier + + +String + + + + +

Identifier for a resource

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id :'ROLE_ID'};
+var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+
+management.roles.removePermissions(params, data, function (err, user) {
+  if (err) {
+    // Handle error.
+  }
+
+  // permissions added.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Remove roles from a user

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

params object

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

user_id

+ +
+ + +
data + + +String + + + + + + + + + + +

data object containing list of role IDs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
roles + + +String + + + + +

Array of role IDs

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var params =  { id : 'USER_ID';
+var data = { "roles" : ["roleId1", "roleID2"]};
+
+management.users.removeRoles(params, data, function (err, user) {
+  if (err) {
+    // Handle error.
+  }
+
+  // roles removed.
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Update an existing role.

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

Role parameters.

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

Role ID.

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

Updated role data.

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

Callback function.

+ +
+ + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined + + +
+
+ + + +
+ + + +
+
Example
+ +
var data = { name: 'New name' };
+var params = { id: ROLE_ID };
+
+// Using auth0 instance.
+management.updateRole(params, data, function (err, role) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(role.name);  // 'New name'
+});
+
+// Using the roles manager directly.
+management.roles.update(params, data, function (err, role) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(role.name);  // 'New name'
+});
+ +
+ +
+ + + + + + + + +

+ + + + +
+ +
+ +
+ Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme. +
+ + + + + \ No newline at end of file diff --git a/docs/module-management.RulesConfigsManager.html b/docs/module-management.RulesConfigsManager.html index 4a371256c..6c0be5d76 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.RulesManager.html b/docs/module-management.RulesManager.html index c81f2d396..84d895c28 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.StatsManager.html b/docs/module-management.StatsManager.html index d73bbea41..e3d8ffa17 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.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.TenantManager.html b/docs/module-management.TenantManager.html index 527516334..c01a5bcc6 100644 --- a/docs/module-management.TenantManager.html +++ b/docs/module-management.TenantManager.html @@ -24,7 +24,7 @@
@@ -835,7 +835,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.TicketsManager.html b/docs/module-management.TicketsManager.html index 6cc15b131..dd25b20f3 100644 --- a/docs/module-management.TicketsManager.html +++ b/docs/module-management.TicketsManager.html @@ -24,7 +24,7 @@
@@ -805,7 +805,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Nov 12 2018 22:55:39 GMT-0200 (-02) using the Minami theme. + Generated by JSDoc 3.5.5 on Mon Apr 15 2019 10:58:27 GMT-0300 (Brasilia Standard Time) using the Minami theme.
diff --git a/docs/module-management.UsersManager.html b/docs/module-management.UsersManager.html index 4a29c2bcb..8e5cf0a2e 100644 --- a/docs/module-management.UsersManager.html +++ b/docs/module-management.UsersManager.html @@ -24,7 +24,7 @@
@@ -687,6 +687,154 @@

(inn + + + + +
Type:
+ + + + + + +

+ + + +
+

(inner) userPermissionsClient :external:RestClient

+ + + + +
+

Provides an abstraction layer for CRD on permissions directly on a user

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

(inner) userRolesClient :external:RestClient

+ + + + +
+

Provides an abstraction layer for CRD on roles for a user

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + +
@@ -836,7 +984,7 @@

createSource:
@@ -1054,7 +1202,7 @@

deleteSource:
@@ -1325,7 +1473,7 @@

deleteAllSource:
@@ -1509,7 +1657,7 @@

Source:
@@ -1806,7 +1954,7 @@

getSource:
@@ -2071,7 +2219,7 @@

getAllSource:
@@ -2398,7 +2546,7 @@

getByEmail<
Source:
@@ -2619,7 +2767,7 @@

Source:
@@ -2837,6 +2985,536 @@

Example

+
+ + + +

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

+ + + + + +
+

Get a list of permissions 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.getPermissions({ id: USER_ID }, function (err, permissions) {
+  console.log(permissions);
+});
+ +
+ +
+ + +
+ + + +

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

+ + + + + +
+

Get a list of roles 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.getRoles({ id: USER_ID }, function (err, roles) {
+  console.log(roles);
+});
+ +
+ +
+ +
@@ -2884,7 +3562,7 @@