Simple facade for consuming a REST API endpoint.
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- @@ -687,7 +787,7 @@
- Source:
- @@ -887,7 +987,7 @@
- Source:
- @@ -987,7 +1087,7 @@
- Source:
- @@ -1087,7 +1187,7 @@
- Source:
- @@ -1187,7 +1287,7 @@
- Source:
- @@ -1239,7 +1339,7 @@
- Source:
- @@ -436,7 +436,7 @@
- @@ -510,7 +510,7 @@
- @@ -584,7 +584,7 @@
- Source:
- @@ -658,7 +658,7 @@
- @@ -732,7 +732,7 @@
- @@ -816,7 +816,7 @@
- Source:
- @@ -1106,7 +1106,7 @@
- @@ -1338,114 +1338,6 @@
- Source: -
- - auth/index.js, line 110 -
-
-
-
-
-
-
-
-- - Type: - -
-
-
-
Object
- - -
- - Source:
- @@ -1810,7 +1702,7 @@
- Source:
- @@ -1988,7 +1880,7 @@
- Source:
- @@ -2309,7 +2201,7 @@
- Source:
- @@ -2546,7 +2438,7 @@
- Source:
- @@ -2808,7 +2700,7 @@
- Source:
- @@ -3089,7 +2981,7 @@
- Source:
- @@ -3372,7 +3264,7 @@
- Source:
- @@ -3605,7 +3497,7 @@
- Source:
- @@ -3894,7 +3786,7 @@
- Source:
- @@ -792,7 +792,7 @@
- Source:
- @@ -1100,7 +1100,7 @@
- @@ -1435,7 +1435,7 @@
- @@ -1738,7 +1738,7 @@
- @@ -741,7 +741,7 @@
- Source:
- @@ -1062,7 +1062,7 @@
- Source:
- @@ -1299,7 +1299,7 @@
- @@ -1591,7 +1591,7 @@
- Source:
- @@ -1796,7 +1796,7 @@
- @@ -775,7 +775,7 @@
- @@ -1099,7 +1099,7 @@
- @@ -1492,7 +1492,7 @@
- Source:
- @@ -1515,7 +1515,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:
- @@ -1696,7 +1696,7 @@
- @@ -1771,7 +1771,7 @@
- @@ -1845,7 +1845,7 @@
- Source:
- @@ -1919,7 +1919,7 @@
- @@ -1993,7 +1993,7 @@
- @@ -2067,7 +2067,7 @@
- @@ -2094,6 +2094,81 @@
- Source: +
- + + + + + + + +
-
+
+
UserBlocksManager
+ + +
+ - @@ -2226,7 +2301,7 @@
- Source:
- @@ -2605,7 +2680,7 @@
- @@ -2962,7 +3037,7 @@
- Source:
- @@ -3319,7 +3394,7 @@
- Source:
- @@ -3619,7 +3694,7 @@
- @@ -3837,7 +3912,7 @@
- Source:
- @@ -4055,7 +4130,7 @@
- Source:
- @@ -4273,7 +4348,7 @@
- Source:
- @@ -4491,7 +4566,7 @@
- Source:
- @@ -4709,7 +4784,7 @@
- Source:
- @@ -4927,7 +5002,7 @@
- @@ -5111,7 +5186,7 @@
- @@ -5291,7 +5366,7 @@
- Source:
- @@ -5477,7 +5552,7 @@
- Source:
- @@ -5695,7 +5770,7 @@
- Source:
- @@ -5914,7 +5989,7 @@
- Source:
- @@ -6132,7 +6207,7 @@
- Source:
- @@ -6352,7 +6427,7 @@
- Source:
- @@ -6536,7 +6611,7 @@
- Source:
- @@ -6805,7 +6880,7 @@
- Source:
- @@ -7074,7 +7149,7 @@
- Source:
- @@ -7343,7 +7418,7 @@
- Source:
- @@ -7612,7 +7687,7 @@
- @@ -7883,7 +7958,7 @@
- Source:
- @@ -8067,7 +8142,7 @@
- @@ -8336,7 +8411,7 @@
- Source:
- @@ -8605,7 +8680,7 @@
- Source:
- @@ -8874,7 +8949,7 @@
- Source:
- @@ -9143,7 +9218,7 @@
- Source:
- @@ -9412,7 +9487,7 @@
- Source:
- @@ -9681,7 +9756,7 @@
- Source:
- @@ -9982,7 +10057,7 @@
- Source:
- @@ -10279,7 +10354,7 @@
- Source:
- @@ -10693,7 +10768,7 @@
- Source:
- @@ -10877,7 +10952,7 @@
- Source:
- @@ -11057,7 +11132,7 @@
- @@ -11326,7 +11401,7 @@
- Source:
- @@ -11606,114 +11681,6 @@
- Source: -
- - - - - - - - -
- - Type: - -
-
-
-
Object
- - -
- - Source:
- @@ -12088,7 +12055,7 @@
- Source:
- @@ -12357,7 +12324,7 @@
- Source:
- @@ -12684,7 +12651,7 @@
- Source:
- @@ -12953,7 +12920,7 @@
- Source:
- @@ -13069,7 +13036,7 @@
- Source:
- @@ -13369,7 +13336,7 @@
- Source:
- @@ -13549,7 +13516,7 @@
- Source:
- @@ -13864,7 +13831,7 @@
- @@ -14268,7 +14235,7 @@
- Source:
- @@ -14533,7 +14500,7 @@
- @@ -14798,7 +14765,7 @@
- @@ -15072,7 +15039,7 @@
- @@ -15341,7 +15308,7 @@
- @@ -15848,7 +15815,7 @@
- Source:
- @@ -16072,7 +16039,7 @@
- Source:
- @@ -16341,7 +16308,7 @@
- Source:
- @@ -16668,7 +16635,7 @@
- @@ -16937,7 +16904,7 @@
- @@ -17264,7 +17231,7 @@
- @@ -17533,7 +17500,7 @@
- @@ -17860,7 +17827,7 @@
- Source:
- @@ -17980,7 +17947,7 @@
- Source:
- @@ -18164,7 +18131,7 @@
- @@ -18386,14 +18353,14 @@
- Source:
- @@ -18500,7 +18467,7 @@
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- Source:
- @@ -18875,7 +19005,7 @@
- Source:
- @@ -19250,7 +19380,7 @@
- @@ -19615,8 +19745,6 @@
- Source:
- @@ -19964,13 +20105,13 @@
- Source:
- @@ -20185,7 +20469,7 @@
- Source:
- @@ -20410,7 +20690,232 @@
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- @@ -20793,7 +21298,650 @@
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- @@ -21043,7 +22192,7 @@
- @@ -21308,41 +22549,7 @@
- @@ -21685,91 +22904,6 @@
- Source:
- @@ -22069,7 +23202,7 @@
- Source:
- @@ -22401,7 +23534,7 @@
- Source:
- @@ -22697,92 +23828,7 @@
- Source:
- @@ -23306,7 +24349,7 @@
- Source:
- @@ -23615,7 +24658,7 @@
- Source:
- @@ -23921,7 +24964,7 @@
- Source:
- @@ -24231,7 +25274,7 @@
- Source:
- @@ -24537,7 +25580,7 @@
- Source:
- @@ -24790,7 +25833,7 @@
- Source:
- @@ -25096,7 +26139,7 @@
- Source:
- @@ -25401,7 +26444,7 @@
- Source:
- @@ -25706,7 +26749,7 @@
- Source:
- @@ -25922,7 +26965,7 @@
- Source:
- @@ -26228,7 +27271,7 @@
- Source:
- @@ -26537,7 +27580,7 @@
- Source:
- @@ -26775,7 +27818,7 @@
- Source:
- @@ -633,7 +633,7 @@
- Source: +
- + + + + + + + +
- Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - TicketsManager +
- UserBlocksManager + +
- UsersManager @@ -156,7 +159,7 @@
- Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Object
+ + +
+ - Source:
- @@ -202,7 +310,7 @@
- @@ -287,7 +395,7 @@
- Source:
- @@ -339,7 +447,7 @@
diff --git a/docs/index.html b/docs/index.html
index 59b2d5896..15cb84272 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 094cc993b..685b70954 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 ca8b9a674..57789b280 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 35705ce1a..047a4b671 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 c976734cd..fa51ba415 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 2652dc8d3..03aa47fa2 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 c9ed7853b..37a44518e 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 88683e316..8efae0c68 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 01384f0f8..3b75e5dd2 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 6438643cb..428a57e77 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 ccceff56b..b434190dd 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 a83fef1f9..1296db43f 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 9b1f553c9..78f3bc81d 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 a1c5c3285..13159d3fd 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 d54e67e7f..c4b5e2e84 100644
--- a/docs/management_ManagementTokenProvider.js.html
+++ b/docs/management_ManagementTokenProvider.js.html
@@ -24,7 +24,7 @@
@@ -108,7 +108,8 @@ management/ManagementTokenProvider.js
domain: this.options.domain,
clientId: this.options.clientId,
clientSecret: this.options.clientSecret,
- telemetry: this.options.telemetry
+ telemetry: this.options.telemetry,
+ clientInfo: this.options.clientInfo
};
this.authenticationClient = new AuthenticationClient(authenticationClientOptions);
};
@@ -189,7 +190,7 @@ management/ManagementTokenProvider.js
diff --git a/docs/management_ResourceServersManager.js.html b/docs/management_ResourceServersManager.js.html
index 6e22790ed..00def9033 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
index adcf4d6a0..47ab35ff9 100644
--- a/docs/management_RolesManager.js.html
+++ b/docs/management_RolesManager.js.html
@@ -24,7 +24,7 @@
@@ -453,7 +453,7 @@ management/RolesManager.js
diff --git a/docs/management_RulesConfigsManager.js.html b/docs/management_RulesConfigsManager.js.html
index 4164615e5..28ceed46c 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 7cde7ef0c..f7ba7415b 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 93c852667..4f40e59ab 100644
--- a/docs/management_StatsManager.js.html
+++ b/docs/management_StatsManager.js.html
@@ -24,7 +24,7 @@
@@ -90,7 +90,7 @@ management/StatsManager.js
clientOptions,
options.tokenProvider
);
- this.stats = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -125,10 +125,10 @@ management/StatsManager.js
params.type = 'daily';
if (cb && cb instanceof Function) {
- return this.stats.get(params, cb);
+ return this.resource.get(params, cb);
}
- return this.stats.get(params);
+ return this.resource.get(params);
};
/**
@@ -154,11 +154,11 @@ management/StatsManager.js
var options = { type: 'active-users' };
if (cb && cb instanceof Function) {
- return this.stats.get(options, cb);
+ return this.resource.get(options, cb);
}
// Return a promise.
- return this.stats.get(options);
+ return this.resource.get(options);
};
module.exports = StatsManager;
@@ -174,7 +174,7 @@ management/StatsManager.js
diff --git a/docs/management_TenantManager.js.html b/docs/management_TenantManager.js.html
index db15c4e7b..f2d412579 100644
--- a/docs/management_TenantManager.js.html
+++ b/docs/management_TenantManager.js.html
@@ -24,7 +24,7 @@
@@ -90,7 +90,7 @@ management/TenantManager.js
clientOptions,
options.tokenProvider
);
- this.tenant = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -113,11 +113,11 @@ management/TenantManager.js
*/
TenantManager.prototype.updateSettings = function(data, cb) {
if (cb && cb instanceof Function) {
- return this.tenant.patch({}, data, cb);
+ return this.resource.patch({}, data, cb);
}
// Return a promise.
- return this.tenant.patch({}, data);
+ return this.resource.patch({}, data);
};
/**
@@ -141,11 +141,11 @@ management/TenantManager.js
*/
TenantManager.prototype.getSettings = function(cb) {
if (cb && cb instanceof Function) {
- return this.tenant.get({}, cb);
+ return this.resource.get({}, cb);
}
// Return a promise.
- return this.tenant.get({});
+ return this.resource.get({});
};
module.exports = TenantManager;
@@ -161,7 +161,7 @@ management/TenantManager.js
diff --git a/docs/management_TicketsManager.js.html b/docs/management_TicketsManager.js.html
index 418b10d7e..5a61cf0ea 100644
--- a/docs/management_TicketsManager.js.html
+++ b/docs/management_TicketsManager.js.html
@@ -24,7 +24,7 @@
@@ -84,7 +84,7 @@ management/TicketsManager.js
clientOptions,
options.tokenProvider
);
- this.ticket = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -114,11 +114,11 @@ management/TicketsManager.js
var params = { type: 'password-change' };
if (cb && cb instanceof Function) {
- return this.ticket.create(params, data, cb);
+ return this.resource.create(params, data, cb);
}
// Return a promise.
- return this.ticket.create(params, data);
+ return this.resource.create(params, data);
};
/**
@@ -146,11 +146,11 @@ management/TicketsManager.js
var params = { type: 'email-verification' };
if (cb && cb instanceof Function) {
- return this.ticket.create(params, data, cb);
+ return this.resource.create(params, data, cb);
}
// Return a promise.
- return this.ticket.create(params, data);
+ return this.resource.create(params, data);
};
module.exports = TicketsManager;
@@ -166,7 +166,7 @@ management/TicketsManager.js
diff --git a/docs/management_UserBlocksManager.js.html b/docs/management_UserBlocksManager.js.html
new file mode 100644
index 000000000..2e639e3d7
--- /dev/null
+++ b/docs/management_UserBlocksManager.js.html
@@ -0,0 +1,236 @@
+
+
+
+
+
+ management/UserBlocksManager.js - Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ management/UserBlocksManager.js
+
+
+
+
+
+
+
+
+
+ var ArgumentError = require('rest-facade').ArgumentError;
+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
+ * Abstracts interaction with the user-blocks endpoint.
+ * @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 UserBlocksManager = 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');
+ }
+
+ var clientOptions = {
+ errorFormatter: { message: 'message', name: 'error' },
+ headers: options.headers,
+ query: { repeatParams: false }
+ };
+
+ var userBlocksByIdResource = new Auth0RestClient(
+ options.baseUrl + '/user-blocks/:id',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.userBlocksById = new RetryRestClient(userBlocksByIdResource, options.retry);
+
+ var userBlocksByIdentifierResource = new Auth0RestClient(
+ options.baseUrl + '/user-blocks',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.userBlocksByIdentifier = new RetryRestClient(userBlocksByIdentifierResource, options.retry);
+};
+
+/**
+ * Get user blocks by id.
+ *
+ * @method get
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.get({ id: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+UserBlocksManager.prototype.get = function(params) {
+ if (typeof params !== 'object' || typeof params.id !== 'string') {
+ throw new ArgumentError('You must provide an user id for the get method');
+ }
+
+ return this.userBlocksById.get.apply(this.userBlocksById, arguments);
+};
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method delete
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.delete({ id: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+UserBlocksManager.prototype.delete = function(params) {
+ if (typeof params !== 'object' || typeof params.id !== 'string') {
+ throw new ArgumentError('You must provide an user id for the delete method');
+ }
+
+ return this.userBlocksById.delete.apply(this.userBlocksById, arguments);
+};
+
+/**
+ * Get user blocks by identifier.
+ *
+ * @method getByIdentifier
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.getByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+ UserBlocksManager.prototype.getByIdentifier = function(params) {
+ if (typeof params !== 'object' || typeof params.identifier !== 'string') {
+ throw new ArgumentError('You must provide an user identifier for the getByIdentifier method');
+ }
+
+ return this.userBlocksByIdentifier.get.apply(this.userBlocksByIdentifier, arguments);
+ };
+
+/**
+ * Unblock an user by identifier.
+ *
+ * @method deleteByIdentifier
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.deleteByIdentifier({ identifier: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+ UserBlocksManager.prototype.deleteByIdentifier = function(params) {
+ if (typeof params !== 'object' || typeof params.identifier !== 'string') {
+ throw new ArgumentError('You must provide an user identifier for the deleteByIdentifier method');
+ }
+
+ return this.userBlocksByIdentifier.delete.apply(this.userBlocksByIdentifier, arguments);
+ };
+
+ module.exports = UserBlocksManager;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/management_UsersManager.js.html b/docs/management_UsersManager.js.html
index 9f330abbb..4cca607bf 100644
--- a/docs/management_UsersManager.js.html
+++ b/docs/management_UsersManager.js.html
@@ -24,7 +24,7 @@
@@ -927,7 +927,7 @@ management/UsersManager.js
diff --git a/docs/management_index.js.html b/docs/management_index.js.html
index 4d6da6415..d6009ca1a 100644
--- a/docs/management_index.js.html
+++ b/docs/management_index.js.html
@@ -24,7 +24,7 @@
@@ -42,10 +42,9 @@ management/index.js
/** @module management */
var util = require('util');
-
-var pkg = require('../../package.json');
var utils = require('../utils');
var jsonToBase64 = utils.jsonToBase64;
+var generateClientInfo = utils.generateClientInfo;
var ArgumentError = require('rest-facade').ArgumentError;
var assign = Object.assign || require('object.assign');
@@ -54,6 +53,7 @@ management/index.js
var ClientGrantsManager = require('./ClientGrantsManager');
var GrantsManager = require('./GrantsManager');
var UsersManager = require('./UsersManager');
+var UserBlocksManager = require('./UserBlocksManager');
var ConnectionsManager = require('./ConnectionsManager');
var BlacklistedTokensManager = require('./BlacklistedTokensManager');
var RulesManager = require('./RulesManager');
@@ -170,8 +170,11 @@ management/index.js
}
if (options.telemetry !== false) {
- var telemetry = jsonToBase64(options.clientInfo || this.getClientInfo());
- managerOptions.headers['Auth0-Client'] = telemetry;
+ var clientInfo = options.clientInfo || generateClientInfo();
+ if ('string' === typeof clientInfo.name && clientInfo.name.length > 0) {
+ var telemetry = jsonToBase64(clientInfo);
+ managerOptions.headers['Auth0-Client'] = telemetry;
+ }
}
managerOptions.retry = options.retry;
@@ -208,6 +211,14 @@ management/index.js
*/
this.users = new UsersManager(managerOptions);
+ /**
+ * Simple abstraction for performing CRUD operations on the
+ * user-blocks endpoint.
+ *
+ * @type {UserBlocksManager}
+ */
+ this.userBlocks = new UserBlocksManager(managerOptions);
+
/**
* Simple abstraction for performing CRUD operations on the
* guardian endpoint.
@@ -331,37 +342,6 @@ management/index.js
this.roles = new RolesManager(managerOptions);
};
-/**
- * Return an object with information about the current client,
- *
- * @method getClientInfo
- * @memberOf module:management.ManagementClient.prototype
- *
- * @return {Object} Object containing client information.
- */
-ManagementClient.prototype.getClientInfo = function() {
- var clientInfo = {
- name: 'node-auth0',
- version: pkg.version,
- dependencies: [],
- environment: [
- {
- name: 'node.js',
- version: process.version.replace('v', '')
- }
- ]
- };
- // Add the dependencies to the client info object.
- Object.keys(pkg.dependencies).forEach(function(name) {
- clientInfo.dependencies.push({
- name: name,
- version: pkg.dependencies[name]
- });
- });
-
- return clientInfo;
-};
-
/**
* Get all connections.
*
@@ -1572,6 +1552,98 @@ management/index.js
'users.regenerateRecoveryCode'
);
+/**
+ * Get user blocks by its id.
+ *
+ * @method getUserBlocks
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.getUserBlocks({ id: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'getUserBlocks', 'userBlocks.get');
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method unblockUser
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.unblockUser({ id: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'unblockUser', 'userBlocks.delete');
+
+/**
+ * Get user blocks by its identifier.
+ *
+ * @method getUserBlocksByIdentifier
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.getUserBlocksByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'getUserBlocksByIdentifier', 'userBlocks.getByIdentifier');
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method unblockUser
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.unblockUserByIdentifier({ identifier: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'unblockUserByIdentifier', 'userBlocks.deleteByIdentifier');
+
/**
* Get a single Guardian enrollment.
*
@@ -1964,7 +2036,7 @@ management/index.js
* user_id: '{USER_ID}'
* };
*
- * management.sendEmailVerification(function (err) {
+ * management.sendEmailVerification(params, function (err) {
* if (err) {
* // Handle error.
* }
@@ -2778,7 +2850,7 @@ management/index.js
diff --git a/docs/module-auth.AuthenticationClient.html b/docs/module-auth.AuthenticationClient.html
index 86d7d5b8a..faff593e3 100644
--- a/docs/module-auth.AuthenticationClient.html
+++ b/docs/module-auth.AuthenticationClient.html
@@ -24,7 +24,7 @@
@@ -103,7 +103,7 @@ n
databaseSource:
oauthSource:
passwordl
tokensSource:
usersSource:
changeP
Source:
Example
-
-
-
-
- getClientInfo() → {Object}
-
-
-
-
-
-
- Return an object with information about the current client,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
-
-
-
-
-
- Object containing client information.
-
-
-
-
-
-
-
-
-
-
@@ -1494,7 +1386,7 @@ get
getProfile<
password
refreshTo
reque
reque
request
verifySM
Examples
diff --git a/docs/module-auth.DatabaseAuthenticator.html b/docs/module-auth.DatabaseAuthenticator.html
index edaf06cc6..223037466 100644
--- a/docs/module-auth.DatabaseAuthenticator.html
+++ b/docs/module-auth.DatabaseAuthenticator.html
@@ -24,7 +24,7 @@
@@ -456,7 +456,7 @@ changeP
signInSource:
signUpSource:
Example
diff --git a/docs/module-auth.OAUthWithIDTokenValidation.html b/docs/module-auth.OAUthWithIDTokenValidation.html
index e9938b53c..a573702b6 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 53f0c464f..75f97d9cf 100644
--- a/docs/module-auth.OAuthAuthenticator.html
+++ b/docs/module-auth.OAuthAuthenticator.html
@@ -24,7 +24,7 @@
@@ -500,7 +500,7 @@ Source:
password
refreshTo
signInSource:
socialSig
Returns:
diff --git a/docs/module-auth.PasswordlessAuthenticator.html b/docs/module-auth.PasswordlessAuthenticator.html
index e7917a34b..4faf4561f 100644
--- a/docs/module-auth.PasswordlessAuthenticator.html
+++ b/docs/module-auth.PasswordlessAuthenticator.html
@@ -24,7 +24,7 @@
@@ -455,7 +455,7 @@ sendEmailSource:
sendSMSSource:
signInSource:
Examples
diff --git a/docs/module-auth.TokensManager.html b/docs/module-auth.TokensManager.html
index 9cce2d10d..05b659b5c 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 384968aae..75e286761 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 fe29f3866..8d1b56062 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 7a5b7f786..238929693 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 c6582dd4c..04ee24d7f 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 e6e53026f..ff7d57a16 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 49b038240..4c2f59ce1 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 cd019aa11..7b94c72fa 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 cf109bcaf..5eb06126b 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 2ddc399ed..fc7fbf0bc 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 ade45bd25..fdfb922d2 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 99216617b..b57cf61b0 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 d6bd3438b..c72346609 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 c2adbe428..b8b9ab2c7 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 c15ce93bc..03cf7f9e3 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 f65be0741..5631eda4e 100644
--- a/docs/module-management.ManagementClient.html
+++ b/docs/module-management.ManagementClient.html
@@ -24,7 +24,7 @@
@@ -723,7 +723,7 @@ blac
clientGra
clientsSource:
connection
customDo
devi
emailPro
emailTe
grantsSource:
guardianSource:
jobsSource:
logsSource:
resour
rolesSource:
rulesSource:
rulesConf
statsSource:
tenantSource:
ticketsSource:
Type:
+
+
+
+
+
+userBlocks :UserBlocksManager
+
+
+
+
+
+ Simple abstraction for performing CRUD operations on the
+user-blocks endpoint.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
@@ -2142,7 +2217,7 @@ usersSource:
a
Source:
assi
blackli
Source:
createCli
crea
creat
cre
Source:
Source:
c
createRole<
createRule<
createUser<
deleteA
deleteCli
dele
delet
del
Source:
de
Source:
d
deleteRole<
deleteRule<
dele
deleteUser<
exportUser
ge
g
getClientSource:
getCli
Example
-
-
-
-
- getClientInfo() → {Object}
-
-
-
-
-
-
- Return an object with information about the current client,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
-
-
-
-
-
- Object containing client information.
-
-
-
-
-
-
-
-
-
-
@@ -11761,7 +11728,7 @@ getClients<
getConne
getConn
getCus
getCu
getDaily
g
getEm
getGrantsSource:
Source:
getJobSource:
getLogSource:
getLogsSource:
g
getR
get
getRoleSource:
getRolesSource:
getRuleSource:
getRulesSource:
getRul
getT
getUserSource:
Example
- getUserLogs(params, cbopt) → {Promise|undefined}
+ getUserBlocks(params, cbopt) → {Promise|undefined}
- Get user's log events.
+ Get user blocks by its id.
@@ -18429,7 +18396,7 @@ getUserLog
Parameters:
- Get logs data.
+ The user data object..
@@ -18543,33 +18510,15 @@ Parameters:
- User id.
+ The user id.
+
+
-
-
- per_page
-
-
-
-
-
-Number
-
-
-
-
-
-
-
-
-
-
- Number of results per page.
@@ -18578,76 +18527,259 @@ Parameters:
- page
+ cb
-Number
+function
+
+
+ <optional>
+
+
+
+
+
+
+
- Page number, zero indexed.
+ Callback function
+
+
-
-
- 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
-
-
-
-
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getUserBlocks({ id: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
+
+
+
+
+
+
+
+
+
+
+ getUserBlocksByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get user blocks by its identifier.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- true if a query summary must be included in the result, false otherwise. Default false;
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user identifier, any of: username, phone_number, email.
@@ -18691,7 +18823,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -18742,14 +18874,12 @@ Returns:
Example
- var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-
-management.getUserLogs(params, function (err, logs) {
+ management.getUserBlocksByIdentifier({ identifier: USER_ID }, function (err, blocks) {
if (err) {
// Handle error.
}
- console.log(logs);
+ console.log(blocks);
});
@@ -18761,14 +18891,14 @@ Example
- getUserPermissions(params, cbopt) → {Promise|undefined}
+ getUserLogs(params, cbopt) → {Promise|undefined}
- Get user's permissions
+ Get user's log events.
@@ -18804,7 +18934,7 @@ get
Parameters:
- Get permissions data.
+ Get logs data.
@@ -19119,7 +19249,7 @@ Example
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-management.getUserPermissions(params, function (err, logs) {
+management.getUserLogs(params, function (err, logs) {
if (err) {
// Handle error.
}
@@ -19136,14 +19266,14 @@ Example
- getUserRoles(params, cbopt) → {Promise|undefined}
+ getUserPermissions(params, cbopt) → {Promise|undefined}
- Get user's roles
+ Get user's permissions
@@ -19179,7 +19309,7 @@ getUserRo
Parameters:
- Get roles data.
+ Get permissions data.
@@ -19494,7 +19624,7 @@ Example
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-management.getUserRoles(params, function (err, logs) {
+management.getUserPermissions(params, function (err, logs) {
if (err) {
// Handle error.
}
@@ -19511,14 +19641,14 @@ Example
- getUsers(paramsopt, cbopt) → {Promise|undefined}
+ getUserRoles(params, cbopt) → {Promise|undefined}
- Get all users.
+ Get user's roles
@@ -19554,7 +19684,7 @@ getUsersSource:
Parameters:
- <optional>
-
@@ -19627,7 +19755,7 @@ Parameters:
- Users params.
+ Get roles data.
@@ -19641,8 +19769,6 @@ Parameters:
Type
- Attributes
-
@@ -19655,34 +19781,24 @@ Parameters:
- search_engine
+ id
-Number
+String
-
-
- <optional>
-
-
-
-
-
-
-
- The version of the search engine to use.
+ User id.
@@ -19704,16 +19820,6 @@ Parameters:
-
-
- <optional>
-
-
-
-
-
-
-
@@ -19740,21 +19846,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;
@@ -19849,21 +19997,14 @@ Returns:
Example
-
-
- // Pagination settings.
-var params = {
- search_engine: 'v3',
- per_page: 10,
- page: 0
-};
+ var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-auth0.getUsers(params, function (err, users) {
- console.log(users.length);
+management.getUserRoles(params, function (err, logs) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(logs);
});
@@ -19875,14 +20016,14 @@ Example
- getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
+ getUsers(paramsopt, cbopt) → {Promise|undefined}
- Get users for a given email address
+ Get all users.
@@ -19918,7 +20059,7 @@ getUse
Parameters:
- email
+ params
-String
+Object
@@ -19991,7 +20132,142 @@ Parameters:
- Email Address of users to locate
+ Users params.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ search_engine
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ The version of the search engine to use.
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Number of results per page.
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Page number, zero indexed.
+
+
+
+
+
+
+
+
@@ -20079,12 +20355,20 @@ Returns:
Example
- auth0.getUsersByEmail(email, function (err, users) {
- console.log(users);
+ // Pagination settings.
+var params = {
+ search_engine: 'v3',
+ per_page: 10,
+ page: 0
+};
+
+auth0.getUsers(params, function (err, users) {
+ console.log(users.length);
});
@@ -20096,14 +20380,14 @@ Example
- getUsersInRole(roleIdopt, cbopt) → {Promise|undefined}
+ getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
- Get users in a given role
+ Get users for a given email address
@@ -20139,7 +20423,7 @@ getUser
Parameters:
- roleId
+ email
@@ -20212,7 +20496,7 @@ Parameters:
- Id of the role
+ Email Address of users to locate
@@ -20297,17 +20581,14 @@ Returns:
-Examples
-
- var params = { id :'ROLE_ID'};
+Example
- management.getUsersInRole(params, function (err, users) {
+ auth0.getUsersByEmail(email, function (err, users) {
console.log(users);
});
@@ -20320,15 +20601,14 @@ Examples
- importUsers(data, cbopt) → {Promise|undefined}
+ getUsersInRole(roleIdopt, 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.
+ Get users in a given role
@@ -20364,7 +20644,7 @@ importUser
Parameters:
- data
+ roleId
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Id of the role
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Examples
+
+ var params = { id :'ROLE_ID'};
+
+
+
+ management.getUsersInRole(params, function (err, users) {
+ console.log(users);
+});
+
+
+
+
+
+
+
+
+
+
+ importUsers(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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
@@ -20662,7 +21167,7 @@ linkUsersSource:
Parameters:
- user_id
+ user_id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ ID of the user to be linked.
+
+
+
+
+
+
+
+
+ connection_id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ ID of the connection to be used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ var userId = 'USER_ID';
+var params = {
+ user_id: 'OTHER_USER_ID',
+ connection_id: 'CONNECTION_ID'
+};
+
+management.linkUsers(userId, params, function (err, user) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Users linked.
+});
+
+
+
+
+
+
+
+
+
+
+ regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Generate new Guardian recovery code.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
+ console.log(newRecoveryCode);
+});
+
+
+
+
+
+
+
+
+
+
+ removePermissionsFromRole(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
@@ -20810,7 +21958,7 @@ Parameters:
- ID of the user to be linked.
+ Name of a permission
@@ -20819,7 +21967,7 @@ Parameters:
- connection_id
+ resource_server_identifier
@@ -20836,7 +21984,15 @@ Parameters:
- ID of the connection to be used.
+ Identifier for a resource
+
+
+
+
+
+
+
+
@@ -20931,18 +22087,11 @@ Returns:
Example
- var userId = 'USER_ID';
-var params = {
- user_id: 'OTHER_USER_ID',
- connection_id: 'CONNECTION_ID'
-};
-
-management.linkUsers(userId, params, function (err, user) {
- if (err) {
- // Handle error.
- }
+ var params = { id :'ROLE_ID'};
+var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
- // Users linked.
+management.removePermissionsFromRole(params, data, function (err, permissions) {
+ console.log(permissions);
});
@@ -20954,14 +22103,14 @@ Example
- regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
+ removePermissionsFromUser(params, data, cbopt) → {Promise|undefined}
- Generate new Guardian recovery code.
+ Remove permissions from a user
@@ -20997,7 +22146,7 @@ Source:
Parameters:
- data
+ params
@@ -21068,7 +22217,7 @@ Parameters:
- The user data object.
+ params object
@@ -21111,7 +22260,92 @@ Parameters:
- The user id.
+ user_id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data object containing list of permission IDs
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Array of permission IDs
@@ -21206,8 +22440,15 @@ Returns:
Example
- management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
- console.log(newRecoveryCode);
+ 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.
});
@@ -21219,14 +22460,14 @@ Example
- removePermissionsFromRole(data, cbopt) → {Promise|undefined}
+ removeRolesFromUser(params, data, cbopt) → {Promise|undefined}
- Remove permissions from a role
+ Remove roles from a user
@@ -21262,7 +22503,7 @@ Source:
Parameters:
- params.id
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ID of the Role.
-
-
-
-
-
-
-
-
- data
+ params
@@ -21367,7 +22574,7 @@ Parameters:
- permissions data
+ params object
@@ -21393,7 +22600,7 @@ Parameters:
- permissions
+ id
@@ -21410,33 +22617,24 @@ Parameters:
- Array of permissions
+ user_id
-
-
-
-
-
-
- Name
-
-
- Type
-
-
+
+
-
+
+
+
- Description
-
-
+
+
+
-
- permission_name
+ data
@@ -21449,20 +22647,45 @@ Parameters:
+
+
+
+
+
+
+
+
- Name of a permission
+ data object containing list of role IDs
-
-
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
- resource_server_identifier
+ roles
@@ -21479,15 +22702,7 @@ Parameters:
- Identifier for a resource
-
-
-
-
-
-
-
-
+ Array of role IDs
@@ -21582,11 +22797,15 @@ Returns:
Example
- var params = { id :'ROLE_ID'};
-var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+ var parms = { id : 'USER_ID'};
+var data = { "roles" :["role1"]};
+
+management.removeRolesFromUser(params, data, function (err) {
+ if (err) {
+ // Handle error.
+ }
-management.removePermissionsFromRole(params, data, function (err, permissions) {
- console.log(permissions);
+ // User assigned roles.
});
@@ -21598,14 +22817,14 @@ Example
- removePermissionsFromUser(params, data, cbopt) → {Promise|undefined}
+ sendEmailVerification(data, cbopt) → {Promise|undefined}
- Remove permissions from a user
+ Send a verification email to a user.
@@ -21641,7 +22860,7 @@ Source:
Parameters:
-
-
- params
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- params object
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- id
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- user_id
-
-
-
-
-
-
-
-
-
-
-
-
-
-
data
@@ -21778,7 +22912,7 @@ Parameters:
-String
+Object
@@ -21797,7 +22931,7 @@ Parameters:
- data object containing list of permission IDs
+ User data object.
@@ -21823,7 +22957,7 @@ Parameters:
- permissions
+ user_id
@@ -21840,7 +22974,7 @@ Parameters:
- Array of permission IDs
+ ID of the user to be verified.
@@ -21935,15 +23069,14 @@ Returns:
Example
- var parms = { id : 'USER_ID'};
-var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+ var params = {
+ user_id: '{USER_ID}'
+};
-management.removePermissionsFromUser(params, data, function (err) {
+management.sendEmailVerification(params, function (err) {
if (err) {
// Handle error.
}
-
- // User assigned permissions.
});
@@ -21955,14 +23088,14 @@ Example
- removeRolesFromUser(params, data, cbopt) → {Promise|undefined}
+ setRulesConfig(params, data, cbopt) → {Promise|undefined}
- Remove roles from a user
+ Set a new rules config.
@@ -21998,7 +23131,7 @@ re
Parameters:
- params object
+ Rule Config parameters.
@@ -22095,7 +23228,7 @@ Parameters:
- id
+ key
@@ -22112,7 +23245,7 @@ Parameters:
- user_id
+ Rule Config key.
@@ -22135,7 +23268,7 @@ Parameters:
-String
+Object
@@ -22154,7 +23287,7 @@ Parameters:
- data object containing list of role IDs
+ Rule Config Data parameters.
@@ -22180,7 +23313,7 @@ Parameters:
- roles
+ value
@@ -22197,7 +23330,7 @@ Parameters:
- Array of role IDs
+ Rule Config Data value.
@@ -22292,15 +23425,15 @@ Returns:
Example
- var parms = { id : 'USER_ID'};
-var data = { "roles" :["role1"]};
+ var params = { key: RULE_CONFIG_KEY };
+var data = { value: RULES_CONFIG_VALUE };
-management.removeRolesFromUser(params, data, function (err) {
+management.setRulesConfig(params, data, function (err, rulesConfig) {
if (err) {
// Handle error.
}
- // User assigned roles.
+ // Rules Config set.
});
@@ -22312,14 +23445,14 @@ Example
- sendEmailVerification(data, cbopt) → {Promise|undefined}
+ unblockUser(params, cbopt) → {Promise|undefined}
- Send a verification email to a user.
+ Unblock an user by its id.
@@ -22355,7 +23488,7 @@
Parameters:
- data
+ params
@@ -22426,7 +23559,7 @@ Parameters:
- User data object.
+ The user data object..
@@ -22452,7 +23585,7 @@ Parameters:
- user_id
+ identifier
@@ -22469,7 +23602,7 @@ Parameters:
- ID of the user to be verified.
+ The user identifier, any of: username, phone_number, email.
@@ -22513,7 +23646,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -22564,14 +23697,12 @@ Returns:
Example
- var params = {
- user_id: '{USER_ID}'
-};
-
-management.sendEmailVerification(function (err) {
+ management.unblockUserByIdentifier({ identifier: USER_ID }, function (err) {
if (err) {
// Handle error.
}
+
+ // User unblocked.
});
@@ -22583,14 +23714,14 @@ Example
- setRulesConfig(params, data, cbopt) → {Promise|undefined}
+ unblockUser(params, cbopt) → {Promise|undefined}
- Set a new rules config.
+ Unblock an user by its id.
@@ -22626,7 +23757,7 @@ setRule
Parameters:
- Rule Config parameters.
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- key
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- Rule Config key.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- data
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Rule Config Data parameters.
+ The user data object..
@@ -22808,7 +23854,7 @@ Parameters:
- value
+ id
@@ -22825,7 +23871,7 @@ Parameters:
- Rule Config Data value.
+ The user id.
@@ -22869,7 +23915,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -22920,15 +23966,12 @@ Returns:
Example
- var params = { key: RULE_CONFIG_KEY };
-var data = { value: RULES_CONFIG_VALUE };
-
-management.setRulesConfig(params, data, function (err, rulesConfig) {
+ management.unblockUser({ id: USER_ID }, function (err) {
if (err) {
// Handle error.
}
- // Rules Config set.
+ // User unblocked.
});
@@ -22983,7 +24026,7 @@ unlinkUser
upda
updateCli
upda
updat
up
u
updateRole<
updateRule<
u
updateUser<
upd
ver
Example
diff --git a/docs/module-management.ManagementTokenProvider.html b/docs/module-management.ManagementTokenProvider.html
index 82e343e91..2a4383477 100644
--- a/docs/module-management.ManagementTokenProvider.html
+++ b/docs/module-management.ManagementTokenProvider.html
@@ -24,7 +24,7 @@
@@ -556,7 +556,7 @@ getAcce
Returns:
diff --git a/docs/module-management.ResourceServersManager.html b/docs/module-management.ResourceServersManager.html
index 7b3909213..46b96c0b0 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 6064aa6ff..e4f774f8b 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
index a5a59af78..c90f9dbf7 100644
--- a/docs/module-management.RolesManager.html
+++ b/docs/module-management.RolesManager.html
@@ -24,7 +24,7 @@
@@ -4217,7 +4217,7 @@ Example
diff --git a/docs/module-management.RulesConfigsManager.html b/docs/module-management.RulesConfigsManager.html
index 6c0be5d76..f75318df5 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 84d895c28..2d4f771db 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 e3d8ffa17..1e1a843ec 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 c01a5bcc6..94e05610a 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 dd25b20f3..2da480bb0 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.UserBlocksManager.html b/docs/module-management.UserBlocksManager.html
new file mode 100644
index 000000000..d0e9eb359
--- /dev/null
+++ b/docs/module-management.UserBlocksManager.html
@@ -0,0 +1,1441 @@
+
+
+
+
+
+ UserBlocksManager - Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UserBlocksManager
+
+
+
+
+
+
+
+
+
+
+
+
+ management.
+
+ UserBlocksManager
+
+
+ Abstracts interaction with the user-blocks endpoint.
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+ new UserBlocksManager(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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ delete(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Unblock an user by its id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.delete({ id: USER_ID }, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // User unblocked.
+});
+
+
+
+
+
+
+
+
+
+
+ deleteByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Unblock an user by identifier.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user identifier, any of: username, phone_number, email.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.deleteByIdentifier({ identifier: USER_ID }, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // User unblocked.
+});
+
+
+
+
+
+
+
+
+
+
+ get(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get user blocks by id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.get({ id: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
+
+
+
+
+
+
+
+
+
+
+ getByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get user blocks by identifier.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user identifier, any of: username, phone_number, email.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.getByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-management.UsersManager.html b/docs/module-management.UsersManager.html
index 8e5cf0a2e..dbf1ccc33 100644
--- a/docs/module-management.UsersManager.html
+++ b/docs/module-management.UsersManager.html
@@ -24,7 +24,7 @@
@@ -5753,7 +5753,7 @@ Example
diff --git a/docs/module-management.html b/docs/module-management.html
index 59dfc7588..669d7e280 100644
--- a/docs/module-management.html
+++ b/docs/module-management.html
@@ -24,7 +24,7 @@
@@ -128,6 +128,9 @@ Classes
Classes
diff --git a/docs/module-utils.html b/docs/module-utils.html
index c9cd94e0a..f8c6f999d 100644
--- a/docs/module-utils.html
+++ b/docs/module-utils.html
@@ -24,7 +24,7 @@
@@ -71,6 +71,114 @@ Methods
+
+
+
+
+ (static) generateClientInfo() → {Object}
+
+
+
+
+
+
+ Return an object with information about the current client.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Object containing client information.
+
+
+
+
+
+
+
+
+
+
@@ -119,7 +227,7 @@ (static) <
(static) Source:
(static)
(static)
diff --git a/docs/utils.js.html b/docs/utils.js.html
index dcd265d5d..c87d4e5f7 100644
--- a/docs/utils.js.html
+++ b/docs/utils.js.html
@@ -24,7 +24,7 @@
@@ -41,6 +41,7 @@ utils.js
var Promise = require('bluebird');
var request = require('request');
+var pkg = require('../package.json');
/**
* @module utils
@@ -63,6 +64,24 @@ utils.js
.replace(/=+$/, '');
};
+/**
+ * Return an object with information about the current client.
+ *
+ * @method generateClientInfo
+ * @memberOf module:utils
+ *
+ * @return {Object} Object containing client information.
+ */
+utils.generateClientInfo = function() {
+ return {
+ name: 'node-auth0',
+ version: pkg.version,
+ env: {
+ node: process.version.replace('v', '')
+ }
+ };
+};
+
/**
* Simple wrapper that, given a class, a property name and a method name,
* creates a new method in the class that is a wrapper for the given
@@ -124,7 +143,7 @@ utils.js
diff --git a/package.json b/package.json
index 4dae031c7..aa642e9f6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "auth0",
- "version": "2.17.0",
+ "version": "2.17.1",
"description": "SDK for Auth0 API v2",
"main": "src/index.js",
"files": [
diff --git a/docs/index.html b/docs/index.html
index 59b2d5896..15cb84272 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 094cc993b..685b70954 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 ca8b9a674..57789b280 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 35705ce1a..047a4b671 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 c976734cd..fa51ba415 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 2652dc8d3..03aa47fa2 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 c9ed7853b..37a44518e 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 88683e316..8efae0c68 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 01384f0f8..3b75e5dd2 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 6438643cb..428a57e77 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 ccceff56b..b434190dd 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 a83fef1f9..1296db43f 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 9b1f553c9..78f3bc81d 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 a1c5c3285..13159d3fd 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 d54e67e7f..c4b5e2e84 100644
--- a/docs/management_ManagementTokenProvider.js.html
+++ b/docs/management_ManagementTokenProvider.js.html
@@ -24,7 +24,7 @@
@@ -108,7 +108,8 @@ management/ManagementTokenProvider.js
domain: this.options.domain,
clientId: this.options.clientId,
clientSecret: this.options.clientSecret,
- telemetry: this.options.telemetry
+ telemetry: this.options.telemetry,
+ clientInfo: this.options.clientInfo
};
this.authenticationClient = new AuthenticationClient(authenticationClientOptions);
};
@@ -189,7 +190,7 @@ management/ManagementTokenProvider.js
diff --git a/docs/management_ResourceServersManager.js.html b/docs/management_ResourceServersManager.js.html
index 6e22790ed..00def9033 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
index adcf4d6a0..47ab35ff9 100644
--- a/docs/management_RolesManager.js.html
+++ b/docs/management_RolesManager.js.html
@@ -24,7 +24,7 @@
@@ -453,7 +453,7 @@ management/RolesManager.js
diff --git a/docs/management_RulesConfigsManager.js.html b/docs/management_RulesConfigsManager.js.html
index 4164615e5..28ceed46c 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 7cde7ef0c..f7ba7415b 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 93c852667..4f40e59ab 100644
--- a/docs/management_StatsManager.js.html
+++ b/docs/management_StatsManager.js.html
@@ -24,7 +24,7 @@
@@ -90,7 +90,7 @@ management/StatsManager.js
clientOptions,
options.tokenProvider
);
- this.stats = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -125,10 +125,10 @@ management/StatsManager.js
params.type = 'daily';
if (cb && cb instanceof Function) {
- return this.stats.get(params, cb);
+ return this.resource.get(params, cb);
}
- return this.stats.get(params);
+ return this.resource.get(params);
};
/**
@@ -154,11 +154,11 @@ management/StatsManager.js
var options = { type: 'active-users' };
if (cb && cb instanceof Function) {
- return this.stats.get(options, cb);
+ return this.resource.get(options, cb);
}
// Return a promise.
- return this.stats.get(options);
+ return this.resource.get(options);
};
module.exports = StatsManager;
@@ -174,7 +174,7 @@ management/StatsManager.js
diff --git a/docs/management_TenantManager.js.html b/docs/management_TenantManager.js.html
index db15c4e7b..f2d412579 100644
--- a/docs/management_TenantManager.js.html
+++ b/docs/management_TenantManager.js.html
@@ -24,7 +24,7 @@
@@ -90,7 +90,7 @@ management/TenantManager.js
clientOptions,
options.tokenProvider
);
- this.tenant = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -113,11 +113,11 @@ management/TenantManager.js
*/
TenantManager.prototype.updateSettings = function(data, cb) {
if (cb && cb instanceof Function) {
- return this.tenant.patch({}, data, cb);
+ return this.resource.patch({}, data, cb);
}
// Return a promise.
- return this.tenant.patch({}, data);
+ return this.resource.patch({}, data);
};
/**
@@ -141,11 +141,11 @@ management/TenantManager.js
*/
TenantManager.prototype.getSettings = function(cb) {
if (cb && cb instanceof Function) {
- return this.tenant.get({}, cb);
+ return this.resource.get({}, cb);
}
// Return a promise.
- return this.tenant.get({});
+ return this.resource.get({});
};
module.exports = TenantManager;
@@ -161,7 +161,7 @@ management/TenantManager.js
diff --git a/docs/management_TicketsManager.js.html b/docs/management_TicketsManager.js.html
index 418b10d7e..5a61cf0ea 100644
--- a/docs/management_TicketsManager.js.html
+++ b/docs/management_TicketsManager.js.html
@@ -24,7 +24,7 @@
@@ -84,7 +84,7 @@ management/TicketsManager.js
clientOptions,
options.tokenProvider
);
- this.ticket = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -114,11 +114,11 @@ management/TicketsManager.js
var params = { type: 'password-change' };
if (cb && cb instanceof Function) {
- return this.ticket.create(params, data, cb);
+ return this.resource.create(params, data, cb);
}
// Return a promise.
- return this.ticket.create(params, data);
+ return this.resource.create(params, data);
};
/**
@@ -146,11 +146,11 @@ management/TicketsManager.js
var params = { type: 'email-verification' };
if (cb && cb instanceof Function) {
- return this.ticket.create(params, data, cb);
+ return this.resource.create(params, data, cb);
}
// Return a promise.
- return this.ticket.create(params, data);
+ return this.resource.create(params, data);
};
module.exports = TicketsManager;
@@ -166,7 +166,7 @@ management/TicketsManager.js
diff --git a/docs/management_UserBlocksManager.js.html b/docs/management_UserBlocksManager.js.html
new file mode 100644
index 000000000..2e639e3d7
--- /dev/null
+++ b/docs/management_UserBlocksManager.js.html
@@ -0,0 +1,236 @@
+
+
+
+
+
+ management/UserBlocksManager.js - Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ management/UserBlocksManager.js
+
+
+
+
+
+
+
+
+
+ var ArgumentError = require('rest-facade').ArgumentError;
+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
+ * Abstracts interaction with the user-blocks endpoint.
+ * @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 UserBlocksManager = 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');
+ }
+
+ var clientOptions = {
+ errorFormatter: { message: 'message', name: 'error' },
+ headers: options.headers,
+ query: { repeatParams: false }
+ };
+
+ var userBlocksByIdResource = new Auth0RestClient(
+ options.baseUrl + '/user-blocks/:id',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.userBlocksById = new RetryRestClient(userBlocksByIdResource, options.retry);
+
+ var userBlocksByIdentifierResource = new Auth0RestClient(
+ options.baseUrl + '/user-blocks',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.userBlocksByIdentifier = new RetryRestClient(userBlocksByIdentifierResource, options.retry);
+};
+
+/**
+ * Get user blocks by id.
+ *
+ * @method get
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.get({ id: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+UserBlocksManager.prototype.get = function(params) {
+ if (typeof params !== 'object' || typeof params.id !== 'string') {
+ throw new ArgumentError('You must provide an user id for the get method');
+ }
+
+ return this.userBlocksById.get.apply(this.userBlocksById, arguments);
+};
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method delete
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.delete({ id: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+UserBlocksManager.prototype.delete = function(params) {
+ if (typeof params !== 'object' || typeof params.id !== 'string') {
+ throw new ArgumentError('You must provide an user id for the delete method');
+ }
+
+ return this.userBlocksById.delete.apply(this.userBlocksById, arguments);
+};
+
+/**
+ * Get user blocks by identifier.
+ *
+ * @method getByIdentifier
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.getByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+ UserBlocksManager.prototype.getByIdentifier = function(params) {
+ if (typeof params !== 'object' || typeof params.identifier !== 'string') {
+ throw new ArgumentError('You must provide an user identifier for the getByIdentifier method');
+ }
+
+ return this.userBlocksByIdentifier.get.apply(this.userBlocksByIdentifier, arguments);
+ };
+
+/**
+ * Unblock an user by identifier.
+ *
+ * @method deleteByIdentifier
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.deleteByIdentifier({ identifier: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+ UserBlocksManager.prototype.deleteByIdentifier = function(params) {
+ if (typeof params !== 'object' || typeof params.identifier !== 'string') {
+ throw new ArgumentError('You must provide an user identifier for the deleteByIdentifier method');
+ }
+
+ return this.userBlocksByIdentifier.delete.apply(this.userBlocksByIdentifier, arguments);
+ };
+
+ module.exports = UserBlocksManager;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/management_UsersManager.js.html b/docs/management_UsersManager.js.html
index 9f330abbb..4cca607bf 100644
--- a/docs/management_UsersManager.js.html
+++ b/docs/management_UsersManager.js.html
@@ -24,7 +24,7 @@
@@ -927,7 +927,7 @@ management/UsersManager.js
diff --git a/docs/management_index.js.html b/docs/management_index.js.html
index 4d6da6415..d6009ca1a 100644
--- a/docs/management_index.js.html
+++ b/docs/management_index.js.html
@@ -24,7 +24,7 @@
@@ -42,10 +42,9 @@ management/index.js
/** @module management */
var util = require('util');
-
-var pkg = require('../../package.json');
var utils = require('../utils');
var jsonToBase64 = utils.jsonToBase64;
+var generateClientInfo = utils.generateClientInfo;
var ArgumentError = require('rest-facade').ArgumentError;
var assign = Object.assign || require('object.assign');
@@ -54,6 +53,7 @@ management/index.js
var ClientGrantsManager = require('./ClientGrantsManager');
var GrantsManager = require('./GrantsManager');
var UsersManager = require('./UsersManager');
+var UserBlocksManager = require('./UserBlocksManager');
var ConnectionsManager = require('./ConnectionsManager');
var BlacklistedTokensManager = require('./BlacklistedTokensManager');
var RulesManager = require('./RulesManager');
@@ -170,8 +170,11 @@ management/index.js
}
if (options.telemetry !== false) {
- var telemetry = jsonToBase64(options.clientInfo || this.getClientInfo());
- managerOptions.headers['Auth0-Client'] = telemetry;
+ var clientInfo = options.clientInfo || generateClientInfo();
+ if ('string' === typeof clientInfo.name && clientInfo.name.length > 0) {
+ var telemetry = jsonToBase64(clientInfo);
+ managerOptions.headers['Auth0-Client'] = telemetry;
+ }
}
managerOptions.retry = options.retry;
@@ -208,6 +211,14 @@ management/index.js
*/
this.users = new UsersManager(managerOptions);
+ /**
+ * Simple abstraction for performing CRUD operations on the
+ * user-blocks endpoint.
+ *
+ * @type {UserBlocksManager}
+ */
+ this.userBlocks = new UserBlocksManager(managerOptions);
+
/**
* Simple abstraction for performing CRUD operations on the
* guardian endpoint.
@@ -331,37 +342,6 @@ management/index.js
this.roles = new RolesManager(managerOptions);
};
-/**
- * Return an object with information about the current client,
- *
- * @method getClientInfo
- * @memberOf module:management.ManagementClient.prototype
- *
- * @return {Object} Object containing client information.
- */
-ManagementClient.prototype.getClientInfo = function() {
- var clientInfo = {
- name: 'node-auth0',
- version: pkg.version,
- dependencies: [],
- environment: [
- {
- name: 'node.js',
- version: process.version.replace('v', '')
- }
- ]
- };
- // Add the dependencies to the client info object.
- Object.keys(pkg.dependencies).forEach(function(name) {
- clientInfo.dependencies.push({
- name: name,
- version: pkg.dependencies[name]
- });
- });
-
- return clientInfo;
-};
-
/**
* Get all connections.
*
@@ -1572,6 +1552,98 @@ management/index.js
'users.regenerateRecoveryCode'
);
+/**
+ * Get user blocks by its id.
+ *
+ * @method getUserBlocks
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.getUserBlocks({ id: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'getUserBlocks', 'userBlocks.get');
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method unblockUser
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.unblockUser({ id: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'unblockUser', 'userBlocks.delete');
+
+/**
+ * Get user blocks by its identifier.
+ *
+ * @method getUserBlocksByIdentifier
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.getUserBlocksByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'getUserBlocksByIdentifier', 'userBlocks.getByIdentifier');
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method unblockUser
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.unblockUserByIdentifier({ identifier: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'unblockUserByIdentifier', 'userBlocks.deleteByIdentifier');
+
/**
* Get a single Guardian enrollment.
*
@@ -1964,7 +2036,7 @@ management/index.js
* user_id: '{USER_ID}'
* };
*
- * management.sendEmailVerification(function (err) {
+ * management.sendEmailVerification(params, function (err) {
* if (err) {
* // Handle error.
* }
@@ -2778,7 +2850,7 @@ management/index.js
diff --git a/docs/module-auth.AuthenticationClient.html b/docs/module-auth.AuthenticationClient.html
index 86d7d5b8a..faff593e3 100644
--- a/docs/module-auth.AuthenticationClient.html
+++ b/docs/module-auth.AuthenticationClient.html
@@ -24,7 +24,7 @@
@@ -103,7 +103,7 @@ n
databaseSource:
oauthSource:
passwordl
tokensSource:
usersSource:
changeP
Source:
Example
-
-
-
-
- getClientInfo() → {Object}
-
-
-
-
-
-
- Return an object with information about the current client,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
-
-
-
-
-
- Object containing client information.
-
-
-
-
-
-
-
-
-
-
@@ -1494,7 +1386,7 @@ get
getProfile<
password
refreshTo
reque
reque
request
verifySM
Examples
diff --git a/docs/module-auth.DatabaseAuthenticator.html b/docs/module-auth.DatabaseAuthenticator.html
index edaf06cc6..223037466 100644
--- a/docs/module-auth.DatabaseAuthenticator.html
+++ b/docs/module-auth.DatabaseAuthenticator.html
@@ -24,7 +24,7 @@
@@ -456,7 +456,7 @@ changeP
signInSource:
signUpSource:
Example
diff --git a/docs/module-auth.OAUthWithIDTokenValidation.html b/docs/module-auth.OAUthWithIDTokenValidation.html
index e9938b53c..a573702b6 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 53f0c464f..75f97d9cf 100644
--- a/docs/module-auth.OAuthAuthenticator.html
+++ b/docs/module-auth.OAuthAuthenticator.html
@@ -24,7 +24,7 @@
@@ -500,7 +500,7 @@ Source:
password
refreshTo
signInSource:
socialSig
Returns:
diff --git a/docs/module-auth.PasswordlessAuthenticator.html b/docs/module-auth.PasswordlessAuthenticator.html
index e7917a34b..4faf4561f 100644
--- a/docs/module-auth.PasswordlessAuthenticator.html
+++ b/docs/module-auth.PasswordlessAuthenticator.html
@@ -24,7 +24,7 @@
@@ -455,7 +455,7 @@ sendEmailSource:
sendSMSSource:
signInSource:
Examples
diff --git a/docs/module-auth.TokensManager.html b/docs/module-auth.TokensManager.html
index 9cce2d10d..05b659b5c 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 384968aae..75e286761 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 fe29f3866..8d1b56062 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 7a5b7f786..238929693 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 c6582dd4c..04ee24d7f 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 e6e53026f..ff7d57a16 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 49b038240..4c2f59ce1 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 cd019aa11..7b94c72fa 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 cf109bcaf..5eb06126b 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 2ddc399ed..fc7fbf0bc 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 ade45bd25..fdfb922d2 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 99216617b..b57cf61b0 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 d6bd3438b..c72346609 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 c2adbe428..b8b9ab2c7 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 c15ce93bc..03cf7f9e3 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 f65be0741..5631eda4e 100644
--- a/docs/module-management.ManagementClient.html
+++ b/docs/module-management.ManagementClient.html
@@ -24,7 +24,7 @@
@@ -723,7 +723,7 @@ blac
clientGra
clientsSource:
connection
customDo
devi
emailPro
emailTe
grantsSource:
guardianSource:
jobsSource:
logsSource:
resour
rolesSource:
rulesSource:
rulesConf
statsSource:
tenantSource:
ticketsSource:
Type:
+
+
+
+
+
+userBlocks :UserBlocksManager
+
+
+
+
+
+ Simple abstraction for performing CRUD operations on the
+user-blocks endpoint.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
@@ -2142,7 +2217,7 @@ usersSource:
a
Source:
assi
blackli
Source:
createCli
crea
creat
cre
Source:
Source:
c
createRole<
createRule<
createUser<
deleteA
deleteCli
dele
delet
del
Source:
de
Source:
d
deleteRole<
deleteRule<
dele
deleteUser<
exportUser
ge
g
getClientSource:
getCli
Example
-
-
-
-
- getClientInfo() → {Object}
-
-
-
-
-
-
- Return an object with information about the current client,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
-
-
-
-
-
- Object containing client information.
-
-
-
-
-
-
-
-
-
-
@@ -11761,7 +11728,7 @@ getClients<
getConne
getConn
getCus
getCu
getDaily
g
getEm
getGrantsSource:
Source:
getJobSource:
getLogSource:
getLogsSource:
g
getR
get
getRoleSource:
getRolesSource:
getRuleSource:
getRulesSource:
getRul
getT
getUserSource:
Example
- getUserLogs(params, cbopt) → {Promise|undefined}
+ getUserBlocks(params, cbopt) → {Promise|undefined}
- Get user's log events.
+ Get user blocks by its id.
@@ -18429,7 +18396,7 @@ getUserLog
Parameters:
- Get logs data.
+ The user data object..
@@ -18543,33 +18510,15 @@ Parameters:
- User id.
+ The user id.
+
+
-
-
- per_page
-
-
-
-
-
-Number
-
-
-
-
-
-
-
-
-
-
- Number of results per page.
@@ -18578,76 +18527,259 @@ Parameters:
- page
+ cb
-Number
+function
+
+
+ <optional>
+
+
+
+
+
+
+
- Page number, zero indexed.
+ Callback function
+
+
-
-
- 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
-
-
-
-
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getUserBlocks({ id: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
+
+
+
+
+
+
+
+
+
+
+ getUserBlocksByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get user blocks by its identifier.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- true if a query summary must be included in the result, false otherwise. Default false;
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user identifier, any of: username, phone_number, email.
@@ -18691,7 +18823,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -18742,14 +18874,12 @@ Returns:
Example
- var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-
-management.getUserLogs(params, function (err, logs) {
+ management.getUserBlocksByIdentifier({ identifier: USER_ID }, function (err, blocks) {
if (err) {
// Handle error.
}
- console.log(logs);
+ console.log(blocks);
});
@@ -18761,14 +18891,14 @@ Example
- getUserPermissions(params, cbopt) → {Promise|undefined}
+ getUserLogs(params, cbopt) → {Promise|undefined}
- Get user's permissions
+ Get user's log events.
@@ -18804,7 +18934,7 @@ get
Parameters:
- Get permissions data.
+ Get logs data.
@@ -19119,7 +19249,7 @@ Example
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-management.getUserPermissions(params, function (err, logs) {
+management.getUserLogs(params, function (err, logs) {
if (err) {
// Handle error.
}
@@ -19136,14 +19266,14 @@ Example
- getUserRoles(params, cbopt) → {Promise|undefined}
+ getUserPermissions(params, cbopt) → {Promise|undefined}
- Get user's roles
+ Get user's permissions
@@ -19179,7 +19309,7 @@ getUserRo
Parameters:
- Get roles data.
+ Get permissions data.
@@ -19494,7 +19624,7 @@ Example
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-management.getUserRoles(params, function (err, logs) {
+management.getUserPermissions(params, function (err, logs) {
if (err) {
// Handle error.
}
@@ -19511,14 +19641,14 @@ Example
- getUsers(paramsopt, cbopt) → {Promise|undefined}
+ getUserRoles(params, cbopt) → {Promise|undefined}
- Get all users.
+ Get user's roles
@@ -19554,7 +19684,7 @@ getUsersSource:
Parameters:
- <optional>
-
@@ -19627,7 +19755,7 @@ Parameters:
- Users params.
+ Get roles data.
@@ -19641,8 +19769,6 @@ Parameters:
Type
- Attributes
-
@@ -19655,34 +19781,24 @@ Parameters:
- search_engine
+ id
-Number
+String
-
-
- <optional>
-
-
-
-
-
-
-
- The version of the search engine to use.
+ User id.
@@ -19704,16 +19820,6 @@ Parameters:
-
-
- <optional>
-
-
-
-
-
-
-
@@ -19740,21 +19846,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;
@@ -19849,21 +19997,14 @@ Returns:
Example
-
-
- // Pagination settings.
-var params = {
- search_engine: 'v3',
- per_page: 10,
- page: 0
-};
+ var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-auth0.getUsers(params, function (err, users) {
- console.log(users.length);
+management.getUserRoles(params, function (err, logs) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(logs);
});
@@ -19875,14 +20016,14 @@ Example
- getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
+ getUsers(paramsopt, cbopt) → {Promise|undefined}
- Get users for a given email address
+ Get all users.
@@ -19918,7 +20059,7 @@ getUse
Parameters:
- email
+ params
-String
+Object
@@ -19991,7 +20132,142 @@ Parameters:
- Email Address of users to locate
+ Users params.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ search_engine
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ The version of the search engine to use.
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Number of results per page.
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Page number, zero indexed.
+
+
+
+
+
+
+
+
@@ -20079,12 +20355,20 @@ Returns:
Example
- auth0.getUsersByEmail(email, function (err, users) {
- console.log(users);
+ // Pagination settings.
+var params = {
+ search_engine: 'v3',
+ per_page: 10,
+ page: 0
+};
+
+auth0.getUsers(params, function (err, users) {
+ console.log(users.length);
});
@@ -20096,14 +20380,14 @@ Example
- getUsersInRole(roleIdopt, cbopt) → {Promise|undefined}
+ getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
- Get users in a given role
+ Get users for a given email address
@@ -20139,7 +20423,7 @@ getUser
Parameters:
- roleId
+ email
@@ -20212,7 +20496,7 @@ Parameters:
- Id of the role
+ Email Address of users to locate
@@ -20297,17 +20581,14 @@ Returns:
-Examples
-
- var params = { id :'ROLE_ID'};
+Example
- management.getUsersInRole(params, function (err, users) {
+ auth0.getUsersByEmail(email, function (err, users) {
console.log(users);
});
@@ -20320,15 +20601,14 @@ Examples
- importUsers(data, cbopt) → {Promise|undefined}
+ getUsersInRole(roleIdopt, 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.
+ Get users in a given role
@@ -20364,7 +20644,7 @@ importUser
Parameters:
- data
+ roleId
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Id of the role
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Examples
+
+ var params = { id :'ROLE_ID'};
+
+
+
+ management.getUsersInRole(params, function (err, users) {
+ console.log(users);
+});
+
+
+
+
+
+
+
+
+
+
+ importUsers(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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
@@ -20662,7 +21167,7 @@ linkUsersSource:
Parameters:
- user_id
+ user_id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ ID of the user to be linked.
+
+
+
+
+
+
+
+
+ connection_id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ ID of the connection to be used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ var userId = 'USER_ID';
+var params = {
+ user_id: 'OTHER_USER_ID',
+ connection_id: 'CONNECTION_ID'
+};
+
+management.linkUsers(userId, params, function (err, user) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Users linked.
+});
+
+
+
+
+
+
+
+
+
+
+ regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Generate new Guardian recovery code.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
+ console.log(newRecoveryCode);
+});
+
+
+
+
+
+
+
+
+
+
+ removePermissionsFromRole(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
@@ -20810,7 +21958,7 @@ Parameters:
- ID of the user to be linked.
+ Name of a permission
@@ -20819,7 +21967,7 @@ Parameters:
- connection_id
+ resource_server_identifier
@@ -20836,7 +21984,15 @@ Parameters:
- ID of the connection to be used.
+ Identifier for a resource
+
+
+
+
+
+
+
+
@@ -20931,18 +22087,11 @@ Returns:
Example
- var userId = 'USER_ID';
-var params = {
- user_id: 'OTHER_USER_ID',
- connection_id: 'CONNECTION_ID'
-};
-
-management.linkUsers(userId, params, function (err, user) {
- if (err) {
- // Handle error.
- }
+ var params = { id :'ROLE_ID'};
+var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
- // Users linked.
+management.removePermissionsFromRole(params, data, function (err, permissions) {
+ console.log(permissions);
});
@@ -20954,14 +22103,14 @@ Example
- regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
+ removePermissionsFromUser(params, data, cbopt) → {Promise|undefined}
- Generate new Guardian recovery code.
+ Remove permissions from a user
@@ -20997,7 +22146,7 @@ Source:
Parameters:
- data
+ params
@@ -21068,7 +22217,7 @@ Parameters:
- The user data object.
+ params object
@@ -21111,7 +22260,92 @@ Parameters:
- The user id.
+ user_id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data object containing list of permission IDs
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Array of permission IDs
@@ -21206,8 +22440,15 @@ Returns:
Example
- management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
- console.log(newRecoveryCode);
+ 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.
});
@@ -21219,14 +22460,14 @@ Example
- removePermissionsFromRole(data, cbopt) → {Promise|undefined}
+ removeRolesFromUser(params, data, cbopt) → {Promise|undefined}
- Remove permissions from a role
+ Remove roles from a user
@@ -21262,7 +22503,7 @@ Source:
Parameters:
- params.id
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ID of the Role.
-
-
-
-
-
-
-
-
- data
+ params
@@ -21367,7 +22574,7 @@ Parameters:
- permissions data
+ params object
@@ -21393,7 +22600,7 @@ Parameters:
- permissions
+ id
@@ -21410,33 +22617,24 @@ Parameters:
- Array of permissions
+ user_id
-
-
-
-
-
-
- Name
-
-
- Type
-
-
+
+
-
+
+
+
- Description
-
-
+
+
+
-
- permission_name
+ data
@@ -21449,20 +22647,45 @@ Parameters:
+
+
+
+
+
+
+
+
- Name of a permission
+ data object containing list of role IDs
-
-
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
- resource_server_identifier
+ roles
@@ -21479,15 +22702,7 @@ Parameters:
- Identifier for a resource
-
-
-
-
-
-
-
-
+ Array of role IDs
@@ -21582,11 +22797,15 @@ Returns:
Example
- var params = { id :'ROLE_ID'};
-var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+ var parms = { id : 'USER_ID'};
+var data = { "roles" :["role1"]};
+
+management.removeRolesFromUser(params, data, function (err) {
+ if (err) {
+ // Handle error.
+ }
-management.removePermissionsFromRole(params, data, function (err, permissions) {
- console.log(permissions);
+ // User assigned roles.
});
@@ -21598,14 +22817,14 @@ Example
- removePermissionsFromUser(params, data, cbopt) → {Promise|undefined}
+ sendEmailVerification(data, cbopt) → {Promise|undefined}
- Remove permissions from a user
+ Send a verification email to a user.
@@ -21641,7 +22860,7 @@ Source:
Parameters:
-
-
- params
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- params object
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- id
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- user_id
-
-
-
-
-
-
-
-
-
-
-
-
-
-
data
@@ -21778,7 +22912,7 @@ Parameters:
-String
+Object
@@ -21797,7 +22931,7 @@ Parameters:
- data object containing list of permission IDs
+ User data object.
@@ -21823,7 +22957,7 @@ Parameters:
- permissions
+ user_id
@@ -21840,7 +22974,7 @@ Parameters:
- Array of permission IDs
+ ID of the user to be verified.
@@ -21935,15 +23069,14 @@ Returns:
Example
- var parms = { id : 'USER_ID'};
-var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+ var params = {
+ user_id: '{USER_ID}'
+};
-management.removePermissionsFromUser(params, data, function (err) {
+management.sendEmailVerification(params, function (err) {
if (err) {
// Handle error.
}
-
- // User assigned permissions.
});
@@ -21955,14 +23088,14 @@ Example
- removeRolesFromUser(params, data, cbopt) → {Promise|undefined}
+ setRulesConfig(params, data, cbopt) → {Promise|undefined}
- Remove roles from a user
+ Set a new rules config.
@@ -21998,7 +23131,7 @@ re
Parameters:
- params object
+ Rule Config parameters.
@@ -22095,7 +23228,7 @@ Parameters:
- id
+ key
@@ -22112,7 +23245,7 @@ Parameters:
- user_id
+ Rule Config key.
@@ -22135,7 +23268,7 @@ Parameters:
-String
+Object
@@ -22154,7 +23287,7 @@ Parameters:
- data object containing list of role IDs
+ Rule Config Data parameters.
@@ -22180,7 +23313,7 @@ Parameters:
- roles
+ value
@@ -22197,7 +23330,7 @@ Parameters:
- Array of role IDs
+ Rule Config Data value.
@@ -22292,15 +23425,15 @@ Returns:
Example
- var parms = { id : 'USER_ID'};
-var data = { "roles" :["role1"]};
+ var params = { key: RULE_CONFIG_KEY };
+var data = { value: RULES_CONFIG_VALUE };
-management.removeRolesFromUser(params, data, function (err) {
+management.setRulesConfig(params, data, function (err, rulesConfig) {
if (err) {
// Handle error.
}
- // User assigned roles.
+ // Rules Config set.
});
@@ -22312,14 +23445,14 @@ Example
- sendEmailVerification(data, cbopt) → {Promise|undefined}
+ unblockUser(params, cbopt) → {Promise|undefined}
- Send a verification email to a user.
+ Unblock an user by its id.
@@ -22355,7 +23488,7 @@
Parameters:
- data
+ params
@@ -22426,7 +23559,7 @@ Parameters:
- User data object.
+ The user data object..
@@ -22452,7 +23585,7 @@ Parameters:
- user_id
+ identifier
@@ -22469,7 +23602,7 @@ Parameters:
- ID of the user to be verified.
+ The user identifier, any of: username, phone_number, email.
@@ -22513,7 +23646,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -22564,14 +23697,12 @@ Returns:
Example
- var params = {
- user_id: '{USER_ID}'
-};
-
-management.sendEmailVerification(function (err) {
+ management.unblockUserByIdentifier({ identifier: USER_ID }, function (err) {
if (err) {
// Handle error.
}
+
+ // User unblocked.
});
@@ -22583,14 +23714,14 @@ Example
- setRulesConfig(params, data, cbopt) → {Promise|undefined}
+ unblockUser(params, cbopt) → {Promise|undefined}
- Set a new rules config.
+ Unblock an user by its id.
@@ -22626,7 +23757,7 @@ setRule
Parameters:
- Rule Config parameters.
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- key
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- Rule Config key.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- data
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Rule Config Data parameters.
+ The user data object..
@@ -22808,7 +23854,7 @@ Parameters:
- value
+ id
@@ -22825,7 +23871,7 @@ Parameters:
- Rule Config Data value.
+ The user id.
@@ -22869,7 +23915,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -22920,15 +23966,12 @@ Returns:
Example
- var params = { key: RULE_CONFIG_KEY };
-var data = { value: RULES_CONFIG_VALUE };
-
-management.setRulesConfig(params, data, function (err, rulesConfig) {
+ management.unblockUser({ id: USER_ID }, function (err) {
if (err) {
// Handle error.
}
- // Rules Config set.
+ // User unblocked.
});
@@ -22983,7 +24026,7 @@ unlinkUser
upda
updateCli
upda
updat
up
u
updateRole<
updateRule<
u
updateUser<
upd
ver
Example
diff --git a/docs/module-management.ManagementTokenProvider.html b/docs/module-management.ManagementTokenProvider.html
index 82e343e91..2a4383477 100644
--- a/docs/module-management.ManagementTokenProvider.html
+++ b/docs/module-management.ManagementTokenProvider.html
@@ -24,7 +24,7 @@
@@ -556,7 +556,7 @@ getAcce
Returns:
diff --git a/docs/module-management.ResourceServersManager.html b/docs/module-management.ResourceServersManager.html
index 7b3909213..46b96c0b0 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 6064aa6ff..e4f774f8b 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
index a5a59af78..c90f9dbf7 100644
--- a/docs/module-management.RolesManager.html
+++ b/docs/module-management.RolesManager.html
@@ -24,7 +24,7 @@
@@ -4217,7 +4217,7 @@ Example
diff --git a/docs/module-management.RulesConfigsManager.html b/docs/module-management.RulesConfigsManager.html
index 6c0be5d76..f75318df5 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 84d895c28..2d4f771db 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 e3d8ffa17..1e1a843ec 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 c01a5bcc6..94e05610a 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 dd25b20f3..2da480bb0 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.UserBlocksManager.html b/docs/module-management.UserBlocksManager.html
new file mode 100644
index 000000000..d0e9eb359
--- /dev/null
+++ b/docs/module-management.UserBlocksManager.html
@@ -0,0 +1,1441 @@
+
+
+
+
+
+ UserBlocksManager - Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UserBlocksManager
+
+
+
+
+
+
+
+
+
+
+
+
+ management.
+
+ UserBlocksManager
+
+
+ Abstracts interaction with the user-blocks endpoint.
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+ new UserBlocksManager(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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ delete(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Unblock an user by its id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.delete({ id: USER_ID }, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // User unblocked.
+});
+
+
+
+
+
+
+
+
+
+
+ deleteByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Unblock an user by identifier.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user identifier, any of: username, phone_number, email.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.deleteByIdentifier({ identifier: USER_ID }, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // User unblocked.
+});
+
+
+
+
+
+
+
+
+
+
+ get(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get user blocks by id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.get({ id: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
+
+
+
+
+
+
+
+
+
+
+ getByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get user blocks by identifier.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user identifier, any of: username, phone_number, email.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.getByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-management.UsersManager.html b/docs/module-management.UsersManager.html
index 8e5cf0a2e..dbf1ccc33 100644
--- a/docs/module-management.UsersManager.html
+++ b/docs/module-management.UsersManager.html
@@ -24,7 +24,7 @@
@@ -5753,7 +5753,7 @@ Example
diff --git a/docs/module-management.html b/docs/module-management.html
index 59dfc7588..669d7e280 100644
--- a/docs/module-management.html
+++ b/docs/module-management.html
@@ -24,7 +24,7 @@
@@ -128,6 +128,9 @@ Classes
Classes
diff --git a/docs/module-utils.html b/docs/module-utils.html
index c9cd94e0a..f8c6f999d 100644
--- a/docs/module-utils.html
+++ b/docs/module-utils.html
@@ -24,7 +24,7 @@
@@ -71,6 +71,114 @@ Methods
+
+
+
+
+ (static) generateClientInfo() → {Object}
+
+
+
+
+
+
+ Return an object with information about the current client.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Object containing client information.
+
+
+
+
+
+
+
+
+
+
@@ -119,7 +227,7 @@ (static) <
(static) Source:
(static)
(static)
diff --git a/docs/utils.js.html b/docs/utils.js.html
index dcd265d5d..c87d4e5f7 100644
--- a/docs/utils.js.html
+++ b/docs/utils.js.html
@@ -24,7 +24,7 @@
@@ -41,6 +41,7 @@ utils.js
var Promise = require('bluebird');
var request = require('request');
+var pkg = require('../package.json');
/**
* @module utils
@@ -63,6 +64,24 @@ utils.js
.replace(/=+$/, '');
};
+/**
+ * Return an object with information about the current client.
+ *
+ * @method generateClientInfo
+ * @memberOf module:utils
+ *
+ * @return {Object} Object containing client information.
+ */
+utils.generateClientInfo = function() {
+ return {
+ name: 'node-auth0',
+ version: pkg.version,
+ env: {
+ node: process.version.replace('v', '')
+ }
+ };
+};
+
/**
* Simple wrapper that, given a class, a property name and a method name,
* creates a new method in the class that is a wrapper for the given
@@ -124,7 +143,7 @@ utils.js
diff --git a/package.json b/package.json
index 4dae031c7..aa642e9f6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "auth0",
- "version": "2.17.0",
+ "version": "2.17.1",
"description": "SDK for Auth0 API v2",
"main": "src/index.js",
"files": [
diff --git a/docs/index.html b/docs/index.html
index 59b2d5896..15cb84272 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 094cc993b..685b70954 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 ca8b9a674..57789b280 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 35705ce1a..047a4b671 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 c976734cd..fa51ba415 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 2652dc8d3..03aa47fa2 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 c9ed7853b..37a44518e 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 88683e316..8efae0c68 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 01384f0f8..3b75e5dd2 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 6438643cb..428a57e77 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 ccceff56b..b434190dd 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 a83fef1f9..1296db43f 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 9b1f553c9..78f3bc81d 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 a1c5c3285..13159d3fd 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 d54e67e7f..c4b5e2e84 100644
--- a/docs/management_ManagementTokenProvider.js.html
+++ b/docs/management_ManagementTokenProvider.js.html
@@ -24,7 +24,7 @@
@@ -108,7 +108,8 @@ management/ManagementTokenProvider.js
domain: this.options.domain,
clientId: this.options.clientId,
clientSecret: this.options.clientSecret,
- telemetry: this.options.telemetry
+ telemetry: this.options.telemetry,
+ clientInfo: this.options.clientInfo
};
this.authenticationClient = new AuthenticationClient(authenticationClientOptions);
};
@@ -189,7 +190,7 @@ management/ManagementTokenProvider.js
diff --git a/docs/management_ResourceServersManager.js.html b/docs/management_ResourceServersManager.js.html
index 6e22790ed..00def9033 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
index adcf4d6a0..47ab35ff9 100644
--- a/docs/management_RolesManager.js.html
+++ b/docs/management_RolesManager.js.html
@@ -24,7 +24,7 @@
@@ -453,7 +453,7 @@ management/RolesManager.js
diff --git a/docs/management_RulesConfigsManager.js.html b/docs/management_RulesConfigsManager.js.html
index 4164615e5..28ceed46c 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 7cde7ef0c..f7ba7415b 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 93c852667..4f40e59ab 100644
--- a/docs/management_StatsManager.js.html
+++ b/docs/management_StatsManager.js.html
@@ -24,7 +24,7 @@
@@ -90,7 +90,7 @@ management/StatsManager.js
clientOptions,
options.tokenProvider
);
- this.stats = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -125,10 +125,10 @@ management/StatsManager.js
params.type = 'daily';
if (cb && cb instanceof Function) {
- return this.stats.get(params, cb);
+ return this.resource.get(params, cb);
}
- return this.stats.get(params);
+ return this.resource.get(params);
};
/**
@@ -154,11 +154,11 @@ management/StatsManager.js
var options = { type: 'active-users' };
if (cb && cb instanceof Function) {
- return this.stats.get(options, cb);
+ return this.resource.get(options, cb);
}
// Return a promise.
- return this.stats.get(options);
+ return this.resource.get(options);
};
module.exports = StatsManager;
@@ -174,7 +174,7 @@ management/StatsManager.js
diff --git a/docs/management_TenantManager.js.html b/docs/management_TenantManager.js.html
index db15c4e7b..f2d412579 100644
--- a/docs/management_TenantManager.js.html
+++ b/docs/management_TenantManager.js.html
@@ -24,7 +24,7 @@
@@ -90,7 +90,7 @@ management/TenantManager.js
clientOptions,
options.tokenProvider
);
- this.tenant = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -113,11 +113,11 @@ management/TenantManager.js
*/
TenantManager.prototype.updateSettings = function(data, cb) {
if (cb && cb instanceof Function) {
- return this.tenant.patch({}, data, cb);
+ return this.resource.patch({}, data, cb);
}
// Return a promise.
- return this.tenant.patch({}, data);
+ return this.resource.patch({}, data);
};
/**
@@ -141,11 +141,11 @@ management/TenantManager.js
*/
TenantManager.prototype.getSettings = function(cb) {
if (cb && cb instanceof Function) {
- return this.tenant.get({}, cb);
+ return this.resource.get({}, cb);
}
// Return a promise.
- return this.tenant.get({});
+ return this.resource.get({});
};
module.exports = TenantManager;
@@ -161,7 +161,7 @@ management/TenantManager.js
diff --git a/docs/management_TicketsManager.js.html b/docs/management_TicketsManager.js.html
index 418b10d7e..5a61cf0ea 100644
--- a/docs/management_TicketsManager.js.html
+++ b/docs/management_TicketsManager.js.html
@@ -24,7 +24,7 @@
@@ -84,7 +84,7 @@ management/TicketsManager.js
clientOptions,
options.tokenProvider
);
- this.ticket = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -114,11 +114,11 @@ management/TicketsManager.js
var params = { type: 'password-change' };
if (cb && cb instanceof Function) {
- return this.ticket.create(params, data, cb);
+ return this.resource.create(params, data, cb);
}
// Return a promise.
- return this.ticket.create(params, data);
+ return this.resource.create(params, data);
};
/**
@@ -146,11 +146,11 @@ management/TicketsManager.js
var params = { type: 'email-verification' };
if (cb && cb instanceof Function) {
- return this.ticket.create(params, data, cb);
+ return this.resource.create(params, data, cb);
}
// Return a promise.
- return this.ticket.create(params, data);
+ return this.resource.create(params, data);
};
module.exports = TicketsManager;
@@ -166,7 +166,7 @@ management/TicketsManager.js
diff --git a/docs/management_UserBlocksManager.js.html b/docs/management_UserBlocksManager.js.html
new file mode 100644
index 000000000..2e639e3d7
--- /dev/null
+++ b/docs/management_UserBlocksManager.js.html
@@ -0,0 +1,236 @@
+
+
+
+
+
+ management/UserBlocksManager.js - Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ management/UserBlocksManager.js
+
+
+
+
+
+
+
+
+
+ var ArgumentError = require('rest-facade').ArgumentError;
+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
+ * Abstracts interaction with the user-blocks endpoint.
+ * @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 UserBlocksManager = 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');
+ }
+
+ var clientOptions = {
+ errorFormatter: { message: 'message', name: 'error' },
+ headers: options.headers,
+ query: { repeatParams: false }
+ };
+
+ var userBlocksByIdResource = new Auth0RestClient(
+ options.baseUrl + '/user-blocks/:id',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.userBlocksById = new RetryRestClient(userBlocksByIdResource, options.retry);
+
+ var userBlocksByIdentifierResource = new Auth0RestClient(
+ options.baseUrl + '/user-blocks',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.userBlocksByIdentifier = new RetryRestClient(userBlocksByIdentifierResource, options.retry);
+};
+
+/**
+ * Get user blocks by id.
+ *
+ * @method get
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.get({ id: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+UserBlocksManager.prototype.get = function(params) {
+ if (typeof params !== 'object' || typeof params.id !== 'string') {
+ throw new ArgumentError('You must provide an user id for the get method');
+ }
+
+ return this.userBlocksById.get.apply(this.userBlocksById, arguments);
+};
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method delete
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.delete({ id: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+UserBlocksManager.prototype.delete = function(params) {
+ if (typeof params !== 'object' || typeof params.id !== 'string') {
+ throw new ArgumentError('You must provide an user id for the delete method');
+ }
+
+ return this.userBlocksById.delete.apply(this.userBlocksById, arguments);
+};
+
+/**
+ * Get user blocks by identifier.
+ *
+ * @method getByIdentifier
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.getByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+ UserBlocksManager.prototype.getByIdentifier = function(params) {
+ if (typeof params !== 'object' || typeof params.identifier !== 'string') {
+ throw new ArgumentError('You must provide an user identifier for the getByIdentifier method');
+ }
+
+ return this.userBlocksByIdentifier.get.apply(this.userBlocksByIdentifier, arguments);
+ };
+
+/**
+ * Unblock an user by identifier.
+ *
+ * @method deleteByIdentifier
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.deleteByIdentifier({ identifier: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+ UserBlocksManager.prototype.deleteByIdentifier = function(params) {
+ if (typeof params !== 'object' || typeof params.identifier !== 'string') {
+ throw new ArgumentError('You must provide an user identifier for the deleteByIdentifier method');
+ }
+
+ return this.userBlocksByIdentifier.delete.apply(this.userBlocksByIdentifier, arguments);
+ };
+
+ module.exports = UserBlocksManager;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/management_UsersManager.js.html b/docs/management_UsersManager.js.html
index 9f330abbb..4cca607bf 100644
--- a/docs/management_UsersManager.js.html
+++ b/docs/management_UsersManager.js.html
@@ -24,7 +24,7 @@
@@ -927,7 +927,7 @@ management/UsersManager.js
diff --git a/docs/management_index.js.html b/docs/management_index.js.html
index 4d6da6415..d6009ca1a 100644
--- a/docs/management_index.js.html
+++ b/docs/management_index.js.html
@@ -24,7 +24,7 @@
@@ -42,10 +42,9 @@ management/index.js
/** @module management */
var util = require('util');
-
-var pkg = require('../../package.json');
var utils = require('../utils');
var jsonToBase64 = utils.jsonToBase64;
+var generateClientInfo = utils.generateClientInfo;
var ArgumentError = require('rest-facade').ArgumentError;
var assign = Object.assign || require('object.assign');
@@ -54,6 +53,7 @@ management/index.js
var ClientGrantsManager = require('./ClientGrantsManager');
var GrantsManager = require('./GrantsManager');
var UsersManager = require('./UsersManager');
+var UserBlocksManager = require('./UserBlocksManager');
var ConnectionsManager = require('./ConnectionsManager');
var BlacklistedTokensManager = require('./BlacklistedTokensManager');
var RulesManager = require('./RulesManager');
@@ -170,8 +170,11 @@ management/index.js
}
if (options.telemetry !== false) {
- var telemetry = jsonToBase64(options.clientInfo || this.getClientInfo());
- managerOptions.headers['Auth0-Client'] = telemetry;
+ var clientInfo = options.clientInfo || generateClientInfo();
+ if ('string' === typeof clientInfo.name && clientInfo.name.length > 0) {
+ var telemetry = jsonToBase64(clientInfo);
+ managerOptions.headers['Auth0-Client'] = telemetry;
+ }
}
managerOptions.retry = options.retry;
@@ -208,6 +211,14 @@ management/index.js
*/
this.users = new UsersManager(managerOptions);
+ /**
+ * Simple abstraction for performing CRUD operations on the
+ * user-blocks endpoint.
+ *
+ * @type {UserBlocksManager}
+ */
+ this.userBlocks = new UserBlocksManager(managerOptions);
+
/**
* Simple abstraction for performing CRUD operations on the
* guardian endpoint.
@@ -331,37 +342,6 @@ management/index.js
this.roles = new RolesManager(managerOptions);
};
-/**
- * Return an object with information about the current client,
- *
- * @method getClientInfo
- * @memberOf module:management.ManagementClient.prototype
- *
- * @return {Object} Object containing client information.
- */
-ManagementClient.prototype.getClientInfo = function() {
- var clientInfo = {
- name: 'node-auth0',
- version: pkg.version,
- dependencies: [],
- environment: [
- {
- name: 'node.js',
- version: process.version.replace('v', '')
- }
- ]
- };
- // Add the dependencies to the client info object.
- Object.keys(pkg.dependencies).forEach(function(name) {
- clientInfo.dependencies.push({
- name: name,
- version: pkg.dependencies[name]
- });
- });
-
- return clientInfo;
-};
-
/**
* Get all connections.
*
@@ -1572,6 +1552,98 @@ management/index.js
'users.regenerateRecoveryCode'
);
+/**
+ * Get user blocks by its id.
+ *
+ * @method getUserBlocks
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.getUserBlocks({ id: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'getUserBlocks', 'userBlocks.get');
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method unblockUser
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.unblockUser({ id: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'unblockUser', 'userBlocks.delete');
+
+/**
+ * Get user blocks by its identifier.
+ *
+ * @method getUserBlocksByIdentifier
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.getUserBlocksByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'getUserBlocksByIdentifier', 'userBlocks.getByIdentifier');
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method unblockUser
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.unblockUserByIdentifier({ identifier: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'unblockUserByIdentifier', 'userBlocks.deleteByIdentifier');
+
/**
* Get a single Guardian enrollment.
*
@@ -1964,7 +2036,7 @@ management/index.js
* user_id: '{USER_ID}'
* };
*
- * management.sendEmailVerification(function (err) {
+ * management.sendEmailVerification(params, function (err) {
* if (err) {
* // Handle error.
* }
@@ -2778,7 +2850,7 @@ management/index.js
diff --git a/docs/module-auth.AuthenticationClient.html b/docs/module-auth.AuthenticationClient.html
index 86d7d5b8a..faff593e3 100644
--- a/docs/module-auth.AuthenticationClient.html
+++ b/docs/module-auth.AuthenticationClient.html
@@ -24,7 +24,7 @@
@@ -103,7 +103,7 @@ n
databaseSource:
oauthSource:
passwordl
tokensSource:
usersSource:
changeP
Source:
Example
-
-
-
-
- getClientInfo() → {Object}
-
-
-
-
-
-
- Return an object with information about the current client,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
-
-
-
-
-
- Object containing client information.
-
-
-
-
-
-
-
-
-
-
@@ -1494,7 +1386,7 @@ get
getProfile<
password
refreshTo
reque
reque
request
verifySM
Examples
diff --git a/docs/module-auth.DatabaseAuthenticator.html b/docs/module-auth.DatabaseAuthenticator.html
index edaf06cc6..223037466 100644
--- a/docs/module-auth.DatabaseAuthenticator.html
+++ b/docs/module-auth.DatabaseAuthenticator.html
@@ -24,7 +24,7 @@
@@ -456,7 +456,7 @@ changeP
signInSource:
signUpSource:
Example
diff --git a/docs/module-auth.OAUthWithIDTokenValidation.html b/docs/module-auth.OAUthWithIDTokenValidation.html
index e9938b53c..a573702b6 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 53f0c464f..75f97d9cf 100644
--- a/docs/module-auth.OAuthAuthenticator.html
+++ b/docs/module-auth.OAuthAuthenticator.html
@@ -24,7 +24,7 @@
@@ -500,7 +500,7 @@ Source:
password
refreshTo
signInSource:
socialSig
Returns:
diff --git a/docs/module-auth.PasswordlessAuthenticator.html b/docs/module-auth.PasswordlessAuthenticator.html
index e7917a34b..4faf4561f 100644
--- a/docs/module-auth.PasswordlessAuthenticator.html
+++ b/docs/module-auth.PasswordlessAuthenticator.html
@@ -24,7 +24,7 @@
@@ -455,7 +455,7 @@ sendEmailSource:
sendSMSSource:
signInSource:
Examples
diff --git a/docs/module-auth.TokensManager.html b/docs/module-auth.TokensManager.html
index 9cce2d10d..05b659b5c 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 384968aae..75e286761 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 fe29f3866..8d1b56062 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 7a5b7f786..238929693 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 c6582dd4c..04ee24d7f 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 e6e53026f..ff7d57a16 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 49b038240..4c2f59ce1 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 cd019aa11..7b94c72fa 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 cf109bcaf..5eb06126b 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 2ddc399ed..fc7fbf0bc 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 ade45bd25..fdfb922d2 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 99216617b..b57cf61b0 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 d6bd3438b..c72346609 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 c2adbe428..b8b9ab2c7 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 c15ce93bc..03cf7f9e3 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 f65be0741..5631eda4e 100644
--- a/docs/module-management.ManagementClient.html
+++ b/docs/module-management.ManagementClient.html
@@ -24,7 +24,7 @@
@@ -723,7 +723,7 @@ blac
clientGra
clientsSource:
connection
customDo
devi
emailPro
emailTe
grantsSource:
guardianSource:
jobsSource:
logsSource:
resour
rolesSource:
rulesSource:
rulesConf
statsSource:
tenantSource:
ticketsSource:
Type:
+
+
+
+
+
+userBlocks :UserBlocksManager
+
+
+
+
+
+ Simple abstraction for performing CRUD operations on the
+user-blocks endpoint.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
@@ -2142,7 +2217,7 @@ usersSource:
a
Source:
assi
blackli
Source:
createCli
crea
creat
cre
Source:
Source:
c
createRole<
createRule<
createUser<
deleteA
deleteCli
dele
delet
del
Source:
de
Source:
d
deleteRole<
deleteRule<
dele
deleteUser<
exportUser
ge
g
getClientSource:
getCli
Example
-
-
-
-
- getClientInfo() → {Object}
-
-
-
-
-
-
- Return an object with information about the current client,
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
-
-
-
-
-
- Object containing client information.
-
-
-
-
-
-
-
-
-
-
@@ -11761,7 +11728,7 @@ getClients<
getConne
getConn
getCus
getCu
getDaily
g
getEm
getGrantsSource:
Source:
getJobSource:
getLogSource:
getLogsSource:
g
getR
get
getRoleSource:
getRolesSource:
getRuleSource:
getRulesSource:
getRul
getT
getUserSource:
Example
- getUserLogs(params, cbopt) → {Promise|undefined}
+ getUserBlocks(params, cbopt) → {Promise|undefined}
- Get user's log events.
+ Get user blocks by its id.
@@ -18429,7 +18396,7 @@ getUserLog
Parameters:
- Get logs data.
+ The user data object..
@@ -18543,33 +18510,15 @@ Parameters:
- User id.
+ The user id.
+
+
-
-
- per_page
-
-
-
-
-
-Number
-
-
-
-
-
-
-
-
-
-
- Number of results per page.
@@ -18578,76 +18527,259 @@ Parameters:
- page
+ cb
-Number
+function
+
+
+ <optional>
+
+
+
+
+
+
+
- Page number, zero indexed.
+ Callback function
+
+
-
-
- 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
-
-
-
-
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getUserBlocks({ id: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
+
+
+
+
+
+
+
+
+
+
+ getUserBlocksByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get user blocks by its identifier.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- true if a query summary must be included in the result, false otherwise. Default false;
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user identifier, any of: username, phone_number, email.
@@ -18691,7 +18823,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -18742,14 +18874,12 @@ Returns:
Example
- var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-
-management.getUserLogs(params, function (err, logs) {
+ management.getUserBlocksByIdentifier({ identifier: USER_ID }, function (err, blocks) {
if (err) {
// Handle error.
}
- console.log(logs);
+ console.log(blocks);
});
@@ -18761,14 +18891,14 @@ Example
- getUserPermissions(params, cbopt) → {Promise|undefined}
+ getUserLogs(params, cbopt) → {Promise|undefined}
- Get user's permissions
+ Get user's log events.
@@ -18804,7 +18934,7 @@ get
Parameters:
- Get permissions data.
+ Get logs data.
@@ -19119,7 +19249,7 @@ Example
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-management.getUserPermissions(params, function (err, logs) {
+management.getUserLogs(params, function (err, logs) {
if (err) {
// Handle error.
}
@@ -19136,14 +19266,14 @@ Example
- getUserRoles(params, cbopt) → {Promise|undefined}
+ getUserPermissions(params, cbopt) → {Promise|undefined}
- Get user's roles
+ Get user's permissions
@@ -19179,7 +19309,7 @@ getUserRo
Parameters:
- Get roles data.
+ Get permissions data.
@@ -19494,7 +19624,7 @@ Example
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-management.getUserRoles(params, function (err, logs) {
+management.getUserPermissions(params, function (err, logs) {
if (err) {
// Handle error.
}
@@ -19511,14 +19641,14 @@ Example
- getUsers(paramsopt, cbopt) → {Promise|undefined}
+ getUserRoles(params, cbopt) → {Promise|undefined}
- Get all users.
+ Get user's roles
@@ -19554,7 +19684,7 @@ getUsersSource:
Parameters:
- <optional>
-
@@ -19627,7 +19755,7 @@ Parameters:
- Users params.
+ Get roles data.
@@ -19641,8 +19769,6 @@ Parameters:
Type
- Attributes
-
@@ -19655,34 +19781,24 @@ Parameters:
- search_engine
+ id
-Number
+String
-
-
- <optional>
-
-
-
-
-
-
-
- The version of the search engine to use.
+ User id.
@@ -19704,16 +19820,6 @@ Parameters:
-
-
- <optional>
-
-
-
-
-
-
-
@@ -19740,21 +19846,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;
@@ -19849,21 +19997,14 @@ Returns:
Example
-
-
- // Pagination settings.
-var params = {
- search_engine: 'v3',
- per_page: 10,
- page: 0
-};
+ var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-auth0.getUsers(params, function (err, users) {
- console.log(users.length);
+management.getUserRoles(params, function (err, logs) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(logs);
});
@@ -19875,14 +20016,14 @@ Example
- getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
+ getUsers(paramsopt, cbopt) → {Promise|undefined}
- Get users for a given email address
+ Get all users.
@@ -19918,7 +20059,7 @@ getUse
Parameters:
- email
+ params
-String
+Object
@@ -19991,7 +20132,142 @@ Parameters:
- Email Address of users to locate
+ Users params.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ search_engine
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ The version of the search engine to use.
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Number of results per page.
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+Number
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Page number, zero indexed.
+
+
+
+
+
+
+
+
@@ -20079,12 +20355,20 @@ Returns:
Example
- auth0.getUsersByEmail(email, function (err, users) {
- console.log(users);
+ // Pagination settings.
+var params = {
+ search_engine: 'v3',
+ per_page: 10,
+ page: 0
+};
+
+auth0.getUsers(params, function (err, users) {
+ console.log(users.length);
});
@@ -20096,14 +20380,14 @@ Example
- getUsersInRole(roleIdopt, cbopt) → {Promise|undefined}
+ getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
- Get users in a given role
+ Get users for a given email address
@@ -20139,7 +20423,7 @@ getUser
Parameters:
- roleId
+ email
@@ -20212,7 +20496,7 @@ Parameters:
- Id of the role
+ Email Address of users to locate
@@ -20297,17 +20581,14 @@ Returns:
-Examples
-
- var params = { id :'ROLE_ID'};
+Example
- management.getUsersInRole(params, function (err, users) {
+ auth0.getUsersByEmail(email, function (err, users) {
console.log(users);
});
@@ -20320,15 +20601,14 @@ Examples
- importUsers(data, cbopt) → {Promise|undefined}
+ getUsersInRole(roleIdopt, 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.
+ Get users in a given role
@@ -20364,7 +20644,7 @@ importUser
Parameters:
- data
+ roleId
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Id of the role
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Examples
+
+ var params = { id :'ROLE_ID'};
+
+
+
+ management.getUsersInRole(params, function (err, users) {
+ console.log(users);
+});
+
+
+
+
+
+
+
+
+
+
+ importUsers(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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
@@ -20662,7 +21167,7 @@ linkUsersSource:
Parameters:
- user_id
+ user_id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ ID of the user to be linked.
+
+
+
+
+
+
+
+
+ connection_id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ ID of the connection to be used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ var userId = 'USER_ID';
+var params = {
+ user_id: 'OTHER_USER_ID',
+ connection_id: 'CONNECTION_ID'
+};
+
+management.linkUsers(userId, params, function (err, user) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Users linked.
+});
+
+
+
+
+
+
+
+
+
+
+ regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Generate new Guardian recovery code.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
+ console.log(newRecoveryCode);
+});
+
+
+
+
+
+
+
+
+
+
+ removePermissionsFromRole(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
@@ -20810,7 +21958,7 @@ Parameters:
- ID of the user to be linked.
+ Name of a permission
@@ -20819,7 +21967,7 @@ Parameters:
- connection_id
+ resource_server_identifier
@@ -20836,7 +21984,15 @@ Parameters:
- ID of the connection to be used.
+ Identifier for a resource
+
+
+
+
+
+
+
+
@@ -20931,18 +22087,11 @@ Returns:
Example
- var userId = 'USER_ID';
-var params = {
- user_id: 'OTHER_USER_ID',
- connection_id: 'CONNECTION_ID'
-};
-
-management.linkUsers(userId, params, function (err, user) {
- if (err) {
- // Handle error.
- }
+ var params = { id :'ROLE_ID'};
+var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
- // Users linked.
+management.removePermissionsFromRole(params, data, function (err, permissions) {
+ console.log(permissions);
});
@@ -20954,14 +22103,14 @@ Example
- regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
+ removePermissionsFromUser(params, data, cbopt) → {Promise|undefined}
- Generate new Guardian recovery code.
+ Remove permissions from a user
@@ -20997,7 +22146,7 @@ Source:
Parameters:
- data
+ params
@@ -21068,7 +22217,7 @@ Parameters:
- The user data object.
+ params object
@@ -21111,7 +22260,92 @@ Parameters:
- The user id.
+ user_id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data object containing list of permission IDs
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ permissions
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Array of permission IDs
@@ -21206,8 +22440,15 @@ Returns:
Example
- management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
- console.log(newRecoveryCode);
+ 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.
});
@@ -21219,14 +22460,14 @@ Example
- removePermissionsFromRole(data, cbopt) → {Promise|undefined}
+ removeRolesFromUser(params, data, cbopt) → {Promise|undefined}
- Remove permissions from a role
+ Remove roles from a user
@@ -21262,7 +22503,7 @@ Source:
Parameters:
- params.id
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ID of the Role.
-
-
-
-
-
-
-
-
- data
+ params
@@ -21367,7 +22574,7 @@ Parameters:
- permissions data
+ params object
@@ -21393,7 +22600,7 @@ Parameters:
- permissions
+ id
@@ -21410,33 +22617,24 @@ Parameters:
- Array of permissions
+ user_id
-
-
-
-
-
-
- Name
-
-
- Type
-
-
+
+
-
+
+
+
- Description
-
-
+
+
+
-
- permission_name
+ data
@@ -21449,20 +22647,45 @@ Parameters:
+
+
+
+
+
+
+
+
- Name of a permission
+ data object containing list of role IDs
-
-
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
- resource_server_identifier
+ roles
@@ -21479,15 +22702,7 @@ Parameters:
- Identifier for a resource
-
-
-
-
-
-
-
-
+ Array of role IDs
@@ -21582,11 +22797,15 @@ Returns:
Example
- var params = { id :'ROLE_ID'};
-var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+ var parms = { id : 'USER_ID'};
+var data = { "roles" :["role1"]};
+
+management.removeRolesFromUser(params, data, function (err) {
+ if (err) {
+ // Handle error.
+ }
-management.removePermissionsFromRole(params, data, function (err, permissions) {
- console.log(permissions);
+ // User assigned roles.
});
@@ -21598,14 +22817,14 @@ Example
- removePermissionsFromUser(params, data, cbopt) → {Promise|undefined}
+ sendEmailVerification(data, cbopt) → {Promise|undefined}
- Remove permissions from a user
+ Send a verification email to a user.
@@ -21641,7 +22860,7 @@ Source:
Parameters:
-
-
- params
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- params object
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- id
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- user_id
-
-
-
-
-
-
-
-
-
-
-
-
-
-
data
@@ -21778,7 +22912,7 @@ Parameters:
-String
+Object
@@ -21797,7 +22931,7 @@ Parameters:
- data object containing list of permission IDs
+ User data object.
@@ -21823,7 +22957,7 @@ Parameters:
- permissions
+ user_id
@@ -21840,7 +22974,7 @@ Parameters:
- Array of permission IDs
+ ID of the user to be verified.
@@ -21935,15 +23069,14 @@ Returns:
Example
- var parms = { id : 'USER_ID'};
-var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+ var params = {
+ user_id: '{USER_ID}'
+};
-management.removePermissionsFromUser(params, data, function (err) {
+management.sendEmailVerification(params, function (err) {
if (err) {
// Handle error.
}
-
- // User assigned permissions.
});
@@ -21955,14 +23088,14 @@ Example
- removeRolesFromUser(params, data, cbopt) → {Promise|undefined}
+ setRulesConfig(params, data, cbopt) → {Promise|undefined}
- Remove roles from a user
+ Set a new rules config.
@@ -21998,7 +23131,7 @@ re
Parameters:
- params object
+ Rule Config parameters.
@@ -22095,7 +23228,7 @@ Parameters:
- id
+ key
@@ -22112,7 +23245,7 @@ Parameters:
- user_id
+ Rule Config key.
@@ -22135,7 +23268,7 @@ Parameters:
-String
+Object
@@ -22154,7 +23287,7 @@ Parameters:
- data object containing list of role IDs
+ Rule Config Data parameters.
@@ -22180,7 +23313,7 @@ Parameters:
- roles
+ value
@@ -22197,7 +23330,7 @@ Parameters:
- Array of role IDs
+ Rule Config Data value.
@@ -22292,15 +23425,15 @@ Returns:
Example
- var parms = { id : 'USER_ID'};
-var data = { "roles" :["role1"]};
+ var params = { key: RULE_CONFIG_KEY };
+var data = { value: RULES_CONFIG_VALUE };
-management.removeRolesFromUser(params, data, function (err) {
+management.setRulesConfig(params, data, function (err, rulesConfig) {
if (err) {
// Handle error.
}
- // User assigned roles.
+ // Rules Config set.
});
@@ -22312,14 +23445,14 @@ Example
- sendEmailVerification(data, cbopt) → {Promise|undefined}
+ unblockUser(params, cbopt) → {Promise|undefined}
- Send a verification email to a user.
+ Unblock an user by its id.
@@ -22355,7 +23488,7 @@
Parameters:
- data
+ params
@@ -22426,7 +23559,7 @@ Parameters:
- User data object.
+ The user data object..
@@ -22452,7 +23585,7 @@ Parameters:
- user_id
+ identifier
@@ -22469,7 +23602,7 @@ Parameters:
- ID of the user to be verified.
+ The user identifier, any of: username, phone_number, email.
@@ -22513,7 +23646,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -22564,14 +23697,12 @@ Returns:
Example
- var params = {
- user_id: '{USER_ID}'
-};
-
-management.sendEmailVerification(function (err) {
+ management.unblockUserByIdentifier({ identifier: USER_ID }, function (err) {
if (err) {
// Handle error.
}
+
+ // User unblocked.
});
@@ -22583,14 +23714,14 @@ Example
- setRulesConfig(params, data, cbopt) → {Promise|undefined}
+ unblockUser(params, cbopt) → {Promise|undefined}
- Set a new rules config.
+ Unblock an user by its id.
@@ -22626,7 +23757,7 @@ setRule
Parameters:
- Rule Config parameters.
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
- key
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- Rule Config key.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- data
-
-
-
-
-
-Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Rule Config Data parameters.
+ The user data object..
@@ -22808,7 +23854,7 @@ Parameters:
- value
+ id
@@ -22825,7 +23871,7 @@ Parameters:
- Rule Config Data value.
+ The user id.
@@ -22869,7 +23915,7 @@ Parameters:
- Callback function.
+ Callback function
@@ -22920,15 +23966,12 @@ Returns:
Example
- var params = { key: RULE_CONFIG_KEY };
-var data = { value: RULES_CONFIG_VALUE };
-
-management.setRulesConfig(params, data, function (err, rulesConfig) {
+ management.unblockUser({ id: USER_ID }, function (err) {
if (err) {
// Handle error.
}
- // Rules Config set.
+ // User unblocked.
});
@@ -22983,7 +24026,7 @@ unlinkUser
upda
updateCli
upda
updat
up
u
updateRole<
updateRule<
u
updateUser<
upd
ver
Example
diff --git a/docs/module-management.ManagementTokenProvider.html b/docs/module-management.ManagementTokenProvider.html
index 82e343e91..2a4383477 100644
--- a/docs/module-management.ManagementTokenProvider.html
+++ b/docs/module-management.ManagementTokenProvider.html
@@ -24,7 +24,7 @@
@@ -556,7 +556,7 @@ getAcce
Returns:
diff --git a/docs/module-management.ResourceServersManager.html b/docs/module-management.ResourceServersManager.html
index 7b3909213..46b96c0b0 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 6064aa6ff..e4f774f8b 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
index a5a59af78..c90f9dbf7 100644
--- a/docs/module-management.RolesManager.html
+++ b/docs/module-management.RolesManager.html
@@ -24,7 +24,7 @@
@@ -4217,7 +4217,7 @@ Example
diff --git a/docs/module-management.RulesConfigsManager.html b/docs/module-management.RulesConfigsManager.html
index 6c0be5d76..f75318df5 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 84d895c28..2d4f771db 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 e3d8ffa17..1e1a843ec 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 c01a5bcc6..94e05610a 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 dd25b20f3..2da480bb0 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.UserBlocksManager.html b/docs/module-management.UserBlocksManager.html
new file mode 100644
index 000000000..d0e9eb359
--- /dev/null
+++ b/docs/module-management.UserBlocksManager.html
@@ -0,0 +1,1441 @@
+
+
+
+
+
+ UserBlocksManager - Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UserBlocksManager
+
+
+
+
+
+
+
+
+
+
+
+
+ management.
+
+ UserBlocksManager
+
+
+ Abstracts interaction with the user-blocks endpoint.
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+ new UserBlocksManager(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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ delete(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Unblock an user by its id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.delete({ id: USER_ID }, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // User unblocked.
+});
+
+
+
+
+
+
+
+
+
+
+ deleteByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Unblock an user by identifier.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user identifier, any of: username, phone_number, email.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.deleteByIdentifier({ identifier: USER_ID }, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // User unblocked.
+});
+
+
+
+
+
+
+
+
+
+
+ get(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get user blocks by id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.get({ id: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
+
+
+
+
+
+
+
+
+
+
+ getByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get user blocks by identifier.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object..
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ identifier
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user identifier, any of: username, phone_number, email.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.userBlocks.getByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-management.UsersManager.html b/docs/module-management.UsersManager.html
index 8e5cf0a2e..dbf1ccc33 100644
--- a/docs/module-management.UsersManager.html
+++ b/docs/module-management.UsersManager.html
@@ -24,7 +24,7 @@
@@ -5753,7 +5753,7 @@ Example
diff --git a/docs/module-management.html b/docs/module-management.html
index 59dfc7588..669d7e280 100644
--- a/docs/module-management.html
+++ b/docs/module-management.html
@@ -24,7 +24,7 @@
@@ -128,6 +128,9 @@ Classes
Classes
diff --git a/docs/module-utils.html b/docs/module-utils.html
index c9cd94e0a..f8c6f999d 100644
--- a/docs/module-utils.html
+++ b/docs/module-utils.html
@@ -24,7 +24,7 @@
@@ -71,6 +71,114 @@ Methods
+
+
+
+
+ (static) generateClientInfo() → {Object}
+
+
+
+
+
+
+ Return an object with information about the current client.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+ Object containing client information.
+
+
+
+
+
+
+
+
+
+
@@ -119,7 +227,7 @@ (static) <
(static) Source:
(static)
(static)
diff --git a/docs/utils.js.html b/docs/utils.js.html
index dcd265d5d..c87d4e5f7 100644
--- a/docs/utils.js.html
+++ b/docs/utils.js.html
@@ -24,7 +24,7 @@
@@ -41,6 +41,7 @@ utils.js
var Promise = require('bluebird');
var request = require('request');
+var pkg = require('../package.json');
/**
* @module utils
@@ -63,6 +64,24 @@ utils.js
.replace(/=+$/, '');
};
+/**
+ * Return an object with information about the current client.
+ *
+ * @method generateClientInfo
+ * @memberOf module:utils
+ *
+ * @return {Object} Object containing client information.
+ */
+utils.generateClientInfo = function() {
+ return {
+ name: 'node-auth0',
+ version: pkg.version,
+ env: {
+ node: process.version.replace('v', '')
+ }
+ };
+};
+
/**
* Simple wrapper that, given a class, a property name and a method name,
* creates a new method in the class that is a wrapper for the given
@@ -124,7 +143,7 @@ utils.js
diff --git a/package.json b/package.json
index 4dae031c7..aa642e9f6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "auth0",
- "version": "2.17.0",
+ "version": "2.17.1",
"description": "SDK for Auth0 API v2",
"main": "src/index.js",
"files": [
diff --git a/docs/index.html b/docs/index.html index 59b2d5896..15cb84272 100644 --- a/docs/index.html +++ b/docs/index.html @@ -24,7 +24,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 094cc993b..685b70954 100644
--- a/docs/index.js.html
+++ b/docs/index.js.html
@@ -24,7 +24,7 @@
Return an object with information about the current client, Object containing client information. Simple abstraction for performing CRUD operations on the
+user-blocks endpoint. Return an object with information about the current client, Object containing client information. Get user's log events. Get user blocks by its id. Get logs data. The user data object.. User id. The user id. Number of results per page. Page number, zero indexed. Callback function The field to use for sorting. Use field:order where order is 1 for ascending and -1 for descending. For example date:-1. Get user blocks by its identifier. true if a query summary must be included in the result, false otherwise. Default false; The user data object.. The user identifier, any of: username, phone_number, email. Callback function. Callback function Get user's permissions Get user's log events. Get permissions data. Get logs data. Get user's roles Get user's permissions Get roles data. Get permissions data. Get all users. Get user's roles Users params. Get roles data. The version of the search engine to use. 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 users for a given email address Get all users. Email Address of users to locate Users params. The version of the search engine to use. Number of results per page. Page number, zero indexed. Get users in a given role Get users for a given email address Id of the role Email Address of users to locate 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. Get users in a given role Id of the role Callback function. 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. ID of the user to be linked. ID of the connection to be used. Callback function. Generate new Guardian recovery code. The user data object. The user id. Callback function. Remove permissions from a role ID of the Role. permissions data Array of permissions ID of the user to be linked. Name of a permission ID of the connection to be used. Identifier for a resource Generate new Guardian recovery code. Remove permissions from a user The user data object. params object The user id. user_id data object containing list of permission IDs Array of permission IDs Remove permissions from a role Remove roles from a user ID of the Role. permissions data params object Array of permissions user_id Name of a permission data object containing list of role IDs Identifier for a resource Array of role IDs Remove permissions from a user Send a verification email to a user. params object user_id data object containing list of permission IDs User data object. Array of permission IDs ID of the user to be verified. Remove roles from a user Set a new rules config. params object Rule Config parameters. user_id Rule Config key. data object containing list of role IDs Rule Config Data parameters. Array of role IDs Rule Config Data value. Send a verification email to a user. Unblock an user by its id. User data object. The user data object.. ID of the user to be verified. The user identifier, any of: username, phone_number, email. Callback function. Callback function Set a new rules config. Unblock an user by its id. Rule Config parameters. Rule Config key. Rule Config Data parameters. The user data object.. Rule Config Data value. The user id. Callback function. Callback function Abstracts interaction with the user-blocks endpoint. The client options. The URL of the API. Headers to be included in all requests. Retry Policy Config Unblock an user by its id. The user data object.. The user id. Callback function Unblock an user by identifier. The user data object.. The user identifier, any of: username, phone_number, email. Callback function Get user blocks by id. The user data object.. The user id. Callback function Get user blocks by identifier. The user data object.. The user identifier, any of: username, phone_number, email. Callback function Return an object with information about the current client. Object containing client information.index.js
diff --git a/docs/management_BlacklistedTokensManager.js.html b/docs/management_BlacklistedTokensManager.js.html
index ca8b9a674..57789b280 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 35705ce1a..047a4b671 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 c976734cd..fa51ba415 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 2652dc8d3..03aa47fa2 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 c9ed7853b..37a44518e 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 88683e316..8efae0c68 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 01384f0f8..3b75e5dd2 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 6438643cb..428a57e77 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 ccceff56b..b434190dd 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 a83fef1f9..1296db43f 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 9b1f553c9..78f3bc81d 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 a1c5c3285..13159d3fd 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 d54e67e7f..c4b5e2e84 100644
--- a/docs/management_ManagementTokenProvider.js.html
+++ b/docs/management_ManagementTokenProvider.js.html
@@ -24,7 +24,7 @@
management/ManagementTokenProvider.js
domain: this.options.domain,
clientId: this.options.clientId,
clientSecret: this.options.clientSecret,
- telemetry: this.options.telemetry
+ telemetry: this.options.telemetry,
+ clientInfo: this.options.clientInfo
};
this.authenticationClient = new AuthenticationClient(authenticationClientOptions);
};
@@ -189,7 +190,7 @@ management/ManagementTokenProvider.js
diff --git a/docs/management_ResourceServersManager.js.html b/docs/management_ResourceServersManager.js.html
index 6e22790ed..00def9033 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
index adcf4d6a0..47ab35ff9 100644
--- a/docs/management_RolesManager.js.html
+++ b/docs/management_RolesManager.js.html
@@ -24,7 +24,7 @@
management/RolesManager.js
diff --git a/docs/management_RulesConfigsManager.js.html b/docs/management_RulesConfigsManager.js.html
index 4164615e5..28ceed46c 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 7cde7ef0c..f7ba7415b 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 93c852667..4f40e59ab 100644
--- a/docs/management_StatsManager.js.html
+++ b/docs/management_StatsManager.js.html
@@ -24,7 +24,7 @@
management/StatsManager.js
clientOptions,
options.tokenProvider
);
- this.stats = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -125,10 +125,10 @@ management/StatsManager.js
params.type = 'daily';
if (cb && cb instanceof Function) {
- return this.stats.get(params, cb);
+ return this.resource.get(params, cb);
}
- return this.stats.get(params);
+ return this.resource.get(params);
};
/**
@@ -154,11 +154,11 @@ management/StatsManager.js
var options = { type: 'active-users' };
if (cb && cb instanceof Function) {
- return this.stats.get(options, cb);
+ return this.resource.get(options, cb);
}
// Return a promise.
- return this.stats.get(options);
+ return this.resource.get(options);
};
module.exports = StatsManager;
@@ -174,7 +174,7 @@ management/StatsManager.js
diff --git a/docs/management_TenantManager.js.html b/docs/management_TenantManager.js.html
index db15c4e7b..f2d412579 100644
--- a/docs/management_TenantManager.js.html
+++ b/docs/management_TenantManager.js.html
@@ -24,7 +24,7 @@
management/TenantManager.js
clientOptions,
options.tokenProvider
);
- this.tenant = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -113,11 +113,11 @@ management/TenantManager.js
*/
TenantManager.prototype.updateSettings = function(data, cb) {
if (cb && cb instanceof Function) {
- return this.tenant.patch({}, data, cb);
+ return this.resource.patch({}, data, cb);
}
// Return a promise.
- return this.tenant.patch({}, data);
+ return this.resource.patch({}, data);
};
/**
@@ -141,11 +141,11 @@ management/TenantManager.js
*/
TenantManager.prototype.getSettings = function(cb) {
if (cb && cb instanceof Function) {
- return this.tenant.get({}, cb);
+ return this.resource.get({}, cb);
}
// Return a promise.
- return this.tenant.get({});
+ return this.resource.get({});
};
module.exports = TenantManager;
@@ -161,7 +161,7 @@ management/TenantManager.js
diff --git a/docs/management_TicketsManager.js.html b/docs/management_TicketsManager.js.html
index 418b10d7e..5a61cf0ea 100644
--- a/docs/management_TicketsManager.js.html
+++ b/docs/management_TicketsManager.js.html
@@ -24,7 +24,7 @@
management/TicketsManager.js
clientOptions,
options.tokenProvider
);
- this.ticket = new RetryRestClient(auth0RestClient, options.retry);
+ this.resource = new RetryRestClient(auth0RestClient, options.retry);
};
/**
@@ -114,11 +114,11 @@ management/TicketsManager.js
var params = { type: 'password-change' };
if (cb && cb instanceof Function) {
- return this.ticket.create(params, data, cb);
+ return this.resource.create(params, data, cb);
}
// Return a promise.
- return this.ticket.create(params, data);
+ return this.resource.create(params, data);
};
/**
@@ -146,11 +146,11 @@ management/TicketsManager.js
var params = { type: 'email-verification' };
if (cb && cb instanceof Function) {
- return this.ticket.create(params, data, cb);
+ return this.resource.create(params, data, cb);
}
// Return a promise.
- return this.ticket.create(params, data);
+ return this.resource.create(params, data);
};
module.exports = TicketsManager;
@@ -166,7 +166,7 @@ management/TicketsManager.js
diff --git a/docs/management_UserBlocksManager.js.html b/docs/management_UserBlocksManager.js.html
new file mode 100644
index 000000000..2e639e3d7
--- /dev/null
+++ b/docs/management_UserBlocksManager.js.html
@@ -0,0 +1,236 @@
+
+
+
+
+
+ management/UserBlocksManager.js
+
+
+
+
+
+
+
+
+ var ArgumentError = require('rest-facade').ArgumentError;
+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
+ * Abstracts interaction with the user-blocks endpoint.
+ * @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 UserBlocksManager = 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');
+ }
+
+ var clientOptions = {
+ errorFormatter: { message: 'message', name: 'error' },
+ headers: options.headers,
+ query: { repeatParams: false }
+ };
+
+ var userBlocksByIdResource = new Auth0RestClient(
+ options.baseUrl + '/user-blocks/:id',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.userBlocksById = new RetryRestClient(userBlocksByIdResource, options.retry);
+
+ var userBlocksByIdentifierResource = new Auth0RestClient(
+ options.baseUrl + '/user-blocks',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.userBlocksByIdentifier = new RetryRestClient(userBlocksByIdentifierResource, options.retry);
+};
+
+/**
+ * Get user blocks by id.
+ *
+ * @method get
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.get({ id: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+UserBlocksManager.prototype.get = function(params) {
+ if (typeof params !== 'object' || typeof params.id !== 'string') {
+ throw new ArgumentError('You must provide an user id for the get method');
+ }
+
+ return this.userBlocksById.get.apply(this.userBlocksById, arguments);
+};
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method delete
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.delete({ id: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+UserBlocksManager.prototype.delete = function(params) {
+ if (typeof params !== 'object' || typeof params.id !== 'string') {
+ throw new ArgumentError('You must provide an user id for the delete method');
+ }
+
+ return this.userBlocksById.delete.apply(this.userBlocksById, arguments);
+};
+
+/**
+ * Get user blocks by identifier.
+ *
+ * @method getByIdentifier
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.getByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+ UserBlocksManager.prototype.getByIdentifier = function(params) {
+ if (typeof params !== 'object' || typeof params.identifier !== 'string') {
+ throw new ArgumentError('You must provide an user identifier for the getByIdentifier method');
+ }
+
+ return this.userBlocksByIdentifier.get.apply(this.userBlocksByIdentifier, arguments);
+ };
+
+/**
+ * Unblock an user by identifier.
+ *
+ * @method deleteByIdentifier
+ * @memberOf module:management.UserBlocksManager.prototype
+ *
+ * @example
+ * management.userBlocks.deleteByIdentifier({ identifier: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+ UserBlocksManager.prototype.deleteByIdentifier = function(params) {
+ if (typeof params !== 'object' || typeof params.identifier !== 'string') {
+ throw new ArgumentError('You must provide an user identifier for the deleteByIdentifier method');
+ }
+
+ return this.userBlocksByIdentifier.delete.apply(this.userBlocksByIdentifier, arguments);
+ };
+
+ module.exports = UserBlocksManager;
+
+
+
+
+
+
+
+
diff --git a/docs/management_UsersManager.js.html b/docs/management_UsersManager.js.html
index 9f330abbb..4cca607bf 100644
--- a/docs/management_UsersManager.js.html
+++ b/docs/management_UsersManager.js.html
@@ -24,7 +24,7 @@
management/UsersManager.js
diff --git a/docs/management_index.js.html b/docs/management_index.js.html
index 4d6da6415..d6009ca1a 100644
--- a/docs/management_index.js.html
+++ b/docs/management_index.js.html
@@ -24,7 +24,7 @@
management/index.js
/** @module management */
var util = require('util');
-
-var pkg = require('../../package.json');
var utils = require('../utils');
var jsonToBase64 = utils.jsonToBase64;
+var generateClientInfo = utils.generateClientInfo;
var ArgumentError = require('rest-facade').ArgumentError;
var assign = Object.assign || require('object.assign');
@@ -54,6 +53,7 @@
management/index.js
var ClientGrantsManager = require('./ClientGrantsManager');
var GrantsManager = require('./GrantsManager');
var UsersManager = require('./UsersManager');
+var UserBlocksManager = require('./UserBlocksManager');
var ConnectionsManager = require('./ConnectionsManager');
var BlacklistedTokensManager = require('./BlacklistedTokensManager');
var RulesManager = require('./RulesManager');
@@ -170,8 +170,11 @@ management/index.js
}
if (options.telemetry !== false) {
- var telemetry = jsonToBase64(options.clientInfo || this.getClientInfo());
- managerOptions.headers['Auth0-Client'] = telemetry;
+ var clientInfo = options.clientInfo || generateClientInfo();
+ if ('string' === typeof clientInfo.name && clientInfo.name.length > 0) {
+ var telemetry = jsonToBase64(clientInfo);
+ managerOptions.headers['Auth0-Client'] = telemetry;
+ }
}
managerOptions.retry = options.retry;
@@ -208,6 +211,14 @@ management/index.js
*/
this.users = new UsersManager(managerOptions);
+ /**
+ * Simple abstraction for performing CRUD operations on the
+ * user-blocks endpoint.
+ *
+ * @type {UserBlocksManager}
+ */
+ this.userBlocks = new UserBlocksManager(managerOptions);
+
/**
* Simple abstraction for performing CRUD operations on the
* guardian endpoint.
@@ -331,37 +342,6 @@ management/index.js
this.roles = new RolesManager(managerOptions);
};
-/**
- * Return an object with information about the current client,
- *
- * @method getClientInfo
- * @memberOf module:management.ManagementClient.prototype
- *
- * @return {Object} Object containing client information.
- */
-ManagementClient.prototype.getClientInfo = function() {
- var clientInfo = {
- name: 'node-auth0',
- version: pkg.version,
- dependencies: [],
- environment: [
- {
- name: 'node.js',
- version: process.version.replace('v', '')
- }
- ]
- };
- // Add the dependencies to the client info object.
- Object.keys(pkg.dependencies).forEach(function(name) {
- clientInfo.dependencies.push({
- name: name,
- version: pkg.dependencies[name]
- });
- });
-
- return clientInfo;
-};
-
/**
* Get all connections.
*
@@ -1572,6 +1552,98 @@ management/index.js
'users.regenerateRecoveryCode'
);
+/**
+ * Get user blocks by its id.
+ *
+ * @method getUserBlocks
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.getUserBlocks({ id: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'getUserBlocks', 'userBlocks.get');
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method unblockUser
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.unblockUser({ id: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.id The user id.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'unblockUser', 'userBlocks.delete');
+
+/**
+ * Get user blocks by its identifier.
+ *
+ * @method getUserBlocksByIdentifier
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.getUserBlocksByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * console.log(blocks);
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'getUserBlocksByIdentifier', 'userBlocks.getByIdentifier');
+
+/**
+ * Unblock an user by its id.
+ *
+ * @method unblockUser
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.unblockUserByIdentifier({ identifier: USER_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // User unblocked.
+ * });
+ *
+ * @param {Object} params The user data object..
+ * @param {String} params.identifier The user identifier, any of: username, phone_number, email.
+ * @param {Function} [cb] Callback function
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(ManagementClient, 'unblockUserByIdentifier', 'userBlocks.deleteByIdentifier');
+
/**
* Get a single Guardian enrollment.
*
@@ -1964,7 +2036,7 @@ management/index.js
* user_id: '{USER_ID}'
* };
*
- * management.sendEmailVerification(function (err) {
+ * management.sendEmailVerification(params, function (err) {
* if (err) {
* // Handle error.
* }
@@ -2778,7 +2850,7 @@ management/index.js
diff --git a/docs/module-auth.AuthenticationClient.html b/docs/module-auth.AuthenticationClient.html
index 86d7d5b8a..faff593e3 100644
--- a/docs/module-auth.AuthenticationClient.html
+++ b/docs/module-auth.AuthenticationClient.html
@@ -24,7 +24,7 @@
n
databaseSource:
oauthSource:
passwordl
tokensSource:
usersSource:
changeP
Source:
Example
getClientInfo() → {Object}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
-
-
-
-
-get
getProfile<
password
refreshTo
reque
reque
request
verifySM
Examples
diff --git a/docs/module-auth.DatabaseAuthenticator.html b/docs/module-auth.DatabaseAuthenticator.html
index edaf06cc6..223037466 100644
--- a/docs/module-auth.DatabaseAuthenticator.html
+++ b/docs/module-auth.DatabaseAuthenticator.html
@@ -24,7 +24,7 @@
changeP
signInSource:
signUpSource:
Example
diff --git a/docs/module-auth.OAUthWithIDTokenValidation.html b/docs/module-auth.OAUthWithIDTokenValidation.html
index e9938b53c..a573702b6 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 53f0c464f..75f97d9cf 100644
--- a/docs/module-auth.OAuthAuthenticator.html
+++ b/docs/module-auth.OAuthAuthenticator.html
@@ -24,7 +24,7 @@
Source:
password
refreshTo
signInSource:
socialSig
Returns:
diff --git a/docs/module-auth.PasswordlessAuthenticator.html b/docs/module-auth.PasswordlessAuthenticator.html
index e7917a34b..4faf4561f 100644
--- a/docs/module-auth.PasswordlessAuthenticator.html
+++ b/docs/module-auth.PasswordlessAuthenticator.html
@@ -24,7 +24,7 @@
sendEmail
sendSMSSource:
signInSource:
Examples
diff --git a/docs/module-auth.TokensManager.html b/docs/module-auth.TokensManager.html
index 9cce2d10d..05b659b5c 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 384968aae..75e286761 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 fe29f3866..8d1b56062 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 7a5b7f786..238929693 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 c6582dd4c..04ee24d7f 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 e6e53026f..ff7d57a16 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 49b038240..4c2f59ce1 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 cd019aa11..7b94c72fa 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 cf109bcaf..5eb06126b 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 2ddc399ed..fc7fbf0bc 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 ade45bd25..fdfb922d2 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 99216617b..b57cf61b0 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 d6bd3438b..c72346609 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 c2adbe428..b8b9ab2c7 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 c15ce93bc..03cf7f9e3 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 f65be0741..5631eda4e 100644
--- a/docs/module-management.ManagementClient.html
+++ b/docs/module-management.ManagementClient.html
@@ -24,7 +24,7 @@
blac
clientGra
clientsSource:
connection
customDo
devi
emailPro
emailTe
grantsSource:
guardianSource:
jobsSource:
logsSource:
resour
rolesSource:
rulesSource:
rulesConf
statsSource:
tenantSource:
ticketsSource:
Type:
+userBlocks :UserBlocksManager
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
usersSource:
a
Source:
assi
blackli
Source:
createCli
crea
creat
cre
Source:
Source:
c
createRole<
createRule<
createUser<
deleteA
deleteCli
dele
delet
del
Source:
de
Source:
d
deleteRole<
deleteRule<
dele
deleteUser<
exportUser
ge
g
getClient
getCli
Example
getClientInfo() → {Object}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Returns:
-
-
-
-
-
-
-
-getClients<
getConne
getConn
getCus
getCu
getDaily
g
getEm
getGrants
Source:
getJobSource:
getLogSource:
getLogsSource:
g
getR
get
getRoleSource:
getRolesSource:
getRuleSource:
getRulesSource:
getRul
getT
getUserSource:
Example
- getUserLogs(params, cbopt) → {Promise|undefined}
+ getUserBlocks(params, cbopt) → {Promise|undefined}
getUserLog
Parameters:
- Parameters:
-
+
+
-
-
-
@@ -18578,76 +18527,259 @@
-
-
- per_page
-
-
-
-
-
-
-
-
- Number
-
-
-
-
-
Parameters:
-
+
+
-
+ page
cb
-
+ Number
+function
+
+ <optional>
+
+
+
+
+
+
+
-
-
-
-
-
-
-
- sort
-
-
-
-
-
- String
-
-
-
-
-
-
-
- include_totals
-
-
-
-
-
+
+Boolean
-
- Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getUserBlocks({ id: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
getUserBlocksByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
@@ -18691,7 +18823,7 @@
+
+
+ identifier
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
Parameters:
-
@@ -18742,14 +18874,12 @@ Returns:
Example
- var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-
-management.getUserLogs(params, function (err, logs) {
+
management.getUserBlocksByIdentifier({ identifier: USER_ID }, function (err, blocks) {
if (err) {
// Handle error.
}
- console.log(logs);
+ console.log(blocks);
});
Example
- getUserPermissions(params, cbopt) → {Promise|undefined}
+ getUserLogs(params, cbopt) → {Promise|undefined}
get
- Parameters:
-
- Example
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-management.getUserPermissions(params, function (err, logs) {
+management.getUserLogs(params, function (err, logs) {
if (err) {
// Handle error.
}
@@ -19136,14 +19266,14 @@
Example
- getUserRoles(params, cbopt) → {Promise|undefined}
+ getUserPermissions(params, cbopt) → {Promise|undefined}
getUserRo
Parameters:
-
- Example
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-management.getUserRoles(params, function (err, logs) {
+management.getUserPermissions(params, function (err, logs) {
if (err) {
// Handle error.
}
@@ -19511,14 +19641,14 @@
Example
- getUsers(paramsopt, cbopt) → {Promise|undefined}
+ getUserRoles(params, cbopt) → {Promise|undefined}
getUsersSource:
Parameters:
- <optional>
-
@@ -19627,7 +19755,7 @@ Parameters:
- Parameters:
Type
- Attributes
-
@@ -19655,34 +19781,24 @@ Parameters:
-
@@ -19704,16 +19820,6 @@
+ search_engine
id
-
- Number
+String
-
- <optional>
-
-
-
-
-
-
-
-
Parameters:
-
- <optional>
-
@@ -19740,21 +19846,63 @@
-
-
-
-
-
- Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sort
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
@@ -19849,21 +19997,14 @@
+
+ include_totals
+
-
+Boolean
+
+
+
+
+
-
Returns:
Example
-
-
- // Pagination settings.
-var params = {
- search_engine: 'v3',
- per_page: 10,
- page: 0
-};
+
var params = { id: USER_ID, page: 0, per_page: 50, sort: 'date:-1', include_totals: true };
-auth0.getUsers(params, function (err, users) {
- console.log(users.length);
+management.getUserRoles(params, function (err, logs) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(logs);
});
Example
- getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
+ getUsers(paramsopt, cbopt) → {Promise|undefined}
getUse
Parameters:
-
@@ -20079,12 +20355,20 @@
+ email
params
- String
+Object
@@ -19991,7 +20132,142 @@ Parameters:
-
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ search_engine
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ per_page
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ page
+
+
+
+
+
+ Number
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
Example
+auth0.getUsersByEmail(email, function (err, users) {
- console.log(users);
+
@@ -20096,14 +20380,14 @@ // Pagination settings.
+var params = {
+ search_engine: 'v3',
+ per_page: 10,
+ page: 0
+};
+
+auth0.getUsers(params, function (err, users) {
+ console.log(users.length);
});
Example
- getUsersInRole(roleIdopt, cbopt) → {Promise|undefined}
+ getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
getUser
Parameters:
-
@@ -20297,17 +20581,14 @@
+ roleId
email
@@ -20212,7 +20496,7 @@ Parameters:
-
Returns:
Examples
-
-
+var params = { id :'ROLE_ID'};
Example
- management.getUsersInRole(params, function (err, users) {
+
@@ -20320,15 +20601,14 @@ auth0.getUsersByEmail(email, function (err, users) {
console.log(users);
});
Examples
- importUsers(data, cbopt) → {Promise|undefined}
+ getUsersInRole(roleIdopt, cbopt) → {Promise|undefined}
importUser
Parameters:
-
+
+
+
+
+ data
+
+
+ roleId
+
+
+
+
+
+ String
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Examples
+
+
+
+
+
+ var params = { id :'ROLE_ID'};
+
+management.getUsersInRole(params, function (err, users) {
+ console.log(users);
+});
importUsers(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+data
@@ -20662,7 +21167,7 @@ linkUsers
Parameters:
-
+
+
+
+
+ user_id
+
+
+ user_id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+ connection_id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+var userId = 'USER_ID';
+var params = {
+ user_id: 'OTHER_USER_ID',
+ connection_id: 'CONNECTION_ID'
+};
+
+management.linkUsers(userId, params, function (err, user) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Users linked.
+});
regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
+ console.log(newRecoveryCode);
+});
removePermissionsFromRole(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params.id
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
@@ -20931,18 +22087,11 @@
+
+
+ permissions
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
@@ -20819,7 +21967,7 @@ permission_name
@@ -20810,7 +21958,7 @@ Parameters:
-
Parameters:
-
+
+
+
+
+ connection_id
resource_server_identifier
@@ -20836,7 +21984,15 @@ Parameters:
-
+ Returns:
Example
- var userId = 'USER_ID';
-var params = {
- user_id: 'OTHER_USER_ID',
- connection_id: 'CONNECTION_ID'
-};
-
-management.linkUsers(userId, params, function (err, user) {
- if (err) {
- // Handle error.
- }
+
var params = { id :'ROLE_ID'};
+var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
- // Users linked.
+management.removePermissionsFromRole(params, data, function (err, permissions) {
+ console.log(permissions);
});
Example
- regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
+ removePermissionsFromUser(params, data, cbopt) → {Promise|undefined}
Source:
+Parameters:
-
+
+
+
+ data
params
@@ -21068,7 +22217,7 @@ Parameters:
- Parameters:
-
+
+
+
+
+
+ data
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
@@ -21206,8 +22440,15 @@
+
+
+ permissions
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
Returns:
Example
- management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
- console.log(newRecoveryCode);
+
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.
});
Example
- removePermissionsFromRole(data, cbopt) → {Promise|undefined}
+ removeRolesFromUser(params, data, cbopt) → {Promise|undefined}
Source:
Parameters:
-
-
-
-
-
-
-
- params.id
-
-
-
-
-
- String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ data
params
@@ -21367,7 +22574,7 @@ Parameters:
- Parameters:
-
-
+
+
+
-
+ permissions
id
@@ -21410,33 +22617,24 @@ Parameters:
-
-
-
-
-
-
-
+
+
+Name
-
-
- Type
-
-
+
+ Description
-
-
+
+
+
+ permission_name
data
@@ -21449,20 +22647,45 @@
+ Parameters:
+
+
+
+
+
+
+
-
-
+
+
-
+
+
+
+
+
Name
+
+
+ Type
+
+
+
+
+
+ Description
+
-
-
-
-
-
+ resource_server_identifier
roles
@@ -21479,15 +22702,7 @@ Parameters:
-
- Returns:
Example
- var params = { id :'ROLE_ID'};
-var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+
var parms = { id : 'USER_ID'};
+var data = { "roles" :["role1"]};
+
+management.removeRolesFromUser(params, data, function (err) {
+ if (err) {
+ // Handle error.
+ }
-management.removePermissionsFromRole(params, data, function (err, permissions) {
- console.log(permissions);
+ // User assigned roles.
});
Example
- removePermissionsFromUser(params, data, cbopt) → {Promise|undefined}
+ sendEmailVerification(data, cbopt) → {Promise|undefined}
Source:
Parameters:
-
-
-
-
-
-
-
-
- params
-
-
-
-
-
- Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
-
- id
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
-
@@ -21778,7 +22912,7 @@ data
Parameters:
- String
+Object
@@ -21797,7 +22931,7 @@ Parameters:
- Parameters:
-
@@ -21935,15 +23069,14 @@
+ permissions
user_id
@@ -21840,7 +22974,7 @@ Parameters:
-
Returns:
Example
- var parms = { id : 'USER_ID'};
-var data = { "permissions" : [{"permission_name" :"do:something" ,"resource_server_identifier" :"test123" }]};
+
var params = {
+ user_id: '{USER_ID}'
+};
-management.removePermissionsFromUser(params, data, function (err) {
+management.sendEmailVerification(params, function (err) {
if (err) {
// Handle error.
}
-
- // User assigned permissions.
});
Example
- removeRolesFromUser(params, data, cbopt) → {Promise|undefined}
+ setRulesConfig(params, data, cbopt) → {Promise|undefined}
re
Parameters:
- Parameters:
-
@@ -22135,7 +23268,7 @@
+ id
key
@@ -22112,7 +23245,7 @@ Parameters:
-
Parameters:
- String
+Object
@@ -22154,7 +23287,7 @@ Parameters:
- Parameters:
-
@@ -22292,15 +23425,15 @@
+ roles
value
@@ -22197,7 +23330,7 @@ Parameters:
-
Returns:
Example
- var parms = { id : 'USER_ID'};
-var data = { "roles" :["role1"]};
+
var params = { key: RULE_CONFIG_KEY };
+var data = { value: RULES_CONFIG_VALUE };
-management.removeRolesFromUser(params, data, function (err) {
+management.setRulesConfig(params, data, function (err, rulesConfig) {
if (err) {
// Handle error.
}
- // User assigned roles.
+ // Rules Config set.
});
Example
- sendEmailVerification(data, cbopt) → {Promise|undefined}
+ unblockUser(params, cbopt) → {Promise|undefined}
Parameters:
-
+ data
params
@@ -22426,7 +23559,7 @@ Parameters:
- Parameters:
-
@@ -22513,7 +23646,7 @@
+ user_id
identifier
@@ -22469,7 +23602,7 @@ Parameters:
-
Parameters:
-
@@ -22564,14 +23697,12 @@ Returns:
Example
- var params = {
- user_id: '{USER_ID}'
-};
-
-management.sendEmailVerification(function (err) {
+
management.unblockUserByIdentifier({ identifier: USER_ID }, function (err) {
if (err) {
// Handle error.
}
+
+ // User unblocked.
});
Example
- setRulesConfig(params, data, cbopt) → {Promise|undefined}
+ unblockUser(params, cbopt) → {Promise|undefined}
setRule
Parameters:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
-
-
- Type
-
-
-
-
-
- Description
-
-
-
-
-
-
-
-
-
- key
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
-
-
-
-
-
- data
-
-
-
-
-
- Object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Parameters:
-
@@ -22869,7 +23915,7 @@
+ value
id
@@ -22825,7 +23871,7 @@ Parameters:
-
Parameters:
-
@@ -22920,15 +23966,12 @@ Returns:
Example
- var params = { key: RULE_CONFIG_KEY };
-var data = { value: RULES_CONFIG_VALUE };
-
-management.setRulesConfig(params, data, function (err, rulesConfig) {
+
management.unblockUser({ id: USER_ID }, function (err) {
if (err) {
// Handle error.
}
- // Rules Config set.
+ // User unblocked.
});
unlinkUser
upda
updateCli
upda
updat
up
u
updateRole<
updateRule<
u
updateUser<
upd
ver
Example
diff --git a/docs/module-management.ManagementTokenProvider.html b/docs/module-management.ManagementTokenProvider.html
index 82e343e91..2a4383477 100644
--- a/docs/module-management.ManagementTokenProvider.html
+++ b/docs/module-management.ManagementTokenProvider.html
@@ -24,7 +24,7 @@
getAcce
Returns:
diff --git a/docs/module-management.ResourceServersManager.html b/docs/module-management.ResourceServersManager.html
index 7b3909213..46b96c0b0 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 6064aa6ff..e4f774f8b 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
index a5a59af78..c90f9dbf7 100644
--- a/docs/module-management.RolesManager.html
+++ b/docs/module-management.RolesManager.html
@@ -24,7 +24,7 @@
Example
diff --git a/docs/module-management.RulesConfigsManager.html b/docs/module-management.RulesConfigsManager.html
index 6c0be5d76..f75318df5 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 84d895c28..2d4f771db 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 e3d8ffa17..1e1a843ec 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 c01a5bcc6..94e05610a 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 dd25b20f3..2da480bb0 100644
--- a/docs/module-management.TicketsManager.html
+++ b/docs/module-management.TicketsManager.html
@@ -24,7 +24,7 @@
Example
diff --git a/docs/module-management.UserBlocksManager.html b/docs/module-management.UserBlocksManager.html
new file mode 100644
index 000000000..d0e9eb359
--- /dev/null
+++ b/docs/module-management.UserBlocksManager.html
@@ -0,0 +1,1441 @@
+
+
+
+
+
+ UserBlocksManager
+
+
+
+
+
+
+
+
+ management.
+
+ UserBlocksManager
+
+
+ Constructor
+
+
+ new UserBlocksManager(options)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ options
+
+
+
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ baseUrl
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ headers
+
+
+
+
+
+ Object
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ retry
+
+
+
+
+
+ Object
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+delete(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.userBlocks.delete({ id: USER_ID }, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // User unblocked.
+});
deleteByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ identifier
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.userBlocks.deleteByIdentifier({ identifier: USER_ID }, function (err) {
+ if (err) {
+ // Handle error.
+ }
+
+ // User unblocked.
+});
get(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.userBlocks.get({ id: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
getByIdentifier(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ identifier
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.userBlocks.getByIdentifier({ identifier: USER_ID }, function (err, blocks) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(blocks);
+});
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-management.UsersManager.html b/docs/module-management.UsersManager.html
index 8e5cf0a2e..dbf1ccc33 100644
--- a/docs/module-management.UsersManager.html
+++ b/docs/module-management.UsersManager.html
@@ -24,7 +24,7 @@
Example
diff --git a/docs/module-management.html b/docs/module-management.html
index 59dfc7588..669d7e280 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 c9cd94e0a..f8c6f999d 100644
--- a/docs/module-utils.html
+++ b/docs/module-utils.html
@@ -24,7 +24,7 @@
Methods
+(static) generateClientInfo() → {Object}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+(static) <
(static) Source:
(static)
(static)
diff --git a/docs/utils.js.html b/docs/utils.js.html
index dcd265d5d..c87d4e5f7 100644
--- a/docs/utils.js.html
+++ b/docs/utils.js.html
@@ -24,7 +24,7 @@
utils.js
var Promise = require('bluebird');
var request = require('request');
+var pkg = require('../package.json');
/**
* @module utils
@@ -63,6 +64,24 @@
utils.js
.replace(/=+$/, '');
};
+/**
+ * Return an object with information about the current client.
+ *
+ * @method generateClientInfo
+ * @memberOf module:utils
+ *
+ * @return {Object} Object containing client information.
+ */
+utils.generateClientInfo = function() {
+ return {
+ name: 'node-auth0',
+ version: pkg.version,
+ env: {
+ node: process.version.replace('v', '')
+ }
+ };
+};
+
/**
* Simple wrapper that, given a class, a property name and a method name,
* creates a new method in the class that is a wrapper for the given
@@ -124,7 +143,7 @@ utils.js
diff --git a/package.json b/package.json
index 4dae031c7..aa642e9f6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "auth0",
- "version": "2.17.0",
+ "version": "2.17.1",
"description": "SDK for Auth0 API v2",
"main": "src/index.js",
"files": [