Simple facade for consuming a REST API endpoint.
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- @@ -1139,7 +1239,7 @@
- Source:
- @@ -1515,7 +1515,7 @@
- Source:
- @@ -723,7 +723,7 @@
- Source:
- @@ -798,7 +798,7 @@
- Source:
- @@ -873,7 +873,7 @@
- @@ -948,7 +948,7 @@
- Source:
- @@ -1023,7 +1023,7 @@
- Source:
- @@ -1098,7 +1098,7 @@
- Source:
- @@ -1173,7 +1173,7 @@
- Source:
- @@ -1248,7 +1248,7 @@
- Source:
- @@ -1323,7 +1323,7 @@
- @@ -1398,7 +1398,7 @@
- @@ -1472,7 +1472,7 @@
- @@ -1546,7 +1546,7 @@
- @@ -1621,7 +1621,7 @@
- Source:
- @@ -1648,6 +1648,81 @@
- Source: +
- + + + + + + + +
-
+
+
RolesManager
+ + +
+ - @@ -1770,7 +1845,7 @@
- Source:
- @@ -1844,7 +1919,7 @@
- @@ -1918,7 +1993,7 @@
- @@ -1992,7 +2067,7 @@
- @@ -2067,7 +2142,7 @@
- @@ -2108,14 +2183,14 @@
- Source:
- @@ -2197,7 +2272,41 @@
- @@ -2497,7 +2651,7 @@
- - Type: - -
-
-
Promise
-| - -undefined
+ +Description + - + Type: + +
-
+
+
Promise
+| + +undefined
@@ -2609,12 +2899,15 @@ - Source:
- @@ -2715,7 +3008,7 @@
- Source:
- @@ -2933,7 +3365,7 @@
- Source:
- @@ -3176,7 +3690,7 @@
- Source:
- @@ -3394,7 +3908,7 @@
- Source:
- @@ -3612,7 +4126,7 @@
- @@ -3803,6 +4317,40 @@
-
Promise
+| + +undefined
@@ -3880,15 +4431,12 @@ - @@ -3987,6 +4535,40 @@
- Source:
- @@ -4167,6 +4753,40 @@
-
Promise
+| + +undefined
@@ -4244,17 +4867,12 @@ - Source:
- @@ -4353,40 +4971,6 @@
-
Promise
-| - -undefined
@@ -4467,12 +5048,15 @@ - Source:
- @@ -4571,40 +5155,6 @@
- Source:
- @@ -4789,40 +5335,6 @@
-
Promise
-| - -undefined
@@ -4903,12 +5412,17 @@ - Deprecated:
- This method will be removed in the next major release.
-
@@ -4965,7 +5477,7 @@ - Source:
- @@ -5009,6 +5521,40 @@
- Source:
- @@ -5195,7 +5741,7 @@
- Source:
- @@ -5464,7 +5960,7 @@
- Source:
- @@ -5733,7 +6178,7 @@
- Deprecated:
- This method will be removed in the next major release.
+
@@ -5956,7 +6352,7 @@ - Source:
- @@ -6000,91 +6396,6 @@
- @@ -6296,7 +6607,7 @@
- Source:
- @@ -6540,6 +6849,91 @@
- @@ -6726,7 +7120,7 @@
- Source:
- @@ -7020,7 +7414,7 @@
- Source:
- @@ -7289,7 +7683,7 @@
- Source:
- @@ -7531,91 +7927,6 @@
- Source:
- @@ -7802,7 +8113,7 @@
- Source:
- @@ -8096,7 +8407,7 @@
- Deprecated:
- The function name has a typo.
-We're shipping this so it doesn't break compatibility.
-Use
deleteUserMultifactor
instead.
-
@@ -8326,7 +8605,7 @@ - The function name has a typo.
-We're shipping this so it doesn't break compatibility.
-Use
- Source:
- @@ -8397,7 +8676,7 @@
- Source:
- @@ -8669,7 +8920,7 @@
- Source:
- @@ -9083,13 +9189,13 @@
- - Type: - -
-
+
Name -Promise
-| - -undefined
- - -
- - Source: -
- - - - + - +
- @@ -9472,7 +9483,7 @@
- Source:
- @@ -9731,8 +9742,6 @@
- Source: -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Type: - -
-
-
-
Object
- - -
- - Deprecated:
- The function name has a typo.
+We're shipping this so it doesn't break compatibility.
+Use
deleteUserMultifactor
instead.
@@ -10105,7 +9982,7 @@ - The function name has a typo.
+We're shipping this so it doesn't break compatibility.
+Use
- Source:
- @@ -10166,8 +10043,6 @@
- Source:
- @@ -10478,7 +10325,7 @@
- - Type: - + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Object
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + 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); });
Example
-getConnections(paramsopt, cbopt) → {Promise|undefined}
+getLog(params, cbopt) → {Promise|undefined}
-@@ -10701,7 +15072,7 @@Get all connections.
+Get an Auth0 log.
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.
- -- - @@ -10960,20 +15281,12 @@ +page
id
- -Number
+String
- - <optional> -
- - - - - -- Page number, zero indexed.
+Event ID.
Returns:
Example
- - -// 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); });
Example
-getCustomDomain(params, cbopt) → {Promise|undefined}
+getLogs(paramsopt, cbopt) → {Promise|undefined}
-@@ -11028,7 +15341,7 @@Get a Custom Domain.
+Get all logs.
getCus
- Source:
- @@ -11074,13 +15387,176 @@
Parameters:
- +params
+ + +params
+ + + + + +Object
+ + + ++ + <optional> + + + + +
+ + + + + ++ Logs params.
+ + + ++ +
- - - - - - - - - - - - - - -+ + + + + + + +Name + + +Type + + +Attributes + + + + +Description ++ + + + + + + + +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
+ ++ + @@ -11159,13 +15622,13 @@sort
- Object
+String
@@ -11089,6 +15565,8 @@Parameters:
+ <optional>
+ @@ -11099,33 +15577,16 @@Parameters:
- Custom Domain parameters.
+The field to use for sorting.
- - -- -
+ +- - - + + -Name - - -Type - - - - - -Description -- + + - - - +id
fields
@@ -11138,19 +15599,21 @@ +Parameters:
+ + <optional>
+ - + -- -Custom Domain ID.
-+ A comma separated list of fields to include or exclude
Parameters:
- - - +cb
include_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
+ + - Source: -
- - + +
- Source:
- - - - - - - - - - - - - - - - -
- Source:
- @@ -11757,6 +16116,91 @@
- Source:
- @@ -11939,13 +16387,13 @@
- @@ -12279,7 +16739,7 @@
- Source:
- @@ -12658,7 +16983,7 @@
- @@ -12923,7 +17310,7 @@
- @@ -13203,6 +17594,8 @@
- @@ -13435,114 +17879,149 @@
- + Type: + +
-
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + + + + + + + + + + + +
- @@ -13731,7 +18210,7 @@
- Source:
- @@ -14263,7 +18500,7 @@
- Source:
- @@ -14522,8 +18865,6 @@
- @@ -14859,7 +19250,7 @@
- @@ -15130,7 +19627,7 @@
- Source: +
- + + + + + + + + + + + + + + + + + +
- Source: -
- - +
- Source:
- @@ -15548,6 +20183,42 @@
- @@ -15759,7 +20435,7 @@
- Source:
- @@ -15999,13 +20708,13 @@
- @@ -16374,7 +21043,7 @@
- Source: +
- + + + + + + + + + + + + + + + + + +
- Source: -
- - + - + - +
- Source:
- @@ -16960,7 +21687,7 @@
- @@ -17258,13 +22044,13 @@
- @@ -17618,7 +22426,7 @@
- Source:
- @@ -17856,6 +22670,91 @@
- Source:
- @@ -18154,7 +23054,7 @@
- Source:
- @@ -18511,7 +23377,7 @@
- Source:
- @@ -18834,7 +23686,7 @@
- Source:
- @@ -19169,7 +24018,7 @@
- Source:
- @@ -19449,7 +24302,7 @@
- Source:
- @@ -19759,58 +24608,7 @@
- Source:
- @@ -20065,7 +24861,58 @@
- Source:
- @@ -20318,7 +25167,7 @@
- Source:
- @@ -20858,7 +25706,7 @@
- Source:
- @@ -21074,7 +25922,7 @@
- Source:
- @@ -21380,7 +26228,7 @@
- Source:
- @@ -21689,7 +26537,7 @@
- Source:
- @@ -21927,7 +26775,7 @@
- Source: +
- + + + + + + + +
- Source: +
- + + + + + + + +
-
+
+
external:RestClient
+ + +
+ - Source: +
- + + + + + + + +
-
+
+
Object
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ -
+
+
external:RestClient
+ + +
+ - Source: +
- + + + + + + + +
-
+
+
external:RestClient
+ + +
+ - Source: +
- + + + + + + +
- @@ -1054,7 +1202,7 @@
- @@ -1325,7 +1473,7 @@
- @@ -1509,7 +1657,7 @@
- @@ -1806,7 +1954,7 @@
- @@ -2071,7 +2219,7 @@
- @@ -2398,7 +2546,7 @@
- Source:
- @@ -2619,7 +2767,7 @@
- @@ -2837,6 +2985,536 @@
- Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - @@ -3219,7 +3897,7 @@
- @@ -3594,7 +4272,7 @@
- @@ -3859,7 +4537,7 @@
- @@ -4182,7 +4860,7 @@
- @@ -4488,7 +5166,7 @@
- Source:
- @@ -4797,7 +5475,7 @@
- Source:
- @@ -5075,7 +5753,7 @@
- RetryRestClient +
- RolesManager + +
- RulesConfigsManager @@ -153,7 +156,7 @@
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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
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
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
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
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
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
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
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
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
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:
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:
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
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:
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
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
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
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
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
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
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
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
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
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
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
Example
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
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
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
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
blac
clientGra
clientsSource:
connection
customDo
devi
emailPro
emailTe
grantsSource:
guardianSource:
jobsSource:
logsSource:
resour
Type:
+
+
+
+
+
+roles :RolesManager
+
+
+
+
+
+ Simple abstraction for performing CRUD operations on the
+roles endpoint.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
@@ -1696,7 +1771,7 @@ rulesSource:
rulesConf
statsSource:
tenantSource:
ticketsSource:
usersSource:
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
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
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ permission_name
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Name of a permission
@@ -2274,7 +2426,7 @@ Parameters:
- jti
+ resource_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:
Parameters:
- data
+ params
@@ -2522,43 +2676,50 @@ Parameters:
- The email provider data object.
+ params object
-
-
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+ Description
+
+
+
+
- cb
+ id
-function
+String
-
-
- <optional>
-
-
-
-
-
-
-
- Callback function.
+ user_id
@@ -2567,34 +2728,163 @@ Parameters:
+
+
+
+
+
+
+ data
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+ data object containing list of permissions
+
+
+
+
+
+
+ Name
+
-
-
-Returns:
+ Type
-
-
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Array of permission IDs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+ 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
Parameters:
- data
+ params
@@ -2740,7 +3033,143 @@ Parameters:
- The client data object.
+ params object
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ user_id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data object containing list of role IDs
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ 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
Parameters:
- data
+ token
@@ -2958,7 +3390,84 @@ Parameters:
- The client data object.
+ Token data.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ 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
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
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 @@
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:
Parameters:
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Connection data object.
+
+
+
+
+
+
cb
@@ -3866,6 +4414,9 @@ Returns:
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:
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 @@
Parameters:
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The device credential data object.
+
+
+
+
+
+
cb
@@ -4230,6 +4850,9 @@ Returns:
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
Parameters:
-
-
- data
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Resource Server data object.
-
-
-
-
-
-
cb
@@ -4450,9 +5034,6 @@ Returns:
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<
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<
Parameters:
-
-
- data
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- User data.
-
-
-
-
-
-
cb
@@ -4886,9 +5398,6 @@ Returns:
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
- deleteA
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
Parameters:
- params
+ data
@@ -5220,94 +5766,43 @@ Parameters:
- Client parameters.
+ Role data object.
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
+
+
-
- client_id
+ cb
-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
Parameters:
- params
+ data
@@ -5489,58 +5985,7 @@ Parameters:
- Client parameters.
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- 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
Parameters:
- params
+ data
@@ -5758,58 +6203,7 @@ Parameters:
- Connection parameters.
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- 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
+ del
Parameters:
-
-
- params
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Custom Domain parameters.
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- 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:
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
Parameters:
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Client parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ 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:
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
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<
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
Parameters:
-
-
- params
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Rule Configs parameters.
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- 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<
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 @@
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 @@
-
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
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
Parameters:
- cb
+ params
-function
+Object
@@ -9098,8 +9204,6 @@ Parameters:
- <optional>
-
@@ -9110,159 +9214,62 @@ Parameters:
- Callback function.
+ Rule Configs parameters.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
+
+
+
+
-
-
-
-
-
-
-
+ Type
-
-
-Example
-
- management.getActiveUsersCount(function (err, usersCount) {
- if (err) {
- // Handle error.
- }
-
- console.log(usersCount);
-});
-
-
-
-
-
-
-
-
-
- getBlacklistedTokens(cbopt) → {Promise|undefined}
-
-
-
-
-
-
- Get all blacklisted tokens.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Description
+
+
+
-
-
+
+
+ key
+
+
+
+
+String
+
+
+
+
+
+ Rule Configs key.
+
+
+
- Parameters:
+
+
-
-
-
-
- Name
-
-
- Type
-
-
- Attributes
-
-
-
-
- Description
-
-
+
+
+
-
@@ -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:
Parameters:
- Client parameters.
+ The user data object..
@@ -9498,7 +9509,7 @@ Parameters:
- client_id
+ id
@@ -9515,7 +9526,7 @@ Parameters:
- Application client ID.
+ The user id.
@@ -9559,7 +9570,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -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
Parameters:
- <optional>
-
@@ -9743,7 +9752,7 @@ Parameters:
- Client Grants parameters.
+ Data object.
@@ -9757,8 +9766,6 @@ Parameters:
Type
- Attributes
-
@@ -9771,34 +9778,24 @@ Parameters:
- per_page
+ id
-Number
+String
-
-
- <optional>
-
-
-
-
-
-
-
- Number of results per page.
+ The user id.
@@ -9807,34 +9804,24 @@ Parameters:
- page
+ provider
-Number
+String
-
-
- <optional>
-
-
-
-
-
-
-
- Page number, zero indexed.
+ Multifactor provider.
@@ -9878,7 +9865,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -9929,20 +9916,14 @@ Returns:
Example
-
-
- // 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
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
-
-
-
-
-
- Object containing client information.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getClients(paramsopt, cbopt) → {Promise|undefined}
-
-
-
-
-
-
- Get all Auth0 clients.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ getClients<
Parameters:
- <optional>
-
@@ -10178,7 +10053,7 @@ Parameters:
- Clients parameters.
+ Data object.
@@ -10192,8 +10067,6 @@ Parameters:
Type
- Attributes
-
@@ -10206,34 +10079,24 @@ Parameters:
- per_page
+ id
-Number
+String
-
-
- <optional>
-
-
-
-
-
-
-
- Number of results per page.
+ The user id.
@@ -10242,34 +10105,24 @@ Parameters:
- page
+ provider
-Number
+String
-
-
- <optional>
-
-
-
-
-
-
-
- Page number, zero indexed.
+ Multifactor provider.
@@ -10313,7 +10166,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -10364,20 +10217,14 @@ Returns:
Example
-
-
- // 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
Parameters:
- params
+ data
@@ -10503,7 +10350,7 @@ Parameters:
- Connection parameters.
+ Users export data.
@@ -10517,6 +10364,8 @@ Parameters:
Type
+ Attributes
+
@@ -10529,7 +10378,7 @@ Parameters:
- id
+ connection_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>
+
-
-
+
+
+
+
+
+ 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:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getActiveUsersCount(function (err, usersCount) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(usersCount);
+});
+
+
+
+
+
+
+
+
+
+
+ getBlacklistedTokens(cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get all blacklisted tokens.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getBlacklistedTokens(function (err, tokens) {
+ console.log(tokens.length);
+});
+
+
+
+
+
+
+
+
+
+
+ getClient(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get an Auth0 client.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Client parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ client_id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Application client ID.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Client Grants parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Number of results per page.
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Page number, zero indexed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+
+
+ // 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,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Object containing client information.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getClients(paramsopt, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get all Auth0 clients.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Clients parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Number of results per page.
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Page number, zero indexed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+
+
+ // 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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Connection parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Connection ID.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getConnection({ id: CONNECTION_ID }, function (err, connection) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(connection);
+});
+
+
+
+
+
+
+
+
+
+
+ getConnections(paramsopt, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get all connections.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Connections params.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Number of results per page.
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Page number, zero indexed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+
+
+ // 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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Custom Domain parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Custom Domain ID.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err, customDomain) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(customDomain);
+});
+
+
+
+
+
+
+
+
+
+
+ getCustomDomains() → {Promise|undefined}
+
+
+
+
+
+
+ Get all Auth0 CustomDomains.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getCustomDomains(function (err, customDomains) {
+ console.log(customDomains.length);
+});
+
+
+
+
+
+
+
+
+
+
+ getDailyStats(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get the daily stats.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Stats parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ from
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The first day in YYYYMMDD format.
+
+
+
+
+
+
+
+
+ to
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The last day in YYYYMMDD format.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getDeviceCredentials(function (err, credentials) {
+ console.log(credentials.length);
+});
+
+
+
+
+
+
+
+
+
+
+ getEmailProvider(cbopt, paramsopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get the email provider.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Clients parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ 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:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getEmailProvider(function (err, provider) {
+ console.log(provider.length);
+});
+
+
+
+
+
+
+
+
+
+
+ getGrants(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get all Auth0 Grants.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Grants parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ 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:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The Guardian enrollment data object.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The Guardian enrollment id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getGuardianEnrollments({ id: USER_ID }, function (err, enrollments) {
+ console.log(enrollments);
+});
+
+
+
+
+
+
+
+
+
+
+ getJob(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get a job by its ID.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Job parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Job ID.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
-
+
+
+
-
+
+
+ cb
+
-
+
+
+
+function
-
-
+
+
-
+
+
+
+ <optional>
+
-
+
-
-
+
-
+
-
+
+ Callback function.
+
+
+
-
-
-
-
-
-
-
-
+
+
@@ -11357,8 +15780,20 @@ Returns:
Example
- management.getCustomDomains(function (err, customDomains) {
- console.log(customDomains.length);
+ // 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
Parameters:
-
-
-
-
-
-
- Name
-
-
- Type
-
-
- Attributes
-
-
-
+
- Description
-
-
+
-
+
-
-
- params
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
-
- Stats parameters.
-
-
+ Parameters:
+
@@ -11498,6 +15880,8 @@ Parameters:
Type
+ Attributes
+
@@ -11510,7 +15894,7 @@ Parameters:
- from
+ roleId
@@ -11523,45 +15907,21 @@ Parameters:
-
-
-
-
- The first day in YYYYMMDD format.
+
-
-
-
-
-
-
-
- to
-
-
-
-
+ <optional>
-String
+
-
-
-
+
+
- The last day in YYYYMMDD format.
-
-
-
-
-
-
-
-
+ Id of the role
@@ -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.
- }
+
+
+ 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
Parameters:
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Resource Server parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Resource Server ID.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
cb
@@ -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
Parameters:
- cb
+ params
-function
+Object
@@ -11966,22 +16414,41 @@ Parameters:
- Callback function.
+ Resource Servers parameters.
-
-
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+ Description
+
+
+
+
- params
+ per_page
-Object
+Number
@@ -12002,35 +16469,16 @@ Parameters:
- Clients parameters.
+ Number of results per page.
-
-
-
-
-
-
- Name
-
-
- Type
-
-
- Attributes
-
-
-
-
- Description
-
-
+
+
-
- fields
+ page
@@ -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.
+
+
+
+
+
+
+
+
@@ -12066,13 +16522,13 @@ Parameters:
- include_fields
+ cb
-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);
+ // 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:
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 @@
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);
+ // 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:
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:
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}'
+ // 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:
getLogParameters:
-
-
-
-
-
- Name
-
- Type
-
- Attributes
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
- Description
-
-
-
+
-
-
- params
-
-
-
-
-Object
+
+Example
-
-
+ management.getRulesConfigs(function (err, rulesConfigs) {
+ if (err) {
+ // Handle error.
+ }
-
-
-
+ // Get Rules Configs.
+});
-
+
-
-
+
+
+
-
+
-
- Log parameters.
-
-
+ getTenantSettings(cbopt) → {Promise|undefined}
-
-
-
-
- Name
-
+
- Type
-
-
+
+ Get the tenant settings..
+
- Description
-
-
-
+
+
+
+
+
-
-
- id
-
+
-
-
-
-String
+
+
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
-
+ Type
-
- Event ID.
-
-
-
+
+ Attributes
+
-
-
-
+
-
-
-
+ Description
+
+
+
@@ -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:
Parameters:
- params
+ data
@@ -13746,8 +18225,6 @@ Parameters:
- <optional>
-
@@ -13758,278 +18235,50 @@ Parameters:
- Logs params.
+ The user data object.
-
-
- Name
-
-
- Type
-
-
- Attributes
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- 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>
-
+
+
+ Name
+
-
+ Type
-
-
-
+
-
+
-
- true if the fields specified are to be included in the result, false otherwise.
-
-
-
+ Description
+
+
+
- include_totals
+ id
-Boolean
+String
-
-
- <optional>
-
-
-
-
-
-
-
- true if a query summary must be included in the result, false otherwise. Default false
+ The user id.
@@ -14124,20 +18373,8 @@ Returns:
Example
-
-
- // 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
Parameters:
- 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;
@@ -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
Parameters:
- <optional>
-
@@ -14534,7 +18875,7 @@ Parameters:
- Resource Servers parameters.
+ Get permissions data.
@@ -14548,8 +18889,6 @@ Parameters:
Type
- Attributes
-
@@ -14562,28 +18901,44 @@ Parameters:
- per_page
+ id
-Number
+String
-
-
- <optional>
-
+
+
+
+ User id.
+
+
+
+
+
+
+ per_page
+
+
+
+
-
+Number
+
+
+
+
+
@@ -14611,21 +18966,63 @@ Parameters:
-
+
+
+
+
+ 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;
@@ -14720,20 +19117,14 @@ Returns:
Example
-
-
- // 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:
Parameters:
- 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;
@@ -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:
Parameters:
- Rules parameters.
+ Users params.
@@ -15156,6 +19653,42 @@ Parameters:
+
+
+ search_engine
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ The version of the search engine to use.
+
+
+
+
+
+
per_page
@@ -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
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ 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.
+ 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
Parameters:
+
+
+ roleId
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Id of the role
+
+
+
+
+
+
cb
@@ -15626,14 +20297,18 @@ Returns:
-Example
+Examples
- management.getSettings(function (err, settings) {
- if (err) {
- // Handle error.
- }
+ var params = { id :'ROLE_ID'};
- console.log(settings);
+
+
+ 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:
Parameters:
- The user data object.
+ Users import data.
@@ -15785,7 +20461,7 @@ Parameters:
- id
+ connectionId
@@ -15802,7 +20478,33 @@ Parameters:
- The user id.
+ Connection for the users insertion.
+
+
+
+
+
+
+
+
+ users
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Path to the users data file.
@@ -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
Parameters:
- params
+ userId
-Object
+String
@@ -16024,111 +20733,67 @@ Parameters:
- Get logs data.
+ ID of the primary user.
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
+
+
-
- id
+ params
-String
+Object
-
-
-
-
- User id.
+
-
-
-
-
-
-
- per_page
-
-
-
-
-Number
-
-
-
-
+
+
- Number of results per page.
-
-
-
-
-
-
-
-
- page
-
-
-
-
+ Secondary user data.
-Number
-
+
-
-
+
+
+
+
+ Name
+
-
+ Type
-
+
-
- Page number, zero indexed.
-
-
-
+
+
+ Description
+
+
+
- sort
+ user_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.
@@ -16154,13 +20819,13 @@ Parameters:
- include_totals
+ connection_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.
@@ -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:
Parameters:
- params
+ data
@@ -16389,8 +21058,6 @@ Parameters:
- <optional>
-
@@ -16401,7 +21068,7 @@ Parameters:
- Users params.
+ The user data object.
@@ -16415,8 +21082,6 @@ Parameters:
Type
- Attributes
-
@@ -16429,106 +21094,24 @@ Parameters:
- search_engine
-
-
-
-
-
-Number
-
-
-
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
- The version of the search engine to use.
-
-
-
-
-
-
-
-
- per_page
-
-
-
-
-
-Number
-
-
-
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
- Number of results per page.
-
-
-
-
-
-
-
-
- page
+ id
-Number
+String
-
-
- <optional>
-
-
-
-
-
-
-
- Page number, zero indexed.
+ The user id.
@@ -16623,21 +21206,8 @@ Returns:
Example
-
-
- // 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
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params.id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID of the Role.
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
-
-
+
+
-
+
+
+
-
+
-
+
+
+
-
+
-
+
+ permissions data
+
+
-
+
+
+
+
+ Name
+
-
+ Type
-
- Description
+
+
+
-
-
-
+
+
+ permissions
+
+
+
+
+String
+
+
+
+
- Parameters:
-
+
+ Array of permissions
+
+
@@ -16724,8 +21424,6 @@ Parameters:
Type
- Attributes
-
@@ -16738,7 +21436,7 @@ Parameters:
- email
+ permission_name
@@ -16751,21 +21449,53 @@ Parameters:
-
-
- <optional>
-
+
+
+
+ Name of a permission
+
+
+
+
+
+
+
+ resource_server_identifier
+
+
+
-
+String
+
+
+
+
+
- Email Address of users to locate
+ Identifier for a resource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -16852,13 +21582,11 @@ Returns:
Example
-
-
- 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
Parameters:
- data
+ params
@@ -16985,7 +21712,7 @@ Parameters:
- Users import data.
+ params object
@@ -17011,7 +21738,7 @@ Parameters:
- connectionId
+ id
@@ -17028,7 +21755,15 @@ Parameters:
- Connection for the users insertion.
+ user_id
+
+
+
+
+
+
+
+
@@ -17037,7 +21772,7 @@ Parameters:
- users
+ data
@@ -17050,11 +21785,62 @@ Parameters:
+
+
+
+
+
+
+
+
- Path to the users data file.
+ data object containing list of permission IDs
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Array 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:
Parameters:
- userId
+ params
-String
+Object
@@ -17283,7 +22069,58 @@ Parameters:
- ID of the primary user.
+ params object
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ user_id
+
+
+
+
+
+
+
+
@@ -17292,13 +22129,13 @@ Parameters:
- params
+ data
-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_id
+ roles
@@ -17386,7 +22197,7 @@ Parameters:
- ID of the connection to be used.
+ Array of role IDs
@@ -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:
Parameters:
- The user data object.
+ User data object.
@@ -17644,7 +22452,7 @@ Parameters:
- id
+ user_id
@@ -17661,7 +22469,7 @@ Parameters:
- The user id.
+ ID of the user to be verified.
@@ -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 @@
Parameters:
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Rule Config parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Rule Config key.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
data
@@ -17883,7 +22782,7 @@ Parameters:
- User data object.
+ Rule Config Data parameters.
@@ -17909,7 +22808,7 @@ Parameters:
- user_id
+ value
@@ -17926,7 +22825,7 @@ Parameters:
- ID of the user to be verified.
+ Rule Config Data value.
@@ -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
Parameters:
- Rule Config parameters.
+ Linked users data.
@@ -18180,7 +23080,7 @@ Parameters:
- key
+ id
@@ -18197,15 +23097,7 @@ Parameters:
- Rule Config key.
-
-
-
-
-
-
-
-
+ Primary user ID.
@@ -18214,58 +23106,33 @@ Parameters:
- data
+ provider
-Object
+String
-
-
-
-
-
-
-
-
- Rule Config Data parameters.
+ Identity provider in use.
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
+
+
-
- value
+ user_id
@@ -18282,7 +23149,7 @@ Parameters:
- Rule Config Data value.
+ Secondary user ID.
@@ -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
Parameters:
- Linked users data.
+ The user data object..
@@ -18537,33 +23403,7 @@ Parameters:
- id
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- Primary user ID.
-
-
-
-
-
-
-
-
- provider
+ id
@@ -18580,7 +23420,15 @@ Parameters:
- Identity provider in use.
+ The user id.
+
+
+
+
+
+
+
+
@@ -18589,32 +23437,32 @@ Parameters:
- user_id
+ metadata
-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
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
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
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
Parameters:
- Connection parameters.
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- 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
Parameters:
- Email provider parameters.
+ Resource Server parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ 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
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<
u
updateUser<
upd
ver
Example
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:
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
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:
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)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ options
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+ The client options.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
+
+
+
+
+
+(inner) clientOptions :Object
+
+
+
+
+
+ Options object for the Rest Client instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ addPermissions(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Add permissions in a role
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params.id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID of the Role.
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ permissions data
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Array of permissions
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ permission_name
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Name of a permission
+
+
+
+
+
+
+
+
+ resource_server_identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Identifier for a resource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ params object
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ user_id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data object containing list of role IDs
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ roles
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Array of role IDs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params.id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID of the Role.
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ permissions data
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Array of permissions
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ permission_name
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Name of a permission
+
+
+
+
+
+
+
+
+ resource_server_identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Identifier for a resource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Role data object.
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.roles.create(data, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Role created.
+});
+
+
+
+
+
+
+
+
+
+
+ delete(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Delete an existing role.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Role parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Role ID.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.roles.delete({ id: ROLE_ID }, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Role deleted.
+});
+
+
+
+
+
+
+
+
+
+
+ get(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get an Auth0 role.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Role parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Role ID.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Roles parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Number of results per page.
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Page number, zero indexed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+
+
+ // 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ email
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Email address of user(s) to find
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Examples
+
+ var params = {id : 'ROLE_ID'}
+
+
+
+ management.roles.getPermissions( {id : 'ROLE_ID'}, function (err, permissions) {
+ console.log(permissions);
+});
+
+
+
+
+
+
+
+
+
+
+ getUsers(emailopt, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get Users in a Role
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ email
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Email address of user(s) to find
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Examples
+
+ params = {id : 'ROLE_ID'}
+
+
+
+ management.roles.getUsers( {id : 'ROLE_ID'}, function (err, users) {
+ console.log(users);
+});
+
+
+
+
+
+
+
+
+
+
+ removePermissions(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Remove permissions from a role
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params.id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID of the Role.
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ permissions data
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Array of permissions
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ permission_name
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Name of a permission
+
+
+
+
+
+
+
+
+ resource_server_identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Identifier for a resource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ params object
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ user_id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data object containing list of role IDs
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ roles
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Array of role IDs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Role parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Role ID.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Updated role data.
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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'
+});
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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
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
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
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
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
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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
+
+
+
+
+
+(inner) userRolesClient :external:RestClient
+
+
+
+
+
+ Provides an abstraction layer for CRD on roles for a user
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -836,7 +984,7 @@ createSource:
deleteSource:
deleteAllSource:
Source:
getSource:
getAllSource:
getByEmail<
Source:
Example
+
+
+
+
+ getPermissions(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get a list of permissions for a user.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.users.getRoles({ id: USER_ID }, function (err, roles) {
+ console.log(roles);
+});
+
+
+
+
+
+
@@ -2884,7 +3562,7 @@ linkSource:
logsSource:
Source:
unlinkSource:
updateSource:
upda
upd
Example
diff --git a/docs/module-management.html b/docs/module-management.html
index 7535febd0..59dfc7588 100644
--- a/docs/module-management.html
+++ b/docs/module-management.html
@@ -24,7 +24,7 @@
@@ -110,6 +110,9 @@ Classes
Classes
diff --git a/docs/module-utils.html b/docs/module-utils.html
index 5f35d0d26..c9cd94e0a 100644
--- a/docs/module-utils.html
+++ b/docs/module-utils.html
@@ -24,7 +24,7 @@
@@ -339,7 +339,7 @@ (static)
diff --git a/docs/utils.js.html b/docs/utils.js.html
index d73697cdf..dcd265d5d 100644
--- a/docs/utils.js.html
+++ b/docs/utils.js.html
@@ -24,7 +24,7 @@
@@ -124,7 +124,7 @@ utils.js
diff --git a/package.json b/package.json
index 341b38cbc..c9118d3e7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "auth0",
- "version": "2.16.0",
+ "version": "2.17.0",
"description": "SDK for Auth0 API v2",
"main": "src/index.js",
"files": ["src"],
License
This project is licensed under the MIT license. See the
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 @@
Simple abstraction for performing CRUD operations on the
+roles endpoint. Blacklist a new token. Add permissions in a role ID of the Role. Token data. permissions data Audience (your app client ID). Array of permissions Name of a permission The JWT ID claim. Identifier for a resource Configure the email provider. Asign permissions to a user The email provider data object. params object Callback function. user_id data object containing list of permissions Array of permission IDs Callback function. Create an Auth0 client. Asign roles to a user The client data object. params object user_id data object containing list of role IDs Array of role IDs Create an Auth0 client grant. Blacklist a new token. The client data object. Token data. Audience (your app client ID). The JWT ID claim. Create a new connection. Configure the email provider. Connection data object. The email provider data object. Create an Auth0 Custom Domain. Create an Auth0 client. The custom domain data object. The client data object. Create an Auth0 credential. Create an Auth0 client grant. The device credential data object. The client data object. Create an email verification ticket. Create a new connection. Connection data object. Create a Guardian enrollment ticket. Create an Auth0 Custom Domain. The custom domain data object. Create a new password change ticket. Create an Auth0 credential. The device credential data object. Create a new resource server. Create an email verification ticket. Resource Server data object. Create a new rule. Create a Guardian enrollment ticket. Rule data object. Create a new user. Create a new password change ticket. User data. Delete all users. Create a new resource server. Resource Server data object. Callback function Callback function. Delete an Auth0 client. Create a new role. Client parameters. Role data object. Application client ID. Callback function. Callback function. Delete an Auth0 client grant. Create a new rule. Client parameters. Client grant ID. Rule data object. Delete an existing connection. Create a new user. Connection parameters. Connection ID. User data. Delete a Custom Domain. Delete all users. Custom Domain parameters. Custom Domain ID. Callback function. Callback function Delete an Auth0 device credential. Delete an Auth0 client. Credential parameters. Client parameters. Device credential ID. Application client ID. Delete email provider. Delete an Auth0 client grant. Client parameters. Client grant ID. Delete a user's Guardian enrollment. Delete an existing connection. The Guardian enrollment data object. Connection parameters. The Guardian enrollment id. Connection ID. Delete an existing resource server. Delete a Custom Domain. Resource Server parameters. Custom Domain parameters. Resource Server ID. Custom Domain ID. Delete an existing rule. Delete an Auth0 device credential. Rule parameters. Credential parameters. Rule ID. Device credential ID. Delete rules config. Delete email provider. Rule Configs parameters. Rule Configs key. Delete a user by its id. Delete a user's Guardian enrollment. The user data object.. The Guardian enrollment data object. The user id. The Guardian enrollment id. Callback function Callback function. Delete a multifactor provider for a user. Delete an existing resource server. Data object. Resource Server parameters. The user id. Multifactor provider. Resource Server ID. Callback function Callback function. Delete a multifactor provider for a user. Delete an existing role. Data object. Role parameters. The user id. Multifactor provider. Role ID. Callback function Callback function. Export all users to a file using a long running job. Delete an existing rule. Users export data. Rule parameters. The connection id of the connection from which users will be exported The format of the file. Valid values are: "json" and "csv". Limit the number of records. A list of fields to be included in the CSV. If omitted, a set of predefined fields will be exported. Rule ID. Get a the active users count. Delete rules config. Callback function. Rule Configs parameters. Get all blacklisted tokens. Rule Configs key. Get an Auth0 client. Delete a user by its id. Client parameters. The user data object.. Application client ID. The user id. Callback function. Callback function Get all Auth0 Client Grants. Delete a multifactor provider for a user. Client Grants parameters. Data object. Number of results per page. The user id. Page number, zero indexed. Multifactor provider. Callback function. Callback function Return an object with information about the current client, Delete a multifactor provider for a user. Object containing client information. Get all Auth0 clients. Clients parameters. Data object. Number of results per page. The user id. Page number, zero indexed. Multifactor provider. Callback function. Callback function Get an Auth0 connection. Export all users to a file using a long running job. Connection parameters. Users export data. Connection ID. The connection id of the connection from which users will be exported Callback function. The format of the file. Valid values are: "json" and "csv". Limit the number of records. A list of fields to be included in the CSV. If omitted, a set of predefined fields will be exported. Callback function. Get a the active users count. Callback function. Get all blacklisted tokens. Callback function. Get an Auth0 client. Client parameters. Application client ID. Callback function. Get all Auth0 Client Grants. Client Grants parameters. Number of results per page. Page number, zero indexed. Callback function. Return an object with information about the current client, Object containing client information. Get all Auth0 clients. Clients parameters. Number of results per page. Page number, zero indexed. Callback function. Get an Auth0 connection. Connection parameters. Connection ID. Callback function. Get all connections. Connections params. Number of results per page. Page number, zero indexed. Callback function. Get a Custom Domain. Custom Domain parameters. Custom Domain ID. Callback function. Get all Auth0 CustomDomains. Get the daily stats. Stats parameters. The first day in YYYYMMDD format. The last day in YYYYMMDD format. Callback function. Get all Auth0 credentials. Callback function. Get the email provider. Callback function. Clients 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. true if the fields specified are to be excluded from the result, false otherwise (defaults to true) Get all Auth0 Grants. Grants parameters. Number of results per page. Page number, zero indexed. true if a query summary must be included in the result, false otherwise. Default false; The user_id of the grants to retrieve. The client_id of the grants to retrieve. The audience of the grants to retrieve. Callback function. Get a single Guardian enrollment. The Guardian enrollment data object. The Guardian enrollment id. Callback function. Get a list of a user's Guardian enrollments. The user data object. The user id. Callback function. Get a job by its ID. Job parameters. Job ID. Callback function. Callback function. Get the daily stats. Get permissions for a given role Stats parameters. The first day in YYYYMMDD format. The last day in YYYYMMDD format. Id of the role Get all Auth0 credentials. Get a Resource Server. Resource Server parameters. Resource Server ID. Get the email provider. Get all resource servers. Callback function. Resource Servers parameters. Clients parameters. Number of results per page. 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. true if the fields specified are to be excluded from the result, false otherwise (defaults to true) Callback function. Get all Auth0 Grants. Get an Auth0 role. Grants parameters. Role parameters. Number of results per page. Page number, zero indexed. true if a query summary must be included in the result, false otherwise. Default false; The user_id of the grants to retrieve. The client_id of the grants to retrieve. The audience of the grants to retrieve. Role ID. Get a single Guardian enrollment. Get all roles. The Guardian enrollment data object. Roles parameters. Number of results per page. The Guardian enrollment id. Page number, zero indexed. Get a list of a user's Guardian enrollments. Get an Auth0 rule. The user data object. Rule parameters. The user id. Rule ID. Get a job by its ID. Get all rules. Job parameters. Rules parameters. Job ID. Number of results per page. Page number, zero indexed. Get an Auth0 log. Get rules config. Log parameters. Get the tenant settings.. Event ID. Get all logs. Get a user by its id. Logs params. The user data object. Search Criteria using Query String Syntax Page number. Zero based The amount of entries per page The field to use for sorting. A comma separated list of fields to include or exclude true if the fields specified are to be included in the result, false otherwise. true if a query summary must be included in the result, false otherwise. Default false The user id. Get a Resource Server. Get user's log events. Resource Server parameters. Get logs data. Resource Server ID. User id. Number of results per page. Page number, zero indexed. The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1. true if a query summary must be included in the result, false otherwise. Default false; Get all resource servers. Get user's permissions Resource Servers parameters. Get permissions data. User id. Page number, zero indexed. The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1. Page number, zero indexed. true if a query summary must be included in the result, false otherwise. Default false; Get an Auth0 rule. Get user's roles Rule parameters. Get roles data. Rule ID. User id. Number of results per page. Page number, zero indexed. The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1. true if a query summary must be included in the result, false otherwise. Default false; Get all rules. Get all users. Rules parameters. Users params. The version of the search engine to use. Get rules config. Get users for a given email address Email Address of users to locate Callback function. Get the tenant settings.. Get users in a given role Id of the role 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. The user data object. Users import data. The user id. Connection for the users insertion. Path to the users data file. Get user's log events. Link the user with another account. Get logs data. ID of the primary user. User id. Number of results per page. Secondary user data. Page number, zero indexed. 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. true if a query summary must be included in the result, false otherwise. Default false; ID of the connection to be used. Get all users. Generate new Guardian recovery code. Users params. The user data object. The version of the search engine to use. Number of results per page. Page number, zero indexed. The user id. Get users for a given email address Remove permissions from a role ID of the Role. permissions data Array of permissions Name of a permission Email Address of users to locate Identifier for a resource 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 Users import data. params object Connection for the users insertion. user_id Path to the users data file. data object containing list of permission IDs Array of permission IDs Link the user with another account. Remove roles from a user ID of the primary user. params object user_id Secondary user data. data object containing list of role IDs ID of the user to be linked. ID of the connection to be used. Array of role IDs Generate new Guardian recovery code. Send a verification email to a user. The user data object. User data object. The user id. ID of the user to be verified. Send a verification email to a user. Set a new rules config. Rule Config parameters. Rule Config key. User data object. Rule Config Data parameters. ID of the user to be verified. Rule Config Data value. Set a new rules config. Unlink the given accounts. Rule Config parameters. Linked users data. Rule Config key. Primary user ID. Rule Config Data parameters. Identity provider in use. Rule Config Data value. Secondary user ID. Unlink the given accounts. Update the app metadata for a user. Linked users data. The user data object.. Primary user ID. Identity provider in use. The user id. Secondary user ID. New app metadata. Callback function. Callback function Update the app metadata for a user. Update an Auth0 client. The user data object.. Client parameters. The user id. Application client ID. New app metadata. Updated client data. Callback function Callback function. Update an Auth0 client. Update an Auth0 client grant. Application client ID. Client grant ID. Update an Auth0 client grant. Update an existing connection. Client parameters. Connection parameters. Client grant ID. Connection ID. Updated client data. Updated connection data. Update an existing connection. Update the email provider. Connection parameters. Connection ID. Email provider parameters. Updated connection data. Updated email provider data. Update the email provider. Update an existing resource server. Email provider parameters. Resource Server parameters. Resource Server ID. Updated email provider data. Updated Resource Server data. Update an existing resource server. Update an existing role. Resource Server parameters. Role parameters. Resource Server ID. Role ID. Updated Resource Server data. Updated role data. RolesManager
+The role class provides a simple abstraction for performing CRUD operations
+on Auth0 RolesManager. The client options. The URL of the API. Headers to be included in all requests. Retry Policy Config Provides an abstraction layer for performing CRUD operations on
+Auth0 RolesManagers. Options object for the Rest Client instance. Add permissions in a role ID of the Role. permissions data Array of permissions Name of a permission Identifier for a resource Callback function. Assign roles to a user params object user_id data object containing list of role IDs Array of role IDs Callback function. Assign users to a role ID of the Role. permissions data Array of permissions Name of a permission Identifier for a resource Callback function. Create a new role. Role data object. Callback function. Delete an existing role. Role parameters. Role ID. Callback function. Get an Auth0 role. Role parameters. Role ID. Callback function. Get all roles. Roles parameters. Number of results per page. Page number, zero indexed. Callback function. Get Permissions in a Role Email address of user(s) to find Callback function. Get Users in a Role Email address of user(s) to find Callback function. Remove permissions from a role ID of the Role. permissions data Array of permissions Name of a permission Identifier for a resource Callback function. Remove roles from a user params object user_id data object containing list of role IDs Array of role IDs Callback function. Update an existing role. Role parameters. Role ID. Updated role data. Callback function. Provides an abstraction layer for CRD on permissions directly on a user Provides an abstraction layer for CRD on roles for a user Get a list of permissions for a user. The user data object. The user id. Callback function. Get a list of roles for a user. The user data object. The user id. Callback function.index.js
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 @@
management/BlacklistedTokensManager.js
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 @@
management/ClientGrantsManager.js
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 @@
management/ClientsManager.js
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 @@
management/ConnectionsManager.js
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 @@
management/CustomDomainsManager.js
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 @@
management/DeviceCredentialsManager.js
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 @@
management/EmailProviderManager.js
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 @@
management/EmailTemplatesManager.js
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 @@
management/GrantsManager.js
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 @@
management/GuardianManager.js
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 @@
management/JobsManager.js
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 @@
management/LogsManager.js
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 @@
management/ManagementTokenProvider.js
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 @@
management/ResourceServersManager.js
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
+
+
+
+
+
+
+
+
+ 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;
+
+
+
+
+
+
+
+
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 @@
management/RulesConfigsManager.js
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 @@
management/RulesManager.js
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 @@
management/StatsManager.js
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 @@
management/TenantManager.js
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 @@
management/TicketsManager.js
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 @@
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
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 @@
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
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 @@
Examples
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 @@
Example
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 @@
Parameters:
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 @@
Returns:
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 @@
Examples
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 @@
Parameters:
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 @@
Example
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 @@
Classes
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 @@
Example
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 @@
Example
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 @@
Example
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 @@
Example
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 @@
Example
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 @@
Example
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 @@
Example
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 @@
Example
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 @@
deleteGran
Example
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 @@
Example
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 @@
Example
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 @@
Example
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 @@
new M
blac
clientGra
clientsSource:
connection
customDo
devi
emailPro
emailTe
grantsSource:
guardianSource:
jobsSource:
logsSource:
resour
Type:
+roles :RolesManager
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
rulesSource:
rulesConf
statsSource:
tenantSource:
ticketsSource:
usersSource:
Methods
- blacklistToken(token, cbopt) → {Promise|undefined}
+ addPermissionsInRole(data, cbopt) → {Promise|undefined}
blackli
Parameters:
-
+
+
+
+
+ token
+
+
+ params.id
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
@@ -2222,7 +2331,7 @@ Parameters:
- Parameters:
-
@@ -2386,17 +2546,11 @@
+ aud
permissions
@@ -2265,7 +2374,50 @@ Parameters:
-
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
@@ -2274,7 +2426,7 @@
+
+
+ permission_name
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
Parameters:
-
+
+
+
+
+ jti
resource_server_identifier
@@ -2291,7 +2443,15 @@ Parameters:
-
+ 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);
});
Example
- configureEmailProvider(data, cbopt) → {Promise|undefined}
+ assignPermissionsToUser(params, data, cbopt) → {Promise|undefined}
Source:
Parameters:
-
+
+
+
+ data
params
@@ -2522,43 +2676,50 @@ Parameters:
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Name
+
+
+ Type
+
+
+
+
+ Description
+
-
@@ -2567,34 +2728,163 @@
+ cb
id
-
- function
+String
-
- <optional>
-
-
-
-
-
-
-
-
Parameters:
+
+
+
+
+
+
+
+ data
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
-
-Returns:
+ Type
-
-
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
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.
});
Example
- createClient(data, cbopt) → {Promise|undefined}
+ assignRolestoUser(params, data, cbopt) → {Promise|undefined}
createCli
Parameters:
-
+
+
+
+
+ data
params
@@ -2740,7 +3033,143 @@ Parameters:
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
@@ -2827,12 +3256,15 @@
+
+
+ data
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ roles
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+ 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.
});
Example
- createClientGrant(data, cbopt) → {Promise|undefined}
+ blacklistToken(token, cbopt) → {Promise|undefined}
crea
Parameters:
-
@@ -3045,12 +3554,17 @@
+ data
token
@@ -2958,7 +3390,84 @@ Parameters:
-
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ aud
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jti
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+ 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.
});
Example
- createConnection(data, cbopt) → {Promise|undefined}
+ configureEmailProvider(data, cbopt) → {Promise|undefined}
creat
Parameters:
-
@@ -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.
});
Example
- createCustomDomain(data, cbopt) → {Promise|undefined}
+ createClient(data, cbopt) → {Promise|undefined}
cre
Parameters:
-
@@ -3481,12 +3995,12 @@ Returns:
Example
- management.createCustomDomain(data, function (err) {
+
management.createClient(data, function (err) {
if (err) {
// Handle error.
}
- // CustomDomain created.
+ // Client created.
});
Example
- createDevicePublicKey(data, cbopt) → {Promise|undefined}
+ createClientGrant(data, cbopt) → {Promise|undefined}
Parameters:
-
@@ -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.
});
Example
- createEmailVerificationTicket(cbopt) → {Promise}
+ createConnection(data, cbopt) → {Promise|undefined}
Source:
Parameters:
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3866,6 +4414,9 @@ cb
Returns:
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.
});
Example
- createGuardianEnrollmentTicket(cbopt) → {Promise|undefined}
+ createCustomDomain(data, cbopt) → {Promise|undefined}
Source:
Parameters:
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -4067,8 +4649,12 @@ cb
Returns:
Example
- management.createGuardianEnrollmentTicket(function (err, ticket) {
- console.log(ticket);
+
management.createCustomDomain(data, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // CustomDomain created.
});
Example
- createPasswordChangeTicket(cbopt) → {Promise}
+ createDevicePublicKey(data, cbopt) → {Promise|undefined}
Parameters:
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -4230,6 +4850,9 @@ cb
Returns:
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.
});
Example
- createResourceServer(data, cbopt) → {Promise|undefined}
+ createEmailVerificationTicket(cbopt) → {Promise}
c
Parameters:
-
-
-
-
-
-
-
-
- data
-
-
-
-
-
- Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -4450,9 +5034,6 @@ cb
Returns:
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.
});
Example
- createRule(data, cbopt) → {Promise|undefined}
+ createGuardianEnrollmentTicket(cbopt) → {Promise|undefined}
createRule<
Parameters:
-
-
-
-
-
-
-
-
- data
-
-
-
-
-
- Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -4685,12 +5235,8 @@ cb
Returns:
Example
- management.createRule(data, function (err) {
- if (err) {
- // Handle error.
- }
-
- // Rule created.
+
management.createGuardianEnrollmentTicket(function (err, ticket) {
+ console.log(ticket);
});
Example
- createUser(data, cbopt) → {Promise|undefined}
+ createPasswordChangeTicket(cbopt) → {Promise}
createUser<
Parameters:
-
-
-
-
-
-
-
-
- data
-
-
-
-
-
- Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
@@ -4886,9 +5398,6 @@ cb
Returns:
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.
});
Example
- deleteAllUsers(cbopt) → {Promise|undefined}
+ createResourceServer(data, cbopt) → {Promise|undefined}
deleteA
-
deleteA
Parameters:
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -5089,12 +5635,12 @@
@@ -5038,7 +5584,7 @@ cb
Parameters:
-
Returns:
Example
- management.deleteAllUsers(function (err) {
+
management.createResourceServer(data, function (err) {
if (err) {
// Handle error.
}
- // Users deleted
+ // Resource Server created.
});
Example
- deleteClient(params, cbopt) → {Promise|undefined}
+ createRole(data, cbopt) → {Promise|undefined}
deleteCli
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Parameters:
-
-
-
-
-
+ params
data
@@ -5220,94 +5766,43 @@ Parameters:
-
-
-
-
-
-
-
-
-
-
+
+
-
Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
+ client_id
cb
-
+ String
+function
+
+ <optional>
+
+
+
+
+
+
+
-
-
-
-
@@ -5358,12 +5853,13 @@
-
-
- cb
-
-
-
-
-
- function
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
-
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.
});
Example
- deleteClientGrant(params, cbopt) → {Promise|undefined}
+ createRule(data, cbopt) → {Promise|undefined}
dele
Parameters:
-
@@ -5627,12 +6072,12 @@
+ params
data
@@ -5489,58 +5985,7 @@ Parameters:
-
-
-
-
+
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
-
- id
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
- Returns:
Example
- management.clientGrants.delete({ id: GRANT_ID }, function (err) {
+
management.createRule(data, function (err) {
if (err) {
// Handle error.
}
- // Grant deleted.
+ // Rule created.
});
Example
- deleteConnection(params, cbopt) → {Promise|undefined}
+ createUser(data, cbopt) → {Promise|undefined}
delet
Parameters:
-
@@ -5896,12 +6290,12 @@
+ params
data
@@ -5758,58 +6203,7 @@ Parameters:
-
-
-
-
+
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
-
- id
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
- Returns:
Example
- management.deleteConnection({ id: CONNECTION_ID }, function (err) {
+
management.createUser(data, function (err) {
if (err) {
// Handle error.
}
- // Conection deleted.
+ // User created.
});
Example
- deleteCustomDomain(params, cbopt) → {Promise|undefined}
+ deleteAllUsers(cbopt) → {Promise|undefined}
del
+
del
Parameters:
-
-
-
-
-
-
-
-
- params
-
-
-
-
-
- Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
-
- id
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
-
@@ -6165,12 +6476,12 @@
@@ -6114,7 +6425,7 @@ cb
Parameters:
-
Returns:
Example
- management.deleteCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err) {
+
management.deleteAllUsers(function (err) {
if (err) {
// Handle error.
}
- // CustomDomain deleted.
+ // Users deleted
});
Example
- deleteDeviceCredential(params, cbopt) → {Promise|undefined}
+ deleteClient(params, cbopt) → {Promise|undefined}
Source:
+
+
+
+
+
+
+
+
+ Parameters:
- Parameters:
-
@@ -6434,14 +6745,12 @@
+ id
client_id
@@ -6339,7 +6650,7 @@ Parameters:
-
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.
});
Example
- deleteEmailProvider(cbopt) → {Promise|undefined}
+ deleteClientGrant(params, cbopt) → {Promise|undefined}
de
Parameters:
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
@@ -7158,12 +7552,12 @@
@@ -6620,12 +7014,12 @@ cb
Returns:
Example
- management.deleteEmailProvider(function (err) {
+
management.clientGrants.delete({ id: GRANT_ID }, function (err) {
if (err) {
// Handle error.
}
- // Email provider deleted.
+ // Grant deleted.
});
Example
- deleteGuardianEnrollment(data, cbopt) → {Promise|undefined}
+ deleteConnection(params, cbopt) → {Promise|undefined}
Source:
Parameters:
-
@@ -6889,12 +7283,12 @@
+ data
params
@@ -6751,7 +7145,7 @@ Parameters:
- Parameters:
-
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.
});
Example
- deleteResourceServer(params, cbopt) → {Promise|undefined}
+ deleteCustomDomain(params, cbopt) → {Promise|undefined}
d
Parameters:
- Parameters:
-
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.
});
Example
- deleteRule(params, cbopt) → {Promise|undefined}
+ deleteDeviceCredential(params, cbopt) → {Promise|undefined}
deleteRule<
-
+ Parameters:
- Parameters:
-
@@ -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.
});
Example
- deleteRulesConfig(params, cbopt) → {Promise|undefined}
+ deleteEmailProvider(cbopt) → {Promise|undefined}
dele
Parameters:
-
-
-
-
-
-
-
-
- params
-
-
-
-
-
- Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
-
- key
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
-
@@ -7965,12 +8276,12 @@
@@ -7696,12 +8007,12 @@ cb
Returns:
Example
- management.deleteRulesConfig({ key: RULE_CONFIG_KEY }, function (err) {
+
management.deleteEmailProvider(function (err) {
if (err) {
// Handle error.
}
- // Rules Config deleted.
+ // Email provider deleted.
});
Example
- deleteUser(params, cbopt) → {Promise|undefined}
+ deleteGuardianEnrollment(data, cbopt) → {Promise|undefined}
deleteUser<
Parameters:
-
@@ -7914,7 +8225,7 @@
+ params
data
@@ -7827,7 +8138,7 @@ Parameters:
- Parameters:
-
Parameters:
-
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.
});
Example
- deleteUserMultifactor(params, cbopt) → {Promise|undefined}
+ deleteResourceServer(params, cbopt) → {Promise|undefined}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Parameters:
- Parameters:
-
-
-
-
-
-
-
-
@@ -8209,7 +8494,7 @@
-
-
- provider
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
Parameters:
-
@@ -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.
});
Example
- deleteUserMultifcator(params, cbopt) → {Promise|undefined}
+ deleteRole(params, cbopt) → {Promise|undefined}
-
Parameters:
- Parameters:
-
-
-
-
-
-
-
-
@@ -8510,7 +8763,7 @@
-
-
- provider
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
Parameters:
-
@@ -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.
});
Example
- exportUsers(data, cbopt) → {Promise|undefined}
+ deleteRule(params, cbopt) → {Promise|undefined}
exportUser
Parameters:
-
+ data
params
@@ -8694,7 +8945,7 @@ Parameters:
- Parameters:
Type
- Attributes
-
@@ -8722,43 +8971,7 @@ Parameters:
-
-
-
-
-
-
-
- connection_id
-
-
-
-
-
- String
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ format
id
@@ -8771,93 +8984,11 @@
- Parameters:
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- limit
-
-
-
-
-
- Number
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -8952,37 +9083,12 @@
-
-
- fields
-
-
-
-
-
- Array.<Object>
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
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.
});
Example
- getActiveUsersCount(cbopt) → {Promise|undefined}
+ deleteRulesConfig(params, cbopt) → {Promise|undefined}
ge
Parameters:
-
-
-
-
+ cb
params
- function
+Object
@@ -9098,8 +9204,6 @@ Parameters:
- <optional>
-
@@ -9110,159 +9214,62 @@ Parameters:
-
- Returns:
+
+
+
+
-
-
-
+
+
-
-
+
-
-
-
-
-
+ Type
-
-Example
-
-
-
-management.getActiveUsersCount(function (err, usersCount) {
- if (err) {
- // Handle error.
- }
-
- console.log(usersCount);
-});
getBlacklistedTokens(cbopt) → {Promise|undefined}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Description
+
+
+
-
+
+ key
+
+
+
+
+
+ String
+
+
+
+ Parameters:
+
+
-
-
+
+
-
-
-
+
+
+
-
Name
-
-
- Type
-
-
- Attributes
-
-
-
-
- Description
-
@@ -9345,8 +9352,12 @@
@@ -9610,12 +9621,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.
});
Example
- getClient(params, cbopt) → {Promise|undefined}
+ deleteUser(params, cbopt) → {Promise|undefined}
getClient
Parameters:
- Parameters:
-
@@ -9559,7 +9570,7 @@
+ client_id
id
@@ -9515,7 +9526,7 @@ Parameters:
-
Parameters:
-
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.
});
Example
- getClientGrants(paramsopt, cbopt) → {Promise|undefined}
+ deleteUserMultifactor(params, cbopt) → {Promise|undefined}
getCli
-Parameters:
- <optional>
-
@@ -9743,7 +9752,7 @@ Parameters:
- Parameters:
Type
- Attributes
-
@@ -9771,34 +9778,24 @@ Parameters:
-
@@ -9807,34 +9804,24 @@
+ per_page
id
-
- Number
+String
-
- <optional>
-
-
-
-
-
-
-
-
Parameters:
-
@@ -9878,7 +9865,7 @@
+ page
provider
-
- Number
+String
-
- <optional>
-
-
-
-
-
-
-
-
Parameters:
-
@@ -9929,20 +9916,14 @@ Returns:
Example
-
-
- // 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.
});
Example
- getClientInfo() → {Object}
+ deleteUserMultifcator(params, cbopt) → {Promise|undefined}
getClien
-
-
-
-
-
-
-
-
-
-
-
Returns:
-
-
-
-
-
-
-
-getClients(paramsopt, cbopt) → {Promise|undefined}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
getClients<
Parameters:
- <optional>
-
@@ -10178,7 +10053,7 @@ Parameters:
- Parameters:
Type
- Attributes
-
@@ -10206,34 +10079,24 @@ Parameters:
-
@@ -10242,34 +10105,24 @@
+ per_page
id
-
- Number
+String
-
- <optional>
-
-
-
-
-
-
-
-
Parameters:
-
@@ -10313,7 +10166,7 @@
+ page
provider
-
- Number
+String
-
- <optional>
-
-
-
-
-
-
-
-
Parameters:
-
@@ -10364,20 +10217,14 @@ Returns:
Example
-
-
- // 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.
});
Example
- getConnection(params, cbopt) → {Promise|undefined}
+ exportUsers(data, cbopt) → {Promise|undefined}
getConne
Parameters:
-
+ params
data
@@ -10503,7 +10350,7 @@ Parameters:
- Parameters:
Type
+ Attributes
+
@@ -10529,7 +10378,7 @@ Parameters:
-
+
+
-
-
+ id
connection_id
@@ -10542,19 +10391,21 @@
+ Parameters:
+
+ <optional>
+
-
+
-
-
-
+
@@ -10563,13 +10414,13 @@ Parameters:
-
-
+ cb
format
- function
+String
@@ -10590,37 +10441,4552 @@ Parameters:
-
+
+
+
+
+
+ limit
+
+
+
+
+ Number
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ fields
+
+
+
-
+
+ Array.<Object>
-Returns:
+
+
+
+ <optional>
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ 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) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Retrieved job.
+ console.log(results);
+});
getActiveUsersCount(cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getActiveUsersCount(function (err, usersCount) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(usersCount);
+});
getBlacklistedTokens(cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getBlacklistedTokens(function (err, tokens) {
+ console.log(tokens.length);
+});
getClient(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ client_id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getClient({ client_id: CLIENT_ID }, function (err, client) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(client);
+});
getClientGrants(paramsopt, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+
+
+// Pagination settings.
+var params = {
+ per_page: 10,
+ page: 0
+};
+
+management.getClientGrants(params, function (err, grants) {
+ console.log(grants.length);
+});
getClientInfo() → {Object}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+getClients(paramsopt, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+
+
+// Pagination settings.
+var params = {
+ per_page: 10,
+ page: 0
+};
+
+management.getClients(params, function (err, clients) {
+ console.log(clients.length);
+});
getConnection(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getConnection({ id: CONNECTION_ID }, function (err, connection) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(connection);
+});
getConnections(paramsopt, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+
+
+// Pagination settings.
+var params = {
+ per_page: 10,
+ page: 0
+};
+
+management.getConnections(params, function (err, connections) {
+ console.log(connections.length);
+});
getCustomDomain(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getCustomDomain({ id: CUSTOM_DOMAIN_ID }, function (err, customDomain) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(customDomain);
+});
getCustomDomains() → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getCustomDomains(function (err, customDomains) {
+ console.log(customDomains.length);
+});
getDailyStats(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ from
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ to
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+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}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getDeviceCredentials(function (err, credentials) {
+ console.log(credentials.length);
+});
getEmailProvider(cbopt, paramsopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ fields
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ include_fields
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getEmailProvider(function (err, provider) {
+ console.log(provider.length);
+});
getGrants(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+
+
+
+ Number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+
+
+
+ Number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ include_totals
+
+
+
+
+
+
+
+
+ Boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ user_id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ client_id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ audience
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+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}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
+ console.log(enrollment);
+});
getGuardianEnrollments(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getGuardianEnrollments({ id: USER_ID }, function (err, enrollments) {
+ console.log(enrollments);
+});
getJob(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
@@ -11357,8 +15780,20 @@
+
-
+ cb
+
+
+
-
+
+ function
-
-
+
+
+
+ <optional>
+
-
+
-
+
+
-
+
-
-
+
+ Returns:
Example
- management.getCustomDomains(function (err, customDomains) {
- console.log(customDomains.length);
+
+
+ // Pagination settings.
+var params = {
+ per_page: 10,
+ page: 2
+};
+
+management.getLogs(params, function (err, logs) {
+ console.log(logs.length);
});
Example
- getDailyStats(params, cbopt) → {Promise|undefined}
+ getPermissionsInRole(roleIdopt, cbopt) → {Promise|undefined}
getDaily
Parameters:
-
-
-
-
-
-
-
-
+
-
+
- Name
-
-
- Type
-
-
- Attributes
-
-
-
+
- Description
-
-
-
@@ -11646,19 +16006,18 @@
-
- params
-
-
-
-
- Object
-
-
-
-
-
-
-
-
-
-
Parameters:
+
@@ -11498,6 +15880,8 @@
-
+ Parameters:
Type
+ Attributes
+
@@ -11510,7 +15894,7 @@ Parameters:
-
-
-
-
-
+ from
roleId
@@ -11523,45 +15907,21 @@
-
-
-
- Parameters:
-
-
-
-
-
-
-
-
-
-
-
- to
-
+ <optional>
-
+
+
-String
+
-
-
-
- Returns:
Example
+Examples
- 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.
- }
+
+
+ var params = { id :'ROLE_ID'};
management.getPermissionsInRole(params, function (err, permissions) {
+ console.log(permissions);
});
Example
- getDeviceCredentials(cbopt) → {Promise|undefined}
+ getResourceServer(params, cbopt) → {Promise|undefined}
g
Parameters:
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
@@ -12152,8 +16600,20 @@
@@ -11837,8 +16281,12 @@ cb
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);
});
Example
- getEmailProvider(cbopt, paramsopt) → {Promise|undefined}
+ getResourceServers(paramsopt, cbopt) → {Promise|undefined}
getEm
Parameters:
-
+
+
+
+ cb
params
- function
+Object
@@ -11966,22 +16414,41 @@ Parameters:
-
-
+
+
-
+
+
+
+
+
+
Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+ Description
+
-
@@ -12066,13 +16522,13 @@
+ params
per_page
- Object
+Number
@@ -12002,35 +16469,16 @@ Parameters:
-
-
-
+
-
-
-
+
+
-
Name
-
-
- Type
-
-
- Attributes
-
-
-
-
- Description
-
-
+
+
+
+
+ fields
page
@@ -12057,7 +16505,15 @@ Parameters:
-
+ Parameters:
-
-
-
-
-
+ include_fields
cb
- Number
+function
@@ -12093,15 +16549,7 @@ Parameters:
-
- Returns:
Example
- management.getEmailProvider(function (err, provider) {
- console.log(provider.length);
+
+
+ // Pagination settings.
+var params = {
+ per_page: 10,
+ page: 0
+};
+
+management.getResourceServers(params, function (err, resourceServers) {
+ console.log(resourceServers.length);
});
Example
- getGrants(params, cbopt) → {Promise|undefined}
+ getRole(params, cbopt) → {Promise|undefined}
getGrants
Parameters:
- Parameters:
-
-
-
-
-
-
-
- per_page
-
-
-
-
-
-
-
-
- Number
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- page
-
-
-
-
-
-
-
-
- Number
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- include_totals
-
-
-
-
-
-
-
-
- Boolean
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- user_id
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- client_id
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
-
-
-
@@ -12547,17 +16877,12 @@
+ audience
id
@@ -12452,7 +16782,7 @@ Parameters:
-
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);
});
Example
- getGuardianEnrollment(data, cbopt) → {Promise|undefined}
+ getRoles(paramsopt, cbopt) → {Promise|undefined}
Parameters:
-
+ data
params
@@ -12673,6 +16998,8 @@ Parameters:
+ <optional>
+
@@ -12683,7 +17010,7 @@ Parameters:
- Parameters:
Type
+ Attributes
+
@@ -12709,24 +17038,70 @@ Parameters:
-
+
+
+
+
+ id
per_page
-
+
+
+ String
+Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -12821,8 +17196,20 @@
+
+
+ page
+
+
+
+ Number
+
+ <optional>
+
+
+
+
+
+
+
-
Returns:
Example
- management.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
- console.log(enrollment);
+
+
+ // Pagination settings.
+var params = {
+ per_page: 10,
+ page: 0
+};
+
+management.getRoles(params, function (err, roles) {
+ console.log(roles.length);
});
Example
- getGuardianEnrollments(data, cbopt) → {Promise|undefined}
+ getRule(params, cbopt) → {Promise|undefined}
Source:
Parameters:
-
@@ -13086,8 +17473,12 @@
+ data
params
@@ -12948,7 +17335,7 @@ Parameters:
- Parameters:
-
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);
});
Example
- getJob(params, cbopt) → {Promise|undefined}
+ getRules(paramsopt, cbopt) → {Promise|undefined}
getJobSource:
Parameters:
+ <optional>
+
@@ -13213,7 +17606,7 @@ Parameters:
- Parameters:
Type
+ Attributes
+
@@ -13239,24 +17634,70 @@ Parameters:
-
+
+
+
+
+ id
per_page
-
+ String
+Number
+
+ <optional>
+
+
+
+
+
+
+
-
+
+
+
@@ -13351,17 +17792,20 @@
+
+
+ page
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
Returns:
Example
- var params = {
- id: '{JOB_ID}'
+
+
+ // 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);
});
Example
- getLog(params, cbopt) → {Promise|undefined}
+ getRulesConfigs() → {Promise|undefined}
getLogSource:
getLogParameters:
-
-
-
-
-
-
-
-
+
- Name
-
- Type
-
- Attributes
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
- Description
-
-
-
-
- params
-
-
-
+ Object
+Example
-
- management.getRulesConfigs(function (err, rulesConfigs) {
+ if (err) {
+ // Handle error.
+ }
-
-
-
+ // Get Rules Configs.
+});
-
+
-
-
+
+
+
- getTenantSettings(cbopt) → {Promise|undefined}
-
-
-
-
-
-
-
+
+
+
+Name
-
+
- Type
-
-
+Description
-
+
-
-
-
+
-
+
- id
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ String
+
+
-
- Parameters:
+
+
+
+
+
+
-
-
-
+
+
+
+ Name
+
-
+ Type
-
-
- Attributes
+
-
-
-Description
+
+
+
@@ -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);
});
Example
- getLogs(paramsopt, cbopt) → {Promise|undefined}
+ getUser(data, cbopt) → {Promise|undefined}
getLogsSource:
Parameters:
-
+ params
data
@@ -13746,8 +18225,6 @@ Parameters:
- <optional>
-
@@ -13758,278 +18235,50 @@ Parameters:
-
-
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
- Attributes
-
-
-
-
- Description
-
-
-
-
-
-
-
-
-
- q
-
-
-
-
-
- String
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- page
-
-
-
-
-
- Number
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- per_page
-
-
-
-
-
- Number
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- sort
-
-
-
-
-
- String
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- fields
-
-
-
-
-
- String
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- include_fields
-
-
-
-
-
- Boolean
-
-
-
-
-
- <optional>
-
+
+
+
+ Name
+
-
+ Type
-
-
-
+
-
+
-
-
- Description
+
+
+
-
@@ -14124,20 +18373,8 @@
+ include_totals
id
-
- Boolean
+String
-
- <optional>
-
-
-
-
-
-
-
-
Returns:
Example
-
-
- // 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);
});
Example
- getResourceServer(params, cbopt) → {Promise|undefined}
+ getUserLogs(params, cbopt) → {Promise|undefined}
getR
Parameters:
- Parameters:
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+
+
+
+ Number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+
+
+
+ Number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sort
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
@@ -14401,12 +18742,14 @@
+
+
+ include_totals
+
+
+
+
+
+
+
+
+ Boolean
+
+
+
+
+
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);
});
Example
- getResourceServers(paramsopt, cbopt) → {Promise|undefined}
+ getUserPermissions(params, cbopt) → {Promise|undefined}
get
Parameters:
- <optional>
-
@@ -14534,7 +18875,7 @@ Parameters:
- Parameters:
Type
- Attributes
-
@@ -14562,28 +18901,44 @@ Parameters:
-
+
+
+
+ per_page
id
-
- Number
+String
-
- <optional>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ per_page
+
-
+Number
+
+
+
+
+
@@ -14611,21 +18966,63 @@ Parameters:
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sort
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
@@ -14720,20 +19117,14 @@
+
+ include_totals
+
+
-
-
Boolean
+
+
+
+
-
Returns:
Example
-
-
- // 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);
});
Example
- getRule(params, cbopt) → {Promise|undefined}
+ getUserRoles(params, cbopt) → {Promise|undefined}
getRuleSource:
Parameters:
- Parameters:
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+
+
+
+ Number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+
+
+
+ Number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sort
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
@@ -14997,12 +19492,14 @@
+
+
+ include_totals
+
+
+
+
+
+
+
+
+ Boolean
+
+
+
+
+
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);
});
Example
- getRules(paramsopt, cbopt) → {Promise|undefined}
+ getUsers(paramsopt, cbopt) → {Promise|undefined}
getRulesSource:
Parameters:
-
+ Parameters:
+
+
+
+
+
+
+
+ search_engine
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -15324,12 +19857,13 @@ per_page
Example
@@ -15341,14 +19875,14 @@ // 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);
});
Example
- getRulesConfigs() → {Promise|undefined}
+ getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
getRul
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
@@ -15444,12 +20078,13 @@
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
-
-
+
+
+ email
+
+
+
-
+
+ String
+
-
+
+
+
+ <optional>
+
-
+
-
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
-
+ cb
+
+
+
+
+ function
-
-
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+ Returns:
Example
- management.getRulesConfigs(function (err, rulesConfigs) {
- if (err) {
- // Handle error.
- }
-
- // Get Rules Configs.
+
+
+ auth0.getUsersByEmail(email, function (err, users) {
+ console.log(users);
});
Example
- getTenantSettings(cbopt) → {Promise|undefined}
+ getUsersInRole(roleIdopt, cbopt) → {Promise|undefined}
getT
Parameters:
+
+
+
+
+
+
+
+
+ roleId
+
+
+
+
+
+ String
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -15626,14 +20297,18 @@ cb
Returns:
Example
+Examples
- management.getSettings(function (err, settings) {
- if (err) {
- // Handle error.
- }
+
- console.log(settings);
+
+
+ var params = { id :'ROLE_ID'};
management.getUsersInRole(params, function (err, users) {
+ console.log(users);
});
Example
- getUser(data, cbopt) → {Promise|undefined}
+ importUsers(data, cbopt) → {Promise|undefined}
getUserSource:
Parameters:
- Parameters:
-
+
+
+
+
+ id
connectionId
@@ -15802,7 +20478,33 @@ Parameters:
-
+
+
+
@@ -15897,8 +20599,15 @@
+
+
+ users
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
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.
+ }
});
Example
- getUserLogs(params, cbopt) → {Promise|undefined}
+ linkUsers(userId, params, cbopt) → {Promise|undefined}
getUserLog
Parameters:
-
+ params
userId
- Object
+String
@@ -16024,111 +20733,67 @@ Parameters:
-
-
-
-
-
-
+
+
-
Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
+ id
params
-
-
-
-
- String
+Object
-
-
-
-
-
-
-
-
-
-
-
- per_page
-
-
+
+
Number
-
-
-
-
-
-
-
-
@@ -18650,7 +23498,7 @@
-
-
- page
-
+
+Number
-
+
-
-
+
+
+
+
+
+
+
+
+ Name
+
-
+ Type
-
+
-
-
- Description
+
+
+
-
@@ -16154,13 +20819,13 @@
+ sort
user_id
@@ -16145,7 +20810,7 @@ Parameters:
-
Parameters:
-
@@ -16266,14 +20931,18 @@
+ include_totals
connection_id
- Boolean
+String
@@ -16171,7 +20836,7 @@ Parameters:
-
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.
});
Example
- getUsers(paramsopt, cbopt) → {Promise|undefined}
+ regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
getUsersSource:
-Parameters:
-
+ params
data
@@ -16389,8 +21058,6 @@ Parameters:
- <optional>
-
@@ -16401,7 +21068,7 @@ Parameters:
- Parameters:
Type
- Attributes
-
@@ -16429,106 +21094,24 @@ Parameters:
-
-
-
-
-
-
-
- search_engine
-
-
-
-
-
- Number
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- per_page
-
-
-
-
-
- Number
-
-
-
-
-
- <optional>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -16623,21 +21206,8 @@
+ page
id
-
- Number
+String
-
- <optional>
-
-
-
-
-
-
-
-
Returns:
Example
-
-
- // 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);
});
Example
- getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
+ removePermissionsFromRole(data, cbopt) → {Promise|undefined}
getUse
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Parameters:
+
+
+
+
+
+
@@ -17037,7 +21772,7 @@
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params.id
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -16852,13 +21582,11 @@
+
+
+ data
+
+
+
-
+
+ Object
-
-
+
+
+
-
+
-
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
-
-
-
+ Name
+
-
+ Type
-
- Description
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
- String
+
+ Parameters:
-
+
+
+
@@ -16724,8 +21424,6 @@
+
+
+ Parameters:
Type
- Attributes
-
@@ -16738,7 +21436,7 @@ Parameters:
-
+
+
+
+
+ email
permission_name
@@ -16751,21 +21449,53 @@
- Parameters:
-
- <optional>
-
+
+
+
+
+
+
+
+
+
+
+
+
+ resource_server_identifier
+
-
+String
+
+
+
+
+
-
+ Returns:
Example
-
-
- 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);
});
Example
- importUsers(data, cbopt) → {Promise|undefined}
+ removePermissionsFromUser(params, data, cbopt) → {Promise|undefined}
importUser
+Parameters:
-
+ data
params
@@ -16985,7 +21712,7 @@ Parameters:
- Parameters:
-
+
+
+
+ connectionId
id
@@ -17028,7 +21755,15 @@ Parameters:
-
+ Parameters:
-
@@ -18214,58 +23106,33 @@
+ users
data
@@ -17050,11 +21785,62 @@
+ Parameters:
+
+
+
+
+
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
@@ -17149,15 +21935,15 @@
+
+
+ permissions
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
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.
});
Example
- linkUsers(userId, params, cbopt) → {Promise|undefined}
+ removeRolesFromUser(params, data, cbopt) → {Promise|undefined}
linkUsers
Parameters:
-
@@ -17292,13 +22129,13 @@
+ userId
params
- String
+Object
@@ -17283,7 +22069,58 @@ Parameters:
-
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+ Parameters:
-
+ params
data
- Object
+String
@@ -17317,7 +22154,7 @@ Parameters:
- Parameters:
-
-
-
-
-
-
-
- user_id
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
-
-
-
@@ -17481,18 +22292,15 @@
+ connection_id
roles
@@ -17386,7 +22197,7 @@ Parameters:
-
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.
});
Example
- regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
+ sendEmailVerification(data, cbopt) → {Promise|undefined}
Source:
Parameters:
- Parameters:
-
@@ -17756,8 +22564,14 @@
+ id
user_id
@@ -17661,7 +22469,7 @@ Parameters:
-
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.
+ }
});
Example
- sendEmailVerification(data, cbopt) → {Promise|undefined}
+ setRulesConfig(params, data, cbopt) → {Promise|undefined}
Parameters:
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ key
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
@@ -17883,7 +22782,7 @@ data
Parameters:
- Parameters:
-
@@ -18021,14 +22920,15 @@
+ user_id
value
@@ -17926,7 +22825,7 @@ Parameters:
-
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.
});
Example
- setRulesConfig(params, data, cbopt) → {Promise|undefined}
+ unlinkUsers(params, cbopt) → {Promise|undefined}
setRule
-Parameters:
- Parameters:
-
-
-
-
+ key
id
@@ -18197,15 +23097,7 @@ Parameters:
-
- Parameters:
-
@@ -18589,32 +23437,32 @@
+ data
provider
-
- Object
+String
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
-
Name
-
-
- Type
-
-
-
-
-
- Description
-
-
@@ -18377,15 +23244,14 @@
+ value
user_id
@@ -18282,7 +23149,7 @@ Parameters:
-
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.
});
Example
- unlinkUsers(params, cbopt) → {Promise|undefined}
+ updateAppMetadata(params, metadata, cbopt) → {Promise|undefined}
unlinkUser
+Parameters:
- Parameters:
-
-
-
-
-
-
-
- id
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
-
-
-
+
+
+
+ provider
id
@@ -18580,7 +23420,15 @@ Parameters:
-
+ Parameters:
-
+
+
-
-
+ user_id
metadata
-
+ String
+Object
+
-
+
-
-
-
+
Parameters:
-
@@ -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);
});
Example
- updateAppMetadata(params, metadata, cbopt) → {Promise|undefined}
+ updateClient(params, data, cbopt) → {Promise|undefined}
upda
Parameters:
- Parameters:
-
@@ -18894,7 +23746,7 @@
+ id
client_id
@@ -18877,7 +23729,7 @@ Parameters:
-
Parameters:
-
@@ -18955,7 +23807,7 @@
+ metadata
data
@@ -18919,7 +23771,7 @@ Parameters:
-
Parameters:
-
@@ -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'
});
Example
- updateClient(params, data, cbopt) → {Promise|undefined}
+ updateClientGrant(params, data, cbopt) → {Promise|undefined}
updateCli
Parameters:
-
@@ -19315,15 +24164,19 @@
+ client_id
id
@@ -19186,7 +24035,7 @@ Parameters:
-
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);
});
Example
- updateClientGrant(params, data, cbopt) → {Promise|undefined}
+ updateConnection(params, data, cbopt) → {Promise|undefined}
upda
Parameters:
- Parameters:
-
@@ -19534,7 +24387,7 @@ Parameters:
-
@@ -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'
});
Example
- updateConnection(params, data, cbopt) → {Promise|undefined}
+ updateEmailProvider(params, data, cbopt) → {Promise|undefined}
updat
Parameters:
-
@@ -19844,7 +24642,7 @@
-
-
-
+
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
-
- id
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
- Parameters:
-
@@ -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);
});
Example
- updateEmailProvider(params, data, cbopt) → {Promise|undefined}
+ updateResourceServer(params, data, cbopt) → {Promise|undefined}
up
Parameters:
-
@@ -20099,7 +24946,7 @@
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+ Parameters:
-
@@ -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'
});
Example
- updateResourceServer(params, data, cbopt) → {Promise|undefined}
+ updateRole(params, data, cbopt) → {Promise|undefined}
u
Parameters:
- Parameters:
-
@@ -20403,7 +25252,7 @@ Parameters:
-
@@ -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'.
});
updateRule<
u
updateUser<
upd
ver
Example
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 @@
Returns:
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 @@
Example
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 @@
Parameters:
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
+
+
+
+
+
+
+
+
+ management.
+
+ RolesManager
+
+
+ Constructor
+
+
+ new RolesManager(options)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ options
+
+
+
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ baseUrl
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ headers
+
+
+
+
+
+ Object
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ retry
+
+
+
+
+
+ Object
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+(inner) auth0RestClient :external:RestClient
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
+(inner) clientOptions :Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
+Methods
+
+
+
+addPermissions(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params.id
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ permission_name
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ resource_server_identifier
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+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}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ roles
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+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}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params.id
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ permission_name
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ resource_server_identifier
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+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}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.roles.create(data, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Role created.
+});
delete(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.roles.delete({ id: ROLE_ID }, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Role deleted.
+});
get(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.roles.get({ id: ROLE_ID }, function (err, role) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(role);
+});
getAll(paramsopt, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+
+
+// 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}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ email
+
+
+
+
+
+ String
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Examples
+
+
+
+
+
+ var params = {id : 'ROLE_ID'}
+
+management.roles.getPermissions( {id : 'ROLE_ID'}, function (err, permissions) {
+ console.log(permissions);
+});
getUsers(emailopt, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ email
+
+
+
+
+
+ String
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Examples
+
+
+
+
+
+ params = {id : 'ROLE_ID'}
+
+management.roles.getUsers( {id : 'ROLE_ID'}, function (err, users) {
+ console.log(users);
+});
removePermissions(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params.id
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ permission_name
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ resource_server_identifier
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+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}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ roles
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+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}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+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'
+});
+
+
+
+
+
+
+
\ 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 @@
Example
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 @@
Example
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 @@
Example
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 @@
Example
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 @@
Example
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 @@
(inn
+
+
+
+
+
Type:
+
+
+
+
+
+
+
+(inner) userPermissionsClient :external:RestClient
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
+(inner) userRolesClient :external:RestClient
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -836,7 +984,7 @@ createSource:
deleteSource:
deleteAll
Source:
getSource:
getAllSource:
getByEmail<
Source:
Example
getPermissions(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.users.getPermissions({ id: USER_ID }, function (err, permissions) {
+ console.log(permissions);
+});
getUserRoles(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.users.getRoles({ id: USER_ID }, function (err, roles) {
+ console.log(roles);
+});
linkSource:
logsSource:
Source:
unlinkSource:
updateSource:
upda
upd
Example
diff --git a/docs/module-management.html b/docs/module-management.html
index 7535febd0..59dfc7588 100644
--- a/docs/module-management.html
+++ b/docs/module-management.html
@@ -24,7 +24,7 @@
Classes
Classes
diff --git a/docs/module-utils.html b/docs/module-utils.html
index 5f35d0d26..c9cd94e0a 100644
--- a/docs/module-utils.html
+++ b/docs/module-utils.html
@@ -24,7 +24,7 @@
(static)
diff --git a/docs/utils.js.html b/docs/utils.js.html
index d73697cdf..dcd265d5d 100644
--- a/docs/utils.js.html
+++ b/docs/utils.js.html
@@ -24,7 +24,7 @@
utils.js
diff --git a/package.json b/package.json
index 341b38cbc..c9118d3e7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "auth0",
- "version": "2.16.0",
+ "version": "2.17.0",
"description": "SDK for Auth0 API v2",
"main": "src/index.js",
"files": ["src"],