From a6ae6bb40b0ff4663a5f0a62642372d0d86a424b Mon Sep 17 00:00:00 2001 From: Luis Deschamps Rudge Date: Mon, 15 Apr 2019 10:58:27 -0300 Subject: [PATCH] v2.17.0 --- CHANGELOG.md | 9 + docs/RetryRestClient.js.html | 4 +- docs/auth_DatabaseAuthenticator.js.html | 4 +- docs/auth_OAUthWithIDTokenValidation.js.html | 4 +- docs/auth_OAuthAuthenticator.js.html | 4 +- docs/auth_PasswordlessAuthenticator.js.html | 4 +- docs/auth_TokensManager.js.html | 4 +- docs/auth_UsersManager.js.html | 4 +- docs/auth_index.js.html | 4 +- docs/external-RestClient.html | 126 +- docs/index.html | 4 +- docs/index.js.html | 4 +- ...anagement_BlacklistedTokensManager.js.html | 4 +- docs/management_ClientGrantsManager.js.html | 4 +- docs/management_ClientsManager.js.html | 4 +- docs/management_ConnectionsManager.js.html | 4 +- docs/management_CustomDomainsManager.js.html | 4 +- ...anagement_DeviceCredentialsManager.js.html | 4 +- docs/management_EmailProviderManager.js.html | 4 +- docs/management_EmailTemplatesManager.js.html | 4 +- docs/management_GrantsManager.js.html | 4 +- docs/management_GuardianManager.js.html | 4 +- docs/management_JobsManager.js.html | 4 +- docs/management_LogsManager.js.html | 4 +- ...management_ManagementTokenProvider.js.html | 4 +- .../management_ResourceServersManager.js.html | 4 +- docs/management_RolesManager.js.html | 462 + docs/management_RulesConfigsManager.js.html | 4 +- docs/management_RulesManager.js.html | 4 +- docs/management_StatsManager.js.html | 4 +- docs/management_TenantManager.js.html | 4 +- docs/management_TicketsManager.js.html | 4 +- docs/management_UsersManager.js.html | 254 +- docs/management_index.js.html | 409 +- docs/module-auth.AuthenticationClient.html | 4 +- docs/module-auth.DatabaseAuthenticator.html | 4 +- ...odule-auth.OAUthWithIDTokenValidation.html | 4 +- docs/module-auth.OAuthAuthenticator.html | 4 +- ...module-auth.PasswordlessAuthenticator.html | 4 +- docs/module-auth.TokensManager.html | 4 +- docs/module-auth.UsersManager.html | 4 +- docs/module-auth.html | 4 +- ...e-management.BlacklistedTokensManager.html | 4 +- ...module-management.ClientGrantsManager.html | 4 +- docs/module-management.ClientsManager.html | 4 +- .../module-management.ConnectionsManager.html | 4 +- ...odule-management.CustomDomainsManager.html | 4 +- ...e-management.DeviceCredentialsManager.html | 4 +- ...odule-management.EmailProviderManager.html | 4 +- ...dule-management.EmailTemplatesManager.html | 4 +- docs/module-management.GrantsManager.html | 6 +- docs/module-management.GuardianManager.html | 4 +- docs/module-management.JobsManager.html | 4 +- docs/module-management.LogsManager.html | 4 +- docs/module-management.ManagementClient.html | 10440 +++++++++++----- ...le-management.ManagementTokenProvider.html | 4 +- ...ule-management.ResourceServersManager.html | 4 +- docs/module-management.RetryRestClient.html | 4 +- docs/module-management.RolesManager.html | 4226 +++++++ ...module-management.RulesConfigsManager.html | 4 +- docs/module-management.RulesManager.html | 4 +- docs/module-management.StatsManager.html | 4 +- docs/module-management.TenantManager.html | 4 +- docs/module-management.TicketsManager.html | 4 +- docs/module-management.UsersManager.html | 712 +- docs/module-management.html | 7 +- docs/module-utils.html | 4 +- docs/utils.js.html | 4 +- package.json | 2 +- 69 files changed, 13933 insertions(+), 2952 deletions(-) create mode 100644 docs/management_RolesManager.js.html create mode 100644 docs/module-management.RolesManager.html diff --git a/CHANGELOG.md b/CHANGELOG.md index baa634fba..faad18685 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # 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) diff --git a/docs/RetryRestClient.js.html b/docs/RetryRestClient.js.html index 4fc11d1e3..2539ec61e 100644 --- a/docs/RetryRestClient.js.html +++ b/docs/RetryRestClient.js.html @@ -24,7 +24,7 @@
@@ -207,7 +207,7 @@

RetryRestClient.js


- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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_DatabaseAuthenticator.js.html b/docs/auth_DatabaseAuthenticator.js.html index 2f9d5a3a1..bcb4fcd0c 100644 --- a/docs/auth_DatabaseAuthenticator.js.html +++ b/docs/auth_DatabaseAuthenticator.js.html @@ -24,7 +24,7 @@
@@ -345,7 +345,7 @@

auth/DatabaseAuthenticator.js


- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 401e86a61..d6664e141 100644 --- a/docs/auth_OAUthWithIDTokenValidation.js.html +++ b/docs/auth_OAUthWithIDTokenValidation.js.html @@ -24,7 +24,7 @@
@@ -158,7 +158,7 @@

auth/OAUthWithIDTokenValidation.js


- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 d10f1c13a..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 945d78d6c..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 f64d2a0f6..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 c5d7e9da6..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 78496dcab..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 3799198a8..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 833192586..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 de8d6d96f..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 bcff23394..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 4850884f1..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 140924389..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 45945c82d..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 9ae700a03..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 2b1af95ad..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 1f8e53332..01384f0f8 100644 --- a/docs/management_EmailProviderManager.js.html +++ b/docs/management_EmailProviderManager.js.html @@ -24,7 +24,7 @@
@@ -198,7 +198,7 @@

management/EmailProviderManager.js


- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 d16a37ce0..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 index 9696f7d60..ccceff56b 100644 --- a/docs/management_GrantsManager.js.html +++ b/docs/management_GrantsManager.js.html @@ -24,7 +24,7 @@
@@ -170,7 +170,7 @@

management/GrantsManager.js


- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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_GuardianManager.js.html b/docs/management_GuardianManager.js.html index 8b6e44737..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 74929d905..9b1f553c9 100644 --- a/docs/management_JobsManager.js.html +++ b/docs/management_JobsManager.js.html @@ -24,7 +24,7 @@
@@ -354,7 +354,7 @@

management/JobsManager.js


- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 5e3528292..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 81f2d0d5f..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 056216f03..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 4273811b1..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 01d16792a..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 60e18bd43..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 5cc586f03..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 c9072b7c3..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 da1311f7f..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 f4c40428e..4d6da6415 100644 --- a/docs/management_index.js.html +++ b/docs/management_index.js.html @@ -24,7 +24,7 @@
@@ -70,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/'; @@ -320,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); }; /** @@ -1347,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. * @@ -2360,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; @@ -2373,7 +2778,7 @@

management/index.js


- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 cc2c32621..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 90932c634..edaf06cc6 100644 --- a/docs/module-auth.DatabaseAuthenticator.html +++ b/docs/module-auth.DatabaseAuthenticator.html @@ -24,7 +24,7 @@
@@ -1738,7 +1738,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 3649be502..e9938b53c 100644 --- a/docs/module-auth.OAUthWithIDTokenValidation.html +++ b/docs/module-auth.OAUthWithIDTokenValidation.html @@ -24,7 +24,7 @@
@@ -414,7 +414,7 @@
Parameters:

- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 993a84683..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 a3a317708..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 3f2e224de..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 9f54e8205..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 a569091fd..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 e45a51278..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 43b5a1cd5..c6582dd4c 100644 --- a/docs/module-management.ClientGrantsManager.html +++ b/docs/module-management.ClientGrantsManager.html @@ -24,7 +24,7 @@
@@ -1636,7 +1636,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 e534945d0..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 4caac30c4..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 3a70ea836..cd019aa11 100644 --- a/docs/module-management.CustomDomainsManager.html +++ b/docs/module-management.CustomDomainsManager.html @@ -24,7 +24,7 @@
@@ -1731,7 +1731,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 421ed06f7..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 e055228b4..2ddc399ed 100644 --- a/docs/module-management.EmailProviderManager.html +++ b/docs/module-management.EmailProviderManager.html @@ -24,7 +24,7 @@
@@ -1480,7 +1480,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 619a896b8..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 index c7503b11c..99216617b 100644 --- a/docs/module-management.GrantsManager.html +++ b/docs/module-management.GrantsManager.html @@ -24,7 +24,7 @@
@@ -842,7 +842,7 @@

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

Example

- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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.GuardianManager.html b/docs/module-management.GuardianManager.html index c86c3e833..d6bd3438b 100644 --- a/docs/module-management.GuardianManager.html +++ b/docs/module-management.GuardianManager.html @@ -24,7 +24,7 @@
@@ -1440,7 +1440,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 94b44b410..c2adbe428 100644 --- a/docs/module-management.JobsManager.html +++ b/docs/module-management.JobsManager.html @@ -24,7 +24,7 @@
@@ -1849,7 +1849,7 @@
Example

- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 3acd3f88b..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 7505f6676..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:
@@ -1323,7 +1323,7 @@

grantsSource:
@@ -1398,7 +1398,7 @@

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

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

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

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

Type:
+

+ + + +
+

roles :RolesManager

+ + + + +
+

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

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

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

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

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

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

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

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

Methods

-

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

+

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

-

Blacklist a new token.

+

Add permissions in a role

@@ -2151,7 +2226,7 @@

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

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

ID of the Role.

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

Token data.

+

permissions data

@@ -2248,7 +2357,7 @@
Parameters:
- aud + permissions @@ -2265,7 +2374,50 @@
Parameters:
-

Audience (your app client ID).

+

Array of permissions

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

Name of a permission

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

The JWT ID claim.

+

Identifier for a resource

+ +
+ @@ -2386,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);
 });
@@ -2408,14 +2562,14 @@
Example
-

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

+

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

-

Configure the email provider.

+

Asign permissions to a user

@@ -2451,7 +2605,7 @@

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

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

The email provider data object.

+

params object

- - + + + + + + + + + + + + + + + + + + + - + - - @@ -2567,34 +2728,163 @@
Parameters:
NameTypeDescription
cbid -function +String - - <optional>
- - - - - -
-

Callback function.

+

user_id

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

data object containing list of permissions

+ + + + + + + + - -
-
Returns:
+
-
-
- Type: -
-
-Promise -| - -undefined + +
+ + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
permissions + + +String + + + + +

Array of permission IDs

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

Callback function.

+ + + + + + + + + + + + + + + + + + + + + +
+
Returns:
+ + + +
+
+ Type: +
+
+ +Promise +| + +undefined
@@ -2609,12 +2899,15 @@
Returns:
Example
-
management.configureEmailProvider(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.
   }
 
-  // Email provider configured.
+  // User assigned permissions.
 });
@@ -2626,14 +2919,14 @@
Example
-

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

+

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

-

Create an Auth0 client.

+

Asign roles to a user

@@ -2669,7 +2962,7 @@

createCli
Source:
@@ -2715,7 +3008,7 @@

Parameters:
- data + params @@ -2740,7 +3033,143 @@
Parameters:
-

The client data object.

+

params object

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

user_id

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

data object containing list of role IDs

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

Array of role IDs

+ +
+ @@ -2827,12 +3256,15 @@
Returns:
Example
-
management.createClient(data, function (err) {
+    
var parms =  { id : 'USER_ID'};
+var data = { "roles" :["role1"]};
+
+management.assignRolestoUser(params, data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Client created.
+  // User assigned roles.
 });
@@ -2844,14 +3276,14 @@
Example
-

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

+

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

-

Create an Auth0 client grant.

+

Blacklist a new token.

@@ -2887,7 +3319,7 @@

crea
Source:
@@ -2933,7 +3365,7 @@

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

The client data object.

+

Token data.

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

Audience (your app client ID).

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

The JWT ID claim.

+ +
+ @@ -3045,12 +3554,17 @@
Returns:
Example
-
management.clientGrants.create(data, function (err) {
+    
var token = {
+ aud: 'aud',
+ jti: 'jti'
+};
+
+management.blacklistToken(token, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Client grant created.
+  // Token blacklisted.
 });
@@ -3062,14 +3576,14 @@
Example
-

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

+

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

-

Create a new connection.

+

Configure the email provider.

@@ -3105,7 +3619,7 @@

creat
Source:
@@ -3176,7 +3690,7 @@

Parameters:
-

Connection data object.

+

The email provider data object.

@@ -3263,12 +3777,12 @@
Returns:
Example
-
management.createConnection(data, function (err) {
+    
management.configureEmailProvider(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Conection created.
+  // Email provider configured.
 });
@@ -3280,14 +3794,14 @@
Example
-

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

+

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

-

Create an Auth0 Custom Domain.

+

Create an Auth0 client.

@@ -3323,7 +3837,7 @@

cre
Source:
@@ -3394,7 +3908,7 @@

Parameters:
-

The custom domain data object.

+

The client data object.

@@ -3481,12 +3995,12 @@
Returns:
Example
-
management.createCustomDomain(data, function (err) {
+    
management.createClient(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // CustomDomain created.
+  // Client created.
 });
@@ -3498,14 +4012,14 @@
Example
-

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

+

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

-

Create an Auth0 credential.

+

Create an Auth0 client grant.

@@ -3541,7 +4055,7 @@

Source:
@@ -3612,7 +4126,7 @@

Parameters:
-

The device credential data object.

+

The client data object.

@@ -3699,12 +4213,12 @@
Returns:
Example
-
management.createConnection(data, function (err) {
+    
management.clientGrants.create(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Credential created.
+  // Client grant created.
 });
@@ -3716,14 +4230,14 @@
Example
-

createEmailVerificationTicket(cbopt) → {Promise}

+

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

-

Create an email verification ticket.

+

Create a new connection.

@@ -3759,7 +4273,7 @@

Source:
@@ -3803,6 +4317,40 @@
Parameters:
+ + + data + + + + + +Object + + + + + + + + + + + + + + + + + + +

Connection data object.

+ + + + + + cb @@ -3866,6 +4414,9 @@
Returns:
Promise +| + +undefined
@@ -3880,15 +4431,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.createConnection(data, function (err) {
   if (err) {
     // Handle error.
   }
+
+  // Conection created.
 });
@@ -3900,14 +4448,14 @@
Example
-

createGuardianEnrollmentTicket(cbopt) → {Promise|undefined}

+

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

-

Create a Guardian enrollment ticket.

+

Create an Auth0 Custom Domain.

@@ -3943,7 +4491,7 @@

Source:
@@ -3987,6 +4535,40 @@
Parameters:
+ + + data + + + + + +Object + + + + + + + + + + + + + + + + + + +

The custom domain data object.

+ + + + + + cb @@ -4067,8 +4649,12 @@
Returns:
Example
-
management.createGuardianEnrollmentTicket(function (err, ticket) {
-  console.log(ticket);
+    
management.createCustomDomain(data, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // CustomDomain created.
 });
@@ -4080,14 +4666,14 @@
Example
-

createPasswordChangeTicket(cbopt) → {Promise}

+

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

-

Create a new password change ticket.

+

Create an Auth0 credential.

@@ -4123,7 +4709,7 @@

Source:
@@ -4167,6 +4753,40 @@
Parameters:
+ + + data + + + + + +Object + + + + + + + + + + + + + + + + + + +

The device credential data object.

+ + + + + + cb @@ -4230,6 +4850,9 @@
Returns:
Promise +| + +undefined
@@ -4244,17 +4867,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.createConnection(data, function (err) {
   if (err) {
     // Handle error.
   }
+
+  // Credential created.
 });
@@ -4266,14 +4884,14 @@
Example
-

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

+

createEmailVerificationTicket(cbopt) → {Promise}

-

Create a new resource server.

+

Create an email verification ticket.

@@ -4309,7 +4927,7 @@

c
Source:
@@ -4353,40 +4971,6 @@

Parameters:
- - - data - - - - - -Object - - - - - - - - - - - - - - - - - - -

Resource Server data object.

- - - - - - cb @@ -4450,9 +5034,6 @@
Returns:
Promise -| - -undefined
@@ -4467,12 +5048,15 @@
Returns:
Example
-
management.createResourceServer(data, 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.
   }
-
-  // Resource Server created.
 });
@@ -4484,14 +5068,14 @@
Example
-

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

+

createGuardianEnrollmentTicket(cbopt) → {Promise|undefined}

-

Create a new rule.

+

Create a Guardian enrollment ticket.

@@ -4527,7 +5111,7 @@

createRule<
Source:
@@ -4571,40 +5155,6 @@

Parameters:
- - - data - - - - - -Object - - - - - - - - - - - - - - - - - - -

Rule data object.

- - - - - - cb @@ -4685,12 +5235,8 @@
Returns:
Example
-
management.createRule(data, function (err) {
-  if (err) {
-    // Handle error.
-  }
-
-  // Rule created.
+    
management.createGuardianEnrollmentTicket(function (err, ticket) {
+  console.log(ticket);
 });
@@ -4702,14 +5248,14 @@
Example
-

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

+

createPasswordChangeTicket(cbopt) → {Promise}

-

Create a new user.

+

Create a new password change ticket.

@@ -4745,7 +5291,7 @@

createUser<
Source:
@@ -4789,40 +5335,6 @@

Parameters:
- - - data - - - - - -Object - - - - - - - - - - - - - - - - - - -

User data.

- - - - - - cb @@ -4886,9 +5398,6 @@
Returns:
Promise -| - -undefined
@@ -4903,12 +5412,17 @@
Returns:
Example
-
management.createUser(data, 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.
   }
-
-  // User created.
 });
@@ -4920,14 +5434,14 @@
Example
-

deleteAllUsers(cbopt) → {Promise|undefined}

+

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

-

Delete all users.

+

Create a new resource server.

@@ -4951,8 +5465,6 @@

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

deleteA
Source:
@@ -5009,6 +5521,40 @@

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

Resource Server data object.

+ + + + + + cb @@ -5038,7 +5584,7 @@
Parameters:
-

Callback function

+

Callback function.

@@ -5089,12 +5635,12 @@
Returns:
Example
-
management.deleteAllUsers(function (err) {
+    
management.createResourceServer(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Users deleted
+  // Resource Server created.
 });
@@ -5106,14 +5652,14 @@
Example
-

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

+

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

-

Delete an Auth0 client.

+

Create a new role.

@@ -5149,7 +5695,7 @@

deleteCli
Source:
@@ -5195,7 +5741,7 @@

Parameters:
- params + data @@ -5220,94 +5766,43 @@
Parameters:
-

Client parameters.

+

Role data object.

- - - - - - - - - - - - - - - - - - + + - - + + + - - - - -
NameTypeDescription
client_idcb -String +function + + <optional>
+ + + + + +
-

Application client ID.

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

Callback function.

+

Callback function.

@@ -5358,12 +5853,13 @@
Returns:
Example
-
management.deleteClient({ client_id: CLIENT_ID }, function (err) {
+    
data = {"name": "test1","description": "123"}
+management.createRole(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Client deleted.
+  // Role created.
 });
@@ -5375,14 +5871,14 @@
Example
-

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

+

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

-

Delete an Auth0 client grant.

+

Create a new rule.

@@ -5418,7 +5914,7 @@

dele
Source:
@@ -5464,7 +5960,7 @@

Parameters:
- params + data @@ -5489,58 +5985,7 @@
Parameters:
-

Client parameters.

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

Client grant ID.

- -
- +

Rule data object.

@@ -5627,12 +6072,12 @@
Returns:
Example
-
management.clientGrants.delete({ id: GRANT_ID }, function (err) {
+    
management.createRule(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Grant deleted.
+  // Rule created.
 });
@@ -5644,14 +6089,14 @@
Example
-

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

+

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

-

Delete an existing connection.

+

Create a new user.

@@ -5687,7 +6132,7 @@

delet
Source:
@@ -5733,7 +6178,7 @@

Parameters:
- params + data @@ -5758,58 +6203,7 @@
Parameters:
-

Connection parameters.

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

Connection ID.

- -
- +

User data.

@@ -5896,12 +6290,12 @@
Returns:
Example
-
management.deleteConnection({ id: CONNECTION_ID }, function (err) {
+    
management.createUser(data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Conection deleted.
+  // User created.
 });
@@ -5913,14 +6307,14 @@
Example
-

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

+

deleteAllUsers(cbopt) → {Promise|undefined}

-

Delete a Custom Domain.

+

Delete all users.

@@ -5944,6 +6338,8 @@

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

del
Source:
@@ -6000,91 +6396,6 @@

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

Custom Domain parameters.

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

Custom Domain ID.

- -
- - - - - - - cb @@ -6114,7 +6425,7 @@
Parameters:
-

Callback function.

+

Callback function

@@ -6165,12 +6476,12 @@
Returns:
Example
-
management.deleteCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err) {
+    
management.deleteAllUsers(function (err) {
   if (err) {
     // Handle error.
   }
 
-  // CustomDomain deleted.
+  // Users deleted
 });
@@ -6182,14 +6493,14 @@
Example
-

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

+

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

-

Delete an Auth0 device credential.

+

Delete an Auth0 client.

@@ -6225,7 +6536,7 @@

Source:
@@ -6296,7 +6607,7 @@

Parameters:
-

Credential parameters.

+

Client parameters.

@@ -6322,7 +6633,7 @@
Parameters:
- id + client_id @@ -6339,7 +6650,7 @@
Parameters:
-

Device credential ID.

+

Application client ID.

@@ -6434,14 +6745,12 @@
Returns:
Example
-
var params = { id: CREDENTIAL_ID };
-
-management.deleteDeviceCredential(params, function (err) {
+    
management.deleteClient({ client_id: CLIENT_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Credential deleted.
+  // Client deleted.
 });
@@ -6453,14 +6762,14 @@
Example
-

deleteEmailProvider(cbopt) → {Promise|undefined}

+

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

-

Delete email provider.

+

Delete an Auth0 client grant.

@@ -6496,7 +6805,7 @@

de
Source:
@@ -6540,6 +6849,91 @@

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

Client parameters.

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

Client grant ID.

+ +
+ + + + + + + cb @@ -6620,12 +7014,12 @@
Returns:
Example
-
management.deleteEmailProvider(function (err) {
+    
management.clientGrants.delete({ id: GRANT_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Email provider deleted.
+  // Grant deleted.
 });
@@ -6637,14 +7031,14 @@
Example
-

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

+

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

-

Delete a user's Guardian enrollment.

+

Delete an existing connection.

@@ -6680,7 +7074,7 @@

Source:
@@ -6726,7 +7120,7 @@
Parameters:
- data + params @@ -6751,7 +7145,7 @@
Parameters:
-

The Guardian enrollment data object.

+

Connection parameters.

@@ -6794,7 +7188,7 @@
Parameters:
-

The Guardian enrollment id.

+

Connection ID.

@@ -6889,12 +7283,12 @@
Returns:
Example
-
management.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err) {
+    
management.deleteConnection({ id: CONNECTION_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Email provider deleted.
+  // Conection deleted.
 });
@@ -6906,14 +7300,14 @@
Example
-

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

+

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

-

Delete an existing resource server.

+

Delete a Custom Domain.

@@ -6949,7 +7343,7 @@

d
Source:
@@ -7020,7 +7414,7 @@

Parameters:
-

Resource Server parameters.

+

Custom Domain parameters.

@@ -7063,7 +7457,7 @@
Parameters:
-

Resource Server ID.

+

Custom Domain ID.

@@ -7158,12 +7552,12 @@
Returns:
Example
-
management.deleteResourceServer({ id: RESOURCE_SERVER_ID }, function (err) {
+    
management.deleteCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Resource Server deleted.
+  // CustomDomain deleted.
 });
@@ -7175,14 +7569,14 @@
Example
-

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

+

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

-

Delete an existing rule.

+

Delete an Auth0 device credential.

@@ -7218,7 +7612,7 @@

deleteRule<
Source:
@@ -7289,7 +7683,7 @@

Parameters:
-

Rule parameters.

+

Credential parameters.

@@ -7332,7 +7726,7 @@
Parameters:
-

Rule ID.

+

Device credential ID.

@@ -7427,12 +7821,14 @@
Returns:
Example
-
auth0.deleteRule({ id: RULE_ID }, function (err) {
+    
var params = { id: CREDENTIAL_ID };
+
+management.deleteDeviceCredential(params, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Rule deleted.
+  // Credential deleted.
 });
@@ -7444,14 +7840,14 @@
Example
-

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

+

deleteEmailProvider(cbopt) → {Promise|undefined}

-

Delete rules config.

+

Delete email provider.

@@ -7487,7 +7883,7 @@

dele
Source:
@@ -7531,91 +7927,6 @@

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

Rule Configs parameters.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
key - - -String - - - - -

Rule Configs key.

- -
- - - - - - - cb @@ -7696,12 +8007,12 @@
Returns:
Example
-
management.deleteRulesConfig({ key: RULE_CONFIG_KEY }, function (err) {
+    
management.deleteEmailProvider(function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Rules Config deleted.
+  // Email provider deleted.
 });
@@ -7713,14 +8024,14 @@
Example
-

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

+

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

-

Delete a user by its id.

+

Delete a user's Guardian enrollment.

@@ -7756,7 +8067,7 @@

deleteUser<
Source:
@@ -7802,7 +8113,7 @@

Parameters:
- params + data @@ -7827,7 +8138,7 @@
Parameters:
-

The user data object..

+

The Guardian enrollment data object.

@@ -7870,7 +8181,7 @@
Parameters:
-

The user id.

+

The Guardian enrollment id.

@@ -7914,7 +8225,7 @@
Parameters:
-

Callback function

+

Callback function.

@@ -7965,12 +8276,12 @@
Returns:
Example
-
management.deleteUser({ id: USER_ID }, function (err) {
+    
management.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // User deleted.
+  // Email provider deleted.
 });
@@ -7982,14 +8293,14 @@
Example
-

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

+

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

-

Delete a multifactor provider for a user.

+

Delete an existing resource server.

@@ -8025,7 +8336,7 @@

Source:
@@ -8096,7 +8407,7 @@

Parameters:
-

Data object.

+

Resource Server parameters.

@@ -8139,33 +8450,7 @@
Parameters:
-

The user id.

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

Multifactor provider.

+

Resource Server ID.

@@ -8209,7 +8494,7 @@
Parameters:
-

Callback function

+

Callback function.

@@ -8260,14 +8545,12 @@
Returns:
Example
-
var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
-
-management.deleteUserMultifactor(params, function (err, user) {
+    
management.deleteResourceServer({ id: RESOURCE_SERVER_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Users accounts unlinked.
+  // Resource Server deleted.
 });
@@ -8279,14 +8562,14 @@
Example
-

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

+

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

-

Delete a multifactor provider for a user.

+

Delete an existing role.

@@ -8310,10 +8593,6 @@

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

Source:
@@ -8397,7 +8676,7 @@

Parameters:
-

Data object.

+

Role parameters.

@@ -8440,33 +8719,7 @@
Parameters:
-

The user id.

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

Multifactor provider.

+

Role ID.

@@ -8510,7 +8763,7 @@
Parameters:
-

Callback function

+

Callback function.

@@ -8561,14 +8814,12 @@
Returns:
Example
-
var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
-
-management.deleteUserMultifcator(params, function (err, user) {
+    
management.deleteRole({ id: ROLE_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Users accounts unlinked.
+  // Role deleted.
 });
@@ -8580,14 +8831,14 @@
Example
-

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

+

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

-

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

+

Delete an existing rule.

@@ -8623,7 +8874,7 @@

exportUser
Source:
@@ -8669,7 +8920,7 @@

Parameters:
- data + params @@ -8694,7 +8945,7 @@
Parameters:
-

Users export data.

+

Rule parameters.

@@ -8708,8 +8959,6 @@
Parameters:
Type - Attributes - @@ -8722,43 +8971,7 @@
Parameters:
- connection_id - - - - - -String - - - - - - - - - <optional>
- - - - - - - - - - - -

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

- - - - - - - - - format + id @@ -8771,93 +8984,11 @@
Parameters:
- - - <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.

+

Rule ID.

@@ -8952,37 +9083,12 @@
Returns:
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) {
+    
auth0.deleteRule({ id: RULE_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Retrieved job.
-  console.log(results);
+  // Rule deleted.
 });
@@ -8994,14 +9100,14 @@
Example
-

getActiveUsersCount(cbopt) → {Promise|undefined}

+

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

-

Get a the active users count.

+

Delete rules config.

@@ -9037,7 +9143,7 @@

ge
Source:
@@ -9083,13 +9189,13 @@

Parameters:
- cb + params -function +Object @@ -9098,8 +9204,6 @@
Parameters:
- <optional>
- @@ -9110,159 +9214,62 @@
Parameters:
-

Callback function.

+

Rule Configs parameters.

- - - - - - - - - - - - - - - - - - - - -
-
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:
+ +
NameTypeDescription
key + + +String + + +

Rule Configs key.

+ +
- - - - - - - - - - - - - - - - - - + + + - @@ -9345,8 +9352,12 @@
Returns:
Example
-
management.getBlacklistedTokens(function (err, tokens) {
-  console.log(tokens.length);
+    
management.deleteRulesConfig({ key: RULE_CONFIG_KEY }, function (err) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Rules Config deleted.
 });
@@ -9358,14 +9369,14 @@
Example
-

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

+

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

-

Get an Auth0 client.

+

Delete a user by its id.

@@ -9401,7 +9412,7 @@

getClientSource:
@@ -9472,7 +9483,7 @@
Parameters:

- + @@ -9559,7 +9570,7 @@
Parameters:
@@ -9610,12 +9621,12 @@
Returns:
Example
-
management.getClient({ client_id: CLIENT_ID }, function (err, client) {
+    
management.deleteUser({ id: USER_ID }, function (err) {
   if (err) {
     // Handle error.
   }
 
-  console.log(client);
+  // User deleted.
 });
@@ -9627,14 +9638,14 @@
Example
-

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

+

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

-

Get all Auth0 Client Grants.

+

Delete a multifactor provider for a user.

@@ -9670,7 +9681,7 @@

getCli
Source:
@@ -9731,8 +9742,6 @@

Parameters:
- - @@ -9771,34 +9778,24 @@
Parameters:
- + - - @@ -9807,34 +9804,24 @@
Parameters:
- + - - @@ -9878,7 +9865,7 @@
Parameters:
@@ -9929,20 +9916,14 @@
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 = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
 
-management.getClientGrants(params, function (err, grants) {
-  console.log(grants.length);
+management.deleteUserMultifactor(params, function (err, user) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Users accounts unlinked.
 });
@@ -9954,14 +9935,14 @@
Example
-

getClientInfo() → {Object}

+

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

-

Return an object with information about the current client,

+

Delete a multifactor provider for a user.

@@ -9985,113 +9966,9 @@

getClien - - - - - - - - - - -
Source:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Returns:
- - - -
-
- Type: -
-
- -Object - - -
-
- - -
-

Object containing client information.

-
- - -
- - - - - - -
- - - -

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

- - - - - -
-

Get all Auth0 clients.

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

getClients<
Source:
@@ -10166,8 +10043,6 @@

Parameters:

- - @@ -10206,34 +10079,24 @@
Parameters:
- + - - @@ -10242,34 +10105,24 @@
Parameters:
- + - - @@ -10313,7 +10166,7 @@
Parameters:
@@ -10364,20 +10217,14 @@
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 = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
 
-management.getClients(params, function (err, clients) {
-  console.log(clients.length);
+management.deleteUserMultifcator(params, function (err, user) {
+  if (err) {
+    // Handle error.
+  }
+
+  // Users accounts unlinked.
 });
@@ -10389,14 +10236,14 @@
Example
-

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

+

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

-

Get an Auth0 connection.

+

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

@@ -10432,7 +10279,7 @@

getConne
Source:
@@ -10478,7 +10325,7 @@

Parameters:
- + + + @@ -10529,7 +10378,7 @@
Parameters:
- + + - + + - - -
NameTypeAttributesDescription
-

Client parameters.

+

The user data object..

@@ -9498,7 +9509,7 @@
Parameters:
client_idid @@ -9515,7 +9526,7 @@
Parameters:
-

Application client ID.

+

The user id.

-

Callback function.

+

Callback function

- <optional>
- @@ -9743,7 +9752,7 @@
Parameters:
-

Client Grants parameters.

+

Data object.

@@ -9757,8 +9766,6 @@
Parameters:
TypeAttributes
per_pageid -Number +String - - <optional>
- - - - - -
-

Number of results per page.

+

The user id.

pageprovider -Number +String - - <optional>
- - - - - -
-

Page number, zero indexed.

+

Multifactor provider.

-

Callback function.

+

Callback function

- <optional>
- @@ -10178,7 +10053,7 @@
Parameters:
-

Clients parameters.

+

Data object.

@@ -10192,8 +10067,6 @@
Parameters:
TypeAttributes
per_pageid -Number +String - - <optional>
- - - - - -
-

Number of results per page.

+

The user id.

pageprovider -Number +String - - <optional>
- - - - - -
-

Page number, zero indexed.

+

Multifactor provider.

-

Callback function.

+

Callback function

paramsdata @@ -10503,7 +10350,7 @@
Parameters:
-

Connection parameters.

+

Users export data.

@@ -10517,6 +10364,8 @@
Parameters:
TypeAttributes
idconnection_id @@ -10542,19 +10391,21 @@
Parameters:
+ + <optional>
+ - + -
-

Connection ID.

-
+ + +

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

@@ -10563,13 +10414,13 @@
Parameters:
- cb + format -function +String @@ -10590,37 +10441,4552 @@
Parameters:
-

Callback function.

+

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

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

Limit the number of records.

+ + + + + + + fields + + + + +Array.<Object> -
-
Returns:
+ + - + + + + <optional>
+ -
-
- Type: -
+ + + + + + + + + +

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 @@ -10641,12 +15007,17 @@
Returns:
Example
-
management.getConnection({ id: CONNECTION_ID }, function (err, connection) {
+    
var params = {
+  id: '{JOB_ID}'
+};
+
+management.getJob(params, function (err, job) {
   if (err) {
     // Handle error.
   }
 
-  console.log(connection);
+  // Retrieved job.
+  console.log(job);
 });
@@ -10658,14 +15029,14 @@
Example
-

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

+

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

-

Get all connections.

+

Get an Auth0 log.

@@ -10701,7 +15072,7 @@

getConn
Source:
@@ -10762,8 +15133,6 @@

Parameters:
- <optional>
- @@ -10774,7 +15143,7 @@
Parameters:
-

Connections params.

+

Log parameters.

@@ -10788,8 +15157,6 @@
Parameters:
Type - Attributes - @@ -10802,70 +15169,24 @@
Parameters:
- per_page - - - - - -Number - - - - - - - - - <optional>
- - - - - - - - - - - -

Number of results per page.

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

Page number, zero indexed.

+

Event ID.

@@ -10960,20 +15281,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.getLog({ id: EVENT_ID }, function (err, log) {
+  if (err) {
+    // Handle error.
+  }
 
-management.getConnections(params, function (err, connections) {
-  console.log(connections.length);
+  console.log(log);
 });
@@ -10985,14 +15298,14 @@
Example
-

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

+

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

-

Get a Custom Domain.

+

Get all logs.

@@ -11028,7 +15341,7 @@

getCus
Source:
@@ -11074,13 +15387,176 @@

Parameters:
- params + params + + + + + +Object + + + + + + + + + <optional>
+ + + + + + + + + + + +

Logs params.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11159,13 +15622,13 @@
Parameters:
- + - -
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 -Object +String @@ -11089,6 +15565,8 @@
Parameters:
+ <optional>
+ @@ -11099,33 +15577,16 @@
Parameters:
-

Custom Domain parameters.

+

The field to use for sorting.

- - - - - - - - - - - - - - - - - - + + - - + + - + + - - -
NameTypeDescription
idfields @@ -11138,19 +15599,21 @@
Parameters:
+ + <optional>
+ - + -
-

Custom Domain ID.

-
+ +
+

A comma separated list of fields to include or exclude

cbinclude_fields -function +Boolean @@ -11186,134 +15649,94 @@
Parameters:
-

Callback function.

+

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

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

getCustomDomains() → {Promise|undefined}

- - - - - -
-

Get all Auth0 CustomDomains.

-
+ + + +Boolean + + + + + + <optional>
+ -
+ - + + + - + - + +

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

+ + + + + - + + + - + + + cb + - + + + +function - - + + - + + + + <optional>
+ - + - -
Source:
-
- + + + - + - + +

Callback function.

+ + + -
- - - - - - - + + @@ -11357,8 +15780,20 @@
Returns:
Example
-
management.getCustomDomains(function (err, customDomains) {
-  console.log(customDomains.length);
+        

+ 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);
 });
@@ -11370,14 +15805,14 @@
Example
-

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

+

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

-

Get the daily stats.

+

Get permissions for a given role

@@ -11413,80 +15848,27 @@

getDaily
Source:
- - - - - -

- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - + - - - + - + - - - - - - - - - - @@ -11646,19 +16006,18 @@
Returns:
-
Example
+
Examples
-
var params = {
-  from: '{YYYYMMDD}',  // First day included in the stats.
-  to: '{YYYYMMDD}'  // Last day included in the stats.
-};
+    
var params =  { id :'ROLE_ID'};
-management.getDaily(params, function (err, stats) { - if (err) { - // Handle error. - } +

+ This method takes a roleId and + returns all permissions within that role - console.log(stats); +

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

getDeviceCredentials(cbopt) → {Promise|undefined}

+

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

-

Get all Auth0 credentials.

+

Get a Resource Server.

@@ -11713,7 +16072,7 @@

g
Source:
@@ -11757,6 +16116,91 @@

Parameters:
+ + + + + + + + + + + + + + + + + + @@ -11837,8 +16281,12 @@
Returns:
Example
-
management.getDeviceCredentials(function (err, credentials) {
-  console.log(credentials.length);
+    
management.getResourceServer({ id: RESOURCE_SERVER_ID }, function (err, resourceServer) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(resourceServer);
 });
@@ -11850,14 +16298,14 @@
Example
-

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

+

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

-

Get the email provider.

+

Get all resource servers.

@@ -11893,7 +16341,7 @@

getEm
Source:
@@ -11939,13 +16387,13 @@

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

Stats parameters.

- - +
Parameters:
+ @@ -11498,6 +15880,8 @@
Parameters:
+ + @@ -11510,7 +15894,7 @@
Parameters:
- + - - - - - - - - - - - - - - - + + - - - - -
TypeAttributes
fromroleId @@ -11523,45 +15907,21 @@
Parameters:
-

The first day in YYYYMMDD format.

+
-
to - + <optional>
-String + - -
-

The last day in YYYYMMDD format.

- -
- +

Id of the role

params + + +Object + + + + + + + + + + +

Resource Server parameters.

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

Resource Server ID.

+ +
+ + +
cb
cbparams -function +Object @@ -11966,22 +16414,41 @@
Parameters:
-

Callback function.

+

Resource Servers parameters.

-
+ + + + + + + + + + + + + + + + + + - + @@ -12066,13 +16522,13 @@
Parameters:
- + - - - - -
NameTypeAttributesDescription
paramsper_page -Object +Number @@ -12002,35 +16469,16 @@
Parameters:
-

Clients parameters.

+

Number of results per page.

- - - - - - - - - - - - - - - - - - - - + + - - + + + + + +
NameTypeAttributesDescription
fieldspage @@ -12057,7 +16505,15 @@
Parameters:
-

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

+

Page number, zero indexed.

+ +
+
include_fieldscb -Number +function @@ -12093,15 +16549,7 @@
Parameters:
-

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

- -
- +

Callback function.

@@ -12152,8 +16600,20 @@
Returns:
Example
-
management.getEmailProvider(function (err, provider) {
-  console.log(provider.length);
+        

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

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

+

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

-

Get all Auth0 Grants.

+

Get an Auth0 role.

@@ -12208,7 +16668,7 @@

getGrantsSource:
@@ -12279,7 +16739,7 @@
Parameters:
-

Grants parameters.

+

Role parameters.

@@ -12305,137 +16765,7 @@
Parameters:
- 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 + id @@ -12452,7 +16782,7 @@
Parameters:
-

The audience of the grants to retrieve.

+

Role ID.

@@ -12547,17 +16877,12 @@
Returns:
Example
-
var params = {
-  per_page: 10,
-  page: 0,
-  include_totals: true,
-  user_id: USER_ID,
-  client_id: CLIENT_ID,
-  audience: AUDIENCE
-};
+    
management.getRole({ id: ROLE_ID }, function (err, role) {
+  if (err) {
+    // Handle error.
+  }
 
-management.getGrants(params, function (err, grants) {
-  console.log(grants.length);
+  console.log(role);
 });
@@ -12569,14 +16894,14 @@
Example
-

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

+

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

-

Get a single Guardian enrollment.

+

Get all roles.

@@ -12612,7 +16937,7 @@

Source:
@@ -12658,7 +16983,7 @@

Parameters:
- data + params @@ -12673,6 +16998,8 @@
Parameters:
+ <optional>
+ @@ -12683,7 +17010,7 @@
Parameters:
-

The Guardian enrollment data object.

+

Roles parameters.

@@ -12697,6 +17024,8 @@
Parameters:
Type + Attributes + @@ -12709,24 +17038,70 @@
Parameters:
- id + per_page -String +Number + + + + + + + + + <optional>
+ + + + + + + + + + + +

Number of results per page.

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

The Guardian enrollment id.

+

Page number, zero indexed.

@@ -12821,8 +17196,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.getRoles(params, function (err, roles) {
+  console.log(roles.length);
 });
@@ -12834,14 +17221,14 @@
Example
-

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

+

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

-

Get a list of a user's Guardian enrollments.

+

Get an Auth0 rule.

@@ -12877,7 +17264,7 @@

Source:
@@ -12923,7 +17310,7 @@

Parameters:
- data + params @@ -12948,7 +17335,7 @@
Parameters:
-

The user data object.

+

Rule parameters.

@@ -12991,7 +17378,7 @@
Parameters:
-

The user id.

+

Rule ID.

@@ -13086,8 +17473,12 @@
Returns:
Example
-
management.getGuardianEnrollments({ id: USER_ID }, function (err, enrollments) {
-  console.log(enrollments);
+    
management.getRule({ id: RULE_ID }, function (err, rule) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(rule);
 });
@@ -13099,14 +17490,14 @@
Example
-

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

+

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

-

Get a job by its ID.

+

Get all rules.

@@ -13142,7 +17533,7 @@

getJobSource:
@@ -13203,6 +17594,8 @@
Parameters:
+ <optional>
+ @@ -13213,7 +17606,7 @@
Parameters:
-

Job parameters.

+

Rules parameters.

@@ -13227,6 +17620,8 @@
Parameters:
Type + Attributes + @@ -13239,24 +17634,70 @@
Parameters:
- id + per_page -String +Number + + + <optional>
+ + + + + + + -

Job ID.

+

Number of results per page.

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

Page number, zero indexed.

@@ -13351,17 +17792,20 @@
Returns:
Example
-
var params = {
-  id: '{JOB_ID}'
+        

+ 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.getJob(params, function (err, job) {
-  if (err) {
-    // Handle error.
-  }
-
-  // Retrieved job.
-  console.log(job);
+management.getRules(params, function (err, rules) {
+  console.log(rules.length);
 });
@@ -13373,14 +17817,14 @@
Example
-

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

+

getRulesConfigs() → {Promise|undefined}

-

Get an Auth0 log.

+

Get rules config.

@@ -13416,7 +17860,7 @@

getLogSource:
@@ -13435,114 +17879,149 @@

getLogParameters:

- - - - - - - - - - + + + + + + + + + +
+
Returns:
+ +
+
+ Type: +
+
+Promise +| + +undefined + + +
+
-
- - - + - - - - - +
management.getRulesConfigs(function (err, rulesConfigs) {
+  if (err) {
+    // Handle error.
+  }
 
-            
-                
+ + +
- + -
- + + + + @@ -13625,12 +18104,12 @@
Returns:
Example
-
management.getLog({ id: EVENT_ID }, function (err, log) {
+    
management.getSettings(function (err, settings) {
   if (err) {
     // Handle error.
   }
 
-  console.log(log);
+  console.log(settings);
 });
@@ -13642,14 +18121,14 @@
Example
-

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

+

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

-

Get all logs.

+

Get a user by its id.

@@ -13685,7 +18164,7 @@

getLogsSource:
@@ -13731,7 +18210,7 @@
Parameters:

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

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

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

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

+

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

-

Get a user by its id.

+

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.

@@ -15688,7 +20364,7 @@

getUserSource:
@@ -15759,7 +20435,7 @@
Parameters:

- + + + + + + + + + + + + + + + + + @@ -15897,8 +20599,15 @@
Returns:
Example
-
management.getUser({ id: USER_ID }, function (err, user) {
-  console.log(user);
+    
var params = {
+  connection_id: '{CONNECTION_ID}',
+  users: '{PATH_TO_USERS_FILE}'
+};
+
+management.get(params, function (err) {
+  if (err) {
+    // Handle error.
+  }
 });
@@ -15910,14 +20619,14 @@
Example
-

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

+

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

-

Get user's log events.

+

Link the user with another account.

@@ -15953,7 +20662,7 @@

getUserLog
Source:
@@ -15999,13 +20708,13 @@

Parameters:
- + @@ -17037,7 +21772,7 @@
Parameters:
- + + + @@ -18214,58 +23106,33 @@
Parameters:
- + - - @@ -18589,32 +23437,32 @@
Parameters:
- + + - + + - - -
NameTypeAttributesDescription
params - - -Object +
+
Example
- -
- + // Get Rules Configs. +}); - + - - -

Log parameters.

- - +

getTenantSettings(cbopt) → {Promise|undefined}

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

Get the tenant settings..

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

Event ID.

- -
Attributes
+ - -
Description
paramsdata @@ -13746,8 +18225,6 @@
Parameters:
- <optional>
- @@ -13758,278 +18235,50 @@
Parameters:
-

Logs params.

+

The user data object.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - - - + - + - - + + + + - + - - @@ -14124,20 +18373,8 @@
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
-};
-
-management.getLogs(params, function (err, logs) {
-  console.log(logs.length);
+    
management.getUser({ id: USER_ID }, function (err, user) {
+  console.log(user);
 });
@@ -14149,14 +18386,14 @@
Example
-

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

+

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

-

Get a Resource Server.

+

Get user's log events.

@@ -14192,7 +18429,7 @@

getR
Source:
@@ -14263,7 +18500,7 @@

Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14401,12 +18742,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.getUserLogs(params, function (err, logs) {
   if (err) {
     // Handle error.
   }
 
-  console.log(resourceServer);
+  console.log(logs);
 });
@@ -14418,14 +18761,14 @@
Example
-

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

+

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

-

Get all resource servers.

+

Get user's permissions

@@ -14461,7 +18804,7 @@

get
Source:
@@ -14522,8 +18865,6 @@

Parameters:
- - @@ -14562,28 +18901,44 @@
Parameters:
- + - + + + + + + + + + +Number + + + + + @@ -14611,21 +18966,63 @@
Parameters:
-
+ + + + + + + + + + + + + + + + + + + + + + + + + - - @@ -14720,20 +19117,14 @@
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 = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
 
-management.getResourceServers(params, function (err, resourceServers) {
-  console.log(resourceServers.length);
+management.getUserPermissions(params, function (err, logs) {
+  if (err) {
+    // Handle error.
+  }
+
+  console.log(logs);
 });
@@ -14745,14 +19136,14 @@
Example
-

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

+

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

-

Get an Auth0 rule.

+

Get user's roles

@@ -14788,7 +19179,7 @@

getRuleSource:
@@ -14859,7 +19250,7 @@
Parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -14997,12 +19492,14 @@
Returns:
Example
-
management.getRule({ id: RULE_ID }, function (err, rule) {
+    
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(rule);
+  console.log(logs);
 });
@@ -15014,14 +19511,14 @@
Example
-

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

+

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

-

Get all rules.

+

Get all users.

@@ -15057,7 +19554,7 @@

getRulesSource:
@@ -15130,7 +19627,7 @@
Parameters:

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

getRulesConfigs() → {Promise|undefined}

+

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

-

Get rules config.

+

Get users for a given email address

@@ -15367,40 +19901,140 @@

getRul - + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + + + + + + + + + + + +

Parameters:
+ + +
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>
- +
NameType -

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

- -
Description
include_totalsid -Boolean +String - - <optional>
- - - - - -
-

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

+

The user id.

-

Resource Server parameters.

+

Get logs data.

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

Resource Server 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;

- <optional>
- @@ -14534,7 +18875,7 @@
Parameters:
-

Resource Servers parameters.

+

Get permissions data.

@@ -14548,8 +18889,6 @@
Parameters:
TypeAttributes
per_pageid -Number +String - - <optional>
- + + +
+

User id.

+
per_page + - + + + + +

Page number, zero indexed.

- <optional>
+
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 + + + + -

Page number, zero indexed.

+

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

-

Rule parameters.

+

Get roles data.

@@ -14902,7 +19293,111 @@
Parameters:
-

Rule 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;

-

Rules parameters.

+

Users params.

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

The version of the search engine to use.

+ +
per_page
+ + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + - + + - -
Source:
-
- +
+ + + - + + + + + + + + + +
NameTypeAttributesDescription
email + + +String + - + + + + <optional>
+ - + - + +
+

Email Address of users to locate

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

Callback function.

+ +
@@ -15444,12 +20078,13 @@
Returns:
Example
-
management.getRulesConfigs(function (err, rulesConfigs) {
-  if (err) {
-    // Handle error.
-  }
-
-  // Get Rules Configs.
+        

+ 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);
 });
@@ -15461,14 +20096,14 @@
Example
-

getTenantSettings(cbopt) → {Promise|undefined}

+

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

-

Get the tenant settings..

+

Get users in a given role

@@ -15504,7 +20139,7 @@

getT
Source:
@@ -15548,6 +20183,42 @@

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

Id of the role

+ +
cb -

The user data object.

+

Users import data.

@@ -15785,7 +20461,7 @@
Parameters:
idconnectionId @@ -15802,7 +20478,33 @@
Parameters:
-

The user id.

+

Connection for the users insertion.

+ +
users + + +String + + + + +

Path to the users data file.

paramsuserId -Object +String @@ -16024,111 +20733,67 @@
Parameters:
-

Get logs data.

+

ID of the primary user.

- - - - - - - - - - - - - - - - - - + + - - + - - - - - - - - - - - - - + + - - - - - - - - - - +
NameTypeDescription
idparams -String +Object -

User id.

+
-
per_page - -Number - - - - -

Number of results per page.

- -
page - +

Secondary user data.

-Number - + - -
+ + + + + - + - + - - + + + + + + - + @@ -16154,13 +20819,13 @@
Parameters:
- + @@ -16266,14 +20931,18 @@
Returns:
Example
-
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
+    
var userId = 'USER_ID';
+var params = {
+  user_id: 'OTHER_USER_ID',
+  connection_id: 'CONNECTION_ID'
+};
 
-management.getUserLogs(params, function (err, logs) {
+management.linkUsers(userId, params, function (err, user) {
   if (err) {
     // Handle error.
   }
 
-  console.log(logs);
+  // Users linked.
 });
@@ -16285,14 +20954,14 @@
Example
-

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

+

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

-

Get all users.

+

Generate new Guardian recovery code.

@@ -16328,7 +20997,7 @@

getUsersSource:
@@ -16374,7 +21043,7 @@
Parameters:

- + - - @@ -16429,106 +21094,24 @@
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - @@ -16623,21 +21206,8 @@
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
-};
-
-auth0.getUsers(params, function (err, users) {
-  console.log(users.length);
+    
management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
+  console.log(newRecoveryCode);
 });
@@ -16649,14 +21219,14 @@
Example
-

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

+

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

-

Get users for a given email address

+

Remove permissions from a role

@@ -16669,50 +21239,180 @@

getUse - + + + + + + + + + + + + + + + + + + + + + +
Source:
+
+ + + + + + + + + + + + + + + + + +

Parameters:
+ + +
NameType -

Page number, zero indexed.

- -
Description
sortuser_id @@ -16145,7 +20810,7 @@
Parameters:
-

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

+

ID of the user to be linked.

include_totalsconnection_id -Boolean +String @@ -16171,7 +20836,7 @@
Parameters:
-

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

+

ID of the connection to be used.

paramsdata @@ -16389,8 +21058,6 @@
Parameters:
- <optional>
- @@ -16401,7 +21068,7 @@
Parameters:
-

Users params.

+

The user data object.

@@ -16415,8 +21082,6 @@
Parameters:
TypeAttributes
search_engine - - -Number - - - - - - <optional>
- - - - - -
-

The version of the search engine to use.

- -
per_page - - -Number - - - - - - <optional>
- - - - - -
-

Number of results per page.

- -
pageid -Number +String - - <optional>
- - - - - -
-

Page number, zero indexed.

+

The user id.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + - + @@ -16852,13 +21582,11 @@
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 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);
 });
@@ -16870,15 +21598,14 @@
Example
-

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

+

removePermissionsFromUser(params, 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.

+

Remove permissions from a user

@@ -16914,7 +21641,7 @@

importUser
Source:
@@ -16960,7 +21687,7 @@

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

ID of the Role.

+ +
data + + +Object - - + + + - + - + + +

permissions data

+ + - + + + + + + - + - -
Source:
-
- + - + - + + + + - - - + + + + + + + -
Parameters:
- + + + + + +
NameTypeDescription
permissions + + +String + + +

Array of permissions

+ + @@ -16724,8 +21424,6 @@
Parameters:
- - @@ -16738,7 +21436,7 @@
Parameters:
- + - + + + + + + + + + +String + + + + + + + + + +
TypeAttributes
emailpermission_name @@ -16751,21 +21449,53 @@
Parameters:
- - <optional>
- + + +
+

Name of a permission

+
resource_server_identifier + - -

Email Address of users to locate

+

Identifier for a resource

+ +
+ + +
+
dataparams @@ -16985,7 +21712,7 @@
Parameters:
-

Users import data.

+

params object

@@ -17011,7 +21738,7 @@
Parameters:
connectionIdid @@ -17028,7 +21755,15 @@
Parameters:
-

Connection for the users insertion.

+

user_id

+ +
+
usersdata @@ -17050,11 +21785,62 @@
Parameters:
+ + + + + + -

Path to the users data file.

+

data object containing list of permission IDs

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -17149,15 +21935,15 @@
Returns:
Example
-
var params = {
-  connection_id: '{CONNECTION_ID}',
-  users: '{PATH_TO_USERS_FILE}'
-};
+    
var parms =  { id : 'USER_ID'};
+var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
 
-management.get(params, function (err) {
+management.removePermissionsFromUser(params, data, function (err) {
   if (err) {
     // Handle error.
   }
+
+  // User assigned permissions.
 });
@@ -17169,14 +21955,14 @@
Example
-

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

+

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

-

Link the user with another account.

+

Remove roles from a user

@@ -17212,7 +21998,7 @@

linkUsersSource:
@@ -17258,13 +22044,13 @@
Parameters:

- + @@ -17292,13 +22129,13 @@
Parameters:
- + - - - - - - - - - - - - - - - - - + @@ -17481,18 +22292,15 @@
Returns:
Example
-
var userId = 'USER_ID';
-var params = {
-  user_id: 'OTHER_USER_ID',
-  connection_id: 'CONNECTION_ID'
-};
+    
var parms =  { id : 'USER_ID'};
+var data = { "roles" :["role1"]};
 
-management.linkUsers(userId, params, function (err, user) {
+management.removeRolesFromUser(params, data, function (err) {
   if (err) {
     // Handle error.
   }
 
-  // Users linked.
+  // User assigned roles.
 });
@@ -17504,14 +22312,14 @@
Example
-

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

+

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

-

Generate new Guardian recovery code.

+

Send a verification email to a user.

@@ -17547,7 +22355,7 @@

Source:
@@ -17618,7 +22426,7 @@

Parameters:
- + @@ -17756,8 +22564,14 @@
Returns:
Example
-
management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
-  console.log(newRecoveryCode);
+    
var params = {
+	user_id: '{USER_ID}'
+};
+
+management.sendEmailVerification(function (err) {
+  if (err) {
+    // Handle error.
+  }
 });
@@ -17769,14 +22583,14 @@
Example
-

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

+

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

-

Send a verification email to a user.

+

Set a new rules config.

@@ -17812,7 +22626,7 @@

Source:
@@ -17856,6 +22670,91 @@

Parameters:
+ + + + + + + + + + + + + + + + + + @@ -17883,7 +22782,7 @@
Parameters:
- + @@ -18021,14 +22920,15 @@
Returns:
Example
-
var params = {
-	user_id: '{USER_ID}'
-};
+    
var params = { key: RULE_CONFIG_KEY };
+var data =   { value: RULES_CONFIG_VALUE };
 
-management.sendEmailVerification(function (err) {
+management.setRulesConfig(params, data, function (err, rulesConfig) {
   if (err) {
     // Handle error.
   }
+
+  // Rules Config set.
 });
@@ -18040,14 +22940,14 @@
Example
-

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

+

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

-

Set a new rules config.

+

Unlink the given accounts.

@@ -18083,7 +22983,7 @@

setRule
Source:
@@ -18154,7 +23054,7 @@

Parameters:
- + - - - - -
NameTypeDescription
permissions + + +String + + + + +

Array of permission IDs

userIdparams -String +Object @@ -17283,7 +22069,58 @@
Parameters:
-

ID of the primary user.

+

params object

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

user_id

+ +
+
paramsdata -Object +String @@ -17317,7 +22154,7 @@
Parameters:
-

Secondary user data.

+

data object containing list of role IDs

@@ -17343,33 +22180,7 @@
Parameters:
user_id - - -String - - - - -

ID of the user to be linked.

- -
connection_idroles @@ -17386,7 +22197,7 @@
Parameters:
-

ID of the connection to be used.

+

Array of role IDs

-

The user data object.

+

User data object.

@@ -17644,7 +22452,7 @@
Parameters:
iduser_id @@ -17661,7 +22469,7 @@
Parameters:
-

The user id.

+

ID of the user to be verified.

params + + +Object + + + + + + + + + + +

Rule Config parameters.

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

Rule Config key.

+ +
+ + +
data -

User data object.

+

Rule Config Data parameters.

@@ -17909,7 +22808,7 @@
Parameters:
user_idvalue @@ -17926,7 +22825,7 @@
Parameters:
-

ID of the user to be verified.

+

Rule Config Data value.

-

Rule Config parameters.

+

Linked users data.

@@ -18180,7 +23080,7 @@
Parameters:
keyid @@ -18197,15 +23097,7 @@
Parameters:
-

Rule Config key.

- -
- +

Primary user ID.

dataprovider -Object +String - - - - - - -

Rule Config Data parameters.

+

Identity provider in use.

- - - - - - - - - - - - - - - - - - + + - - + @@ -18377,15 +23244,14 @@
Returns:
Example
-
var params = { key: RULE_CONFIG_KEY };
-var data =   { value: RULES_CONFIG_VALUE };
+    
var params = { id: USER_ID, provider: 'auht0', user_id: OTHER_USER_ID };
 
-management.setRulesConfig(params, data, function (err, rulesConfig) {
+management.unlinkUsers(params, function (err, user) {
   if (err) {
     // Handle error.
   }
 
-  // Rules Config set.
+  // Users accounts unlinked.
 });
@@ -18397,14 +23263,14 @@
Example
-

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

+

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

-

Unlink the given accounts.

+

Update the app metadata for a user.

@@ -18440,7 +23306,7 @@

unlinkUser
Source:
@@ -18511,7 +23377,7 @@

Parameters:
- - - - - - - - - - - - - - - - - + + + + + +
NameTypeDescription
valueuser_id @@ -18282,7 +23149,7 @@
Parameters:
-

Rule Config Data value.

+

Secondary user ID.

-

Linked users data.

+

The user data object..

@@ -18537,33 +23403,7 @@
Parameters:
id - - -String - - - - -

Primary user ID.

- -
providerid @@ -18580,7 +23420,15 @@
Parameters:
-

Identity provider in use.

+

The user id.

+ +
+
user_idmetadata -String +Object + - + - -

Secondary user ID.

-
+ + +

New app metadata.

@@ -18650,7 +23498,7 @@
Parameters:
-

Callback function.

+

Callback function

@@ -18701,14 +23549,18 @@
Returns:
Example
-
var params = { id: USER_ID, provider: 'auht0', user_id: OTHER_USER_ID };
+    
var params = { id: USER_ID };
+var metadata = {
+  foo: 'bar'
+};
 
-management.unlinkUsers(params, function (err, user) {
+management.updateAppMetadata(params, metadata, function (err, user) {
   if (err) {
     // Handle error.
   }
 
-  // Users accounts unlinked.
+  // Updated user.
+  console.log(user);
 });
@@ -18720,14 +23572,14 @@
Example
-

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

+

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

-

Update the app metadata for a user.

+

Update an Auth0 client.

@@ -18763,7 +23615,7 @@

upda
Source:
@@ -18834,7 +23686,7 @@

Parameters:
-

The user data object..

+

Client parameters.

@@ -18860,7 +23712,7 @@
Parameters:
- id + client_id @@ -18877,7 +23729,7 @@
Parameters:
-

The user id.

+

Application client ID.

@@ -18894,7 +23746,7 @@
Parameters:
- metadata + data @@ -18919,7 +23771,7 @@
Parameters:
-

New app metadata.

+

Updated client data.

@@ -18955,7 +23807,7 @@
Parameters:
-

Callback function

+

Callback function.

@@ -19006,18 +23858,15 @@
Returns:
Example
-
var params = { id: USER_ID };
-var metadata = {
-  foo: 'bar'
-};
+    
var data = { name: 'newClientName' };
+var params = { client_id: CLIENT_ID };
 
-management.updateAppMetadata(params, metadata, function (err, user) {
+management.updateClient(params, data, function (err, client) {
   if (err) {
     // Handle error.
   }
 
-  // Updated user.
-  console.log(user);
+  console.log(client.name);  // 'newClientName'
 });
@@ -19029,14 +23878,14 @@
Example
-

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

+

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

-

Update an Auth0 client.

+

Update an Auth0 client grant.

@@ -19072,7 +23921,7 @@

updateCli
Source:
@@ -19169,7 +24018,7 @@

Parameters:
- client_id + id @@ -19186,7 +24035,7 @@
Parameters:
-

Application client ID.

+

Client grant ID.

@@ -19315,15 +24164,19 @@
Returns:
Example
-
var data = { name: 'newClientName' };
-var params = { client_id: CLIENT_ID };
+    
var data = {
+  client_id: CLIENT_ID,
+  audience: AUDIENCE,
+  scope: []
+};
+var params = { id: CLIENT_GRANT_ID };
 
-management.updateClient(params, data, function (err, client) {
+management.clientGrants.update(params, data, function (err, grant) {
   if (err) {
     // Handle error.
   }
 
-  console.log(client.name);  // 'newClientName'
+  console.log(grant.id);
 });
@@ -19335,14 +24188,14 @@
Example
-

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

+

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

-

Update an Auth0 client grant.

+

Update an existing connection.

@@ -19378,7 +24231,7 @@

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

Parameters:
-

Client parameters.

+

Connection parameters.

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

Client grant ID.

+

Connection ID.

@@ -19534,7 +24387,7 @@
Parameters:
-

Updated client data.

+

Updated connection data.

@@ -19621,19 +24474,15 @@
Returns:
Example
-
var data = {
-  client_id: CLIENT_ID,
-  audience: AUDIENCE,
-  scope: []
-};
-var params = { id: CLIENT_GRANT_ID };
+    
var data = { name: 'newConnectionName' };
+var params = { id: CONNECTION_ID };
 
-management.clientGrants.update(params, data, function (err, grant) {
+management.updateConnection(params, data, function (err, connection) {
   if (err) {
     // Handle error.
   }
 
-  console.log(grant.id);
+  console.log(connection.name);  // 'newConnectionName'
 });
@@ -19645,14 +24494,14 @@
Example
-

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

+

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

-

Update an existing connection.

+

Update the email provider.

@@ -19688,7 +24537,7 @@

updat
Source:
@@ -19759,58 +24608,7 @@

Parameters:
-

Connection parameters.

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

Connection ID.

- -
- +

Email provider parameters.

@@ -19844,7 +24642,7 @@
Parameters:
-

Updated connection data.

+

Updated email provider data.

@@ -19931,15 +24729,13 @@
Returns:
Example
-
var data = { name: 'newConnectionName' };
-var params = { id: CONNECTION_ID };
-
-management.updateConnection(params, data, function (err, connection) {
+    
management.updateEmailProvider(params, data, function (err, provider) {
   if (err) {
     // Handle error.
   }
 
-  console.log(connection.name);  // 'newConnectionName'
+  // Updated email provider.
+  console.log(provider);
 });
@@ -19951,14 +24747,14 @@
Example
-

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

+

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

-

Update the email provider.

+

Update an existing resource server.

@@ -19994,7 +24790,7 @@

up
Source:
@@ -20065,7 +24861,58 @@

Parameters:
-

Email provider parameters.

+

Resource Server parameters.

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

Resource Server ID.

+ +
+ @@ -20099,7 +24946,7 @@
Parameters:
-

Updated email provider data.

+

Updated Resource Server data.

@@ -20186,13 +25033,15 @@
Returns:
Example
-
management.updateEmailProvider(params, data, function (err, provider) {
+    
var data = { name: 'newResourceServerName' };
+var params = { id: RESOURCE_SERVER_ID };
+
+management.updateResourceServer(params, data, function (err, resourceServer) {
   if (err) {
     // Handle error.
   }
 
-  // Updated email provider.
-  console.log(provider);
+  console.log(resourceServer.name);  // 'newResourceServerName'
 });
@@ -20204,14 +25053,14 @@
Example
-

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

+

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

-

Update an existing resource server.

+

Update an existing role.

@@ -20247,7 +25096,7 @@

u
Source:
@@ -20318,7 +25167,7 @@

Parameters:
-

Resource Server parameters.

+

Role parameters.

@@ -20361,7 +25210,7 @@
Parameters:
-

Resource Server ID.

+

Role ID.

@@ -20403,7 +25252,7 @@
Parameters:
-

Updated Resource Server data.

+

Updated role data.

@@ -20490,15 +25339,14 @@
Returns:
Example
-
var data = { name: 'newResourceServerName' };
-var params = { id: RESOURCE_SERVER_ID };
-
-management.updateResourceServer(params, data, function (err, resourceServer) {
+    
var params = { id: ROLE_ID };
+var data = { name: 'my-role'};
+management.updateRole(params, data, function (err, role) {
   if (err) {
     // Handle error.
   }
 
-  console.log(resourceServer.name);  // 'newResourceServerName'
+  console.log(role.name); // 'my-role'.
 });
@@ -20553,7 +25401,7 @@

updateRule<
Source:
@@ -20858,7 +25706,7 @@

u
Source:
@@ -21074,7 +25922,7 @@

updateUser<
Source:
@@ -21380,7 +26228,7 @@

upd
Source:
@@ -21689,7 +26537,7 @@

ver
Source:
@@ -21927,7 +26775,7 @@

Example

- Generated by JSDoc 3.5.5 on Mon Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 d54c5c3d0..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 68b038b8a..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 7b3710806..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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 4ed666499..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 7f9a2d970..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 5bd99e37f..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 1c823a01d..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 314bbde5f..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 Mar 18 2019 14:16:17 GMT-0300 (Brasilia Standard Time) 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 0a798e1d0..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 @@