Simple facade for consuming a REST API endpoint.
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- @@ -1039,7 +1139,7 @@
- Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - @@ -978,7 +978,7 @@
- @@ -1247,7 +1247,7 @@
- @@ -1516,7 +1516,7 @@
- @@ -2171,7 +2171,7 @@
- @@ -2481,7 +2481,7 @@
- @@ -2760,7 +2760,7 @@
- Source: +
- + + + + + + + +
- Source: +
- + + + + + + + +
-
+
+
external:RestClient
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source:
- @@ -723,7 +723,7 @@
- Source:
- @@ -798,7 +798,7 @@
- Source:
- @@ -873,7 +873,7 @@
- @@ -948,7 +948,7 @@
- Source:
- @@ -1023,7 +1023,7 @@
- Source:
- @@ -1098,7 +1098,7 @@
- Source:
- @@ -1173,7 +1173,7 @@
- Source:
- @@ -1200,6 +1200,81 @@
- Source: +
- + + + + + + + +
-
+
+
GuardianManager
+ + +
+ - @@ -1321,7 +1396,7 @@
- @@ -1396,7 +1471,7 @@
- Source:
- @@ -1471,7 +1546,7 @@
- @@ -1545,7 +1620,7 @@
- Source:
- @@ -1619,7 +1694,7 @@
- @@ -1693,7 +1768,7 @@
- @@ -1767,7 +1842,7 @@
- @@ -1842,7 +1917,7 @@
- @@ -1926,7 +2001,7 @@
- Source:
- @@ -2226,7 +2301,7 @@
- @@ -2444,7 +2519,7 @@
- Source:
- @@ -2662,7 +2737,7 @@
- Source:
- @@ -2880,7 +2955,7 @@
- Source:
- @@ -3098,7 +3173,7 @@
- @@ -3282,7 +3357,7 @@
- Source:
- @@ -3468,7 +3543,7 @@
- Source:
- @@ -3686,7 +3761,7 @@
- Source:
- @@ -3904,7 +3979,7 @@
- Source:
- @@ -4122,7 +4197,7 @@
- Source:
- @@ -4306,7 +4381,7 @@
- Source:
- @@ -4575,7 +4650,7 @@
- Source:
- @@ -4844,7 +4919,7 @@
- @@ -5115,7 +5190,7 @@
- Source:
- @@ -5256,14 +5331,14 @@
- Source:
- @@ -5345,7 +5420,7 @@
- Source:
- @@ -5639,7 +5714,7 @@
- Source:
- @@ -5908,7 +5983,7 @@
- Source:
- @@ -6177,7 +6252,7 @@
- Source:
- @@ -6446,7 +6521,7 @@
- Deprecated:
- The function name has a typo.
-We're shipping this so it doesn't break compatibility.
-Use
deleteUserMultifactor
instead.
-
@@ -6676,7 +6719,7 @@ - The function name has a typo.
-We're shipping this so it doesn't break compatibility.
-Use
- Source:
- @@ -6913,7 +6956,7 @@
- Deprecated:
- The function name has a typo.
+We're shipping this so it doesn't break compatibility.
+Use
deleteUserMultifactor
instead.
+
@@ -6973,7 +7020,7 @@ - The function name has a typo.
+We're shipping this so it doesn't break compatibility.
+Use
- Source:
- @@ -7019,13 +7066,13 @@
- - Type: - -
-
-
-
Promise
-| -undefined
+ + - + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source:
- @@ -7337,7 +7681,7 @@
- @@ -7606,7 +7950,7 @@
- Source:
- @@ -7714,7 +8058,7 @@
- Source:
- @@ -8041,7 +8385,7 @@
- Source:
- @@ -8310,7 +8654,7 @@
- Source:
- @@ -8637,7 +8981,7 @@
- Source:
- @@ -8937,7 +9281,7 @@
- Source:
- @@ -9117,7 +9461,187 @@
- Source:
- + + + + + + + + + + + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source: +
- @@ -9136,8 +9660,61 @@
- @@ -9562,7 +10171,7 @@
- @@ -9836,7 +10445,7 @@
- @@ -10105,7 +10714,7 @@
- @@ -10612,7 +11221,7 @@
- Source:
- @@ -10881,7 +11490,7 @@
- Source:
- @@ -11208,7 +11817,7 @@
- @@ -11477,7 +12086,7 @@
- @@ -11804,7 +12413,7 @@
- Source:
- @@ -11924,7 +12533,7 @@
- Source:
- @@ -12108,7 +12717,7 @@
- @@ -12373,7 +12982,7 @@
- Source:
- @@ -12748,7 +13357,7 @@
- @@ -13032,14 +13641,236 @@
- Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - Source:
- @@ -13121,13 +13952,13 @@
- Source:
- @@ -13343,7 +14250,41 @@
- @@ -13641,41 +14585,7 @@
- Source:
- @@ -14201,7 +15075,7 @@
- Source:
- @@ -14558,7 +15432,7 @@
- Source:
- @@ -14881,7 +15755,7 @@
- Source:
- @@ -15190,7 +16064,7 @@
- Source:
- @@ -15496,7 +16370,7 @@
- Source:
- @@ -15802,7 +16676,7 @@
- Source:
- @@ -16055,7 +16929,7 @@
- Source:
- @@ -16361,7 +17235,7 @@
- Source:
- @@ -16666,7 +17540,7 @@
- Source:
- @@ -16882,7 +17756,7 @@
- Source:
- @@ -17188,7 +18062,7 @@
- Source:
- @@ -17466,7 +18340,7 @@
-
+
+
external:RestClient
+ + +
+ - Source: +
- + + + + + + +
- @@ -980,7 +1054,7 @@
- @@ -1249,7 +1323,7 @@
- @@ -1433,7 +1507,7 @@
- @@ -1730,7 +1804,7 @@
- @@ -1995,7 +2069,7 @@
- @@ -2322,7 +2396,7 @@
- Source:
- @@ -2543,7 +2617,7 @@
- @@ -2808,7 +2882,7 @@
- @@ -3143,7 +3217,7 @@
- @@ -3471,6 +3545,271 @@
- Source: +
- + + + + + + + +
- + Type: + +
-
+
+
Promise
+| + +undefined
+ + +
+ - @@ -3841,7 +4180,7 @@
- @@ -4147,7 +4486,7 @@
- Source:
- @@ -4456,7 +4795,7 @@
- Source:
- @@ -4734,7 +5073,7 @@
- EmailTemplatesManager +
- GuardianManager + +
- JobsManager @@ -144,7 +147,7 @@
diff --git a/docs/index.html b/docs/index.html
index cc157863c..1a1d18f36 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 731420497..4868fba4f 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 5a90b95e8..2366b8bd6 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 83db47ad5..d325a9a3b 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 74727a0ca..f4858aabd 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 7060b64c5..7083a0719 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_DeviceCredentialsManager.js.html b/docs/management_DeviceCredentialsManager.js.html
index 212f98329..63f4b8d1f 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 ea866799e..ff94dab39 100644
--- a/docs/management_EmailProviderManager.js.html
+++ b/docs/management_EmailProviderManager.js.html
@@ -24,7 +24,7 @@
@@ -195,7 +195,7 @@ management/EmailProviderManager.js
diff --git a/docs/management_EmailTemplatesManager.js.html b/docs/management_EmailTemplatesManager.js.html
index 1a5e04e97..d0d6b260d 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_GuardianManager.js.html b/docs/management_GuardianManager.js.html
new file mode 100644
index 000000000..ce9ea2881
--- /dev/null
+++ b/docs/management_GuardianManager.js.html
@@ -0,0 +1,156 @@
+
+
+
+
+
+ management/GuardianManager.js - Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ management/GuardianManager.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 Guardian 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 GuardianManager = 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 }
+ };
+
+ /**
+ * Provides an abstraction layer for retrieving Guardian enrollments.
+ *
+ * @type {external:RestClient}
+ */
+ var guardianEnrollmentsAuth0RestClient = new Auth0RestClient(
+ options.baseUrl + '/guardian/enrollments/:id',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.enrollments = new RetryRestClient(guardianEnrollmentsAuth0RestClient, options.retry);
+};
+
+/**
+ * Get a single Guardian enrollment.
+ *
+ * @method getGuardianEnrollment
+ * @memberOf module:management.GuardianManager.prototype
+ *
+ * @example
+ * management.users.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
+ * console.log(enrollment);
+ * });
+ *
+ * @param {Object} data The user data object.
+ * @param {String} data.id The user id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+GuardianManager.prototype.getGuardianEnrollment = function(params, cb) {
+ return this.enrollments.get(params, cb);
+};
+
+/**
+ * Delete a Guardian enrollment.
+ *
+ * @method deleteGuardianEnrollment
+ * @memberOf module:management.GuardianManager.prototype
+ *
+ * @example
+ * management.users.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollments) {
+ * console.log(enrollments);
+ * });
+ *
+ * @param {Object} data The user data object.
+ * @param {String} data.id The user id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+GuardianManager.prototype.deleteGuardianEnrollment = function(params, cb) {
+ return this.enrollments.delete(params, cb);
+};
+
+module.exports = GuardianManager;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/management_JobsManager.js.html b/docs/management_JobsManager.js.html
index c8ff2eeb7..898fa2dcd 100644
--- a/docs/management_JobsManager.js.html
+++ b/docs/management_JobsManager.js.html
@@ -24,7 +24,7 @@
@@ -276,7 +276,7 @@ management/JobsManager.js
diff --git a/docs/management_LogsManager.js.html b/docs/management_LogsManager.js.html
index 8234b55fe..68b59b55a 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 3f4b6b57b..7fdc26e39 100644
--- a/docs/management_ManagementTokenProvider.js.html
+++ b/docs/management_ManagementTokenProvider.js.html
@@ -24,7 +24,7 @@
@@ -189,7 +189,7 @@ management/ManagementTokenProvider.js
diff --git a/docs/management_ResourceServersManager.js.html b/docs/management_ResourceServersManager.js.html
index a87f20eb8..618dcba9a 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_RulesConfigsManager.js.html b/docs/management_RulesConfigsManager.js.html
index e92906ae3..1ce85ebbb 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 4609238a5..1f3a7b95f 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 ae40ac457..d1bb6a9ea 100644
--- a/docs/management_StatsManager.js.html
+++ b/docs/management_StatsManager.js.html
@@ -24,7 +24,7 @@
@@ -174,7 +174,7 @@ management/StatsManager.js
diff --git a/docs/management_TenantManager.js.html b/docs/management_TenantManager.js.html
index a04bc4efe..967982106 100644
--- a/docs/management_TenantManager.js.html
+++ b/docs/management_TenantManager.js.html
@@ -24,7 +24,7 @@
@@ -161,7 +161,7 @@ management/TenantManager.js
diff --git a/docs/management_TicketsManager.js.html b/docs/management_TicketsManager.js.html
index 08b49f382..5fe9f4398 100644
--- a/docs/management_TicketsManager.js.html
+++ b/docs/management_TicketsManager.js.html
@@ -24,7 +24,7 @@
@@ -166,7 +166,7 @@ management/TicketsManager.js
diff --git a/docs/management_UsersManager.js.html b/docs/management_UsersManager.js.html
index 055304cbf..793e9479d 100644
--- a/docs/management_UsersManager.js.html
+++ b/docs/management_UsersManager.js.html
@@ -24,7 +24,7 @@
@@ -147,6 +147,21 @@ management/UsersManager.js
options.tokenProvider
);
this.usersByEmail = new RetryRestClient(usersByEmailClient, options.retry);
+
+ /**
+ * Provides an abstraction layer for regenerating Guardian recovery codes.
+ *
+ * @type {external:RestClient}
+ */
+ var recoveryCodeRegenerationAuth0RestClients = new Auth0RestClient(
+ options.baseUrl + '/users/:id/recovery-code-regeneration',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.recoveryCodeRegenerations = new RetryRestClient(
+ recoveryCodeRegenerationAuth0RestClients,
+ options.retry
+ );
};
/**
@@ -618,6 +633,35 @@ management/UsersManager.js
return this.enrollments.get.apply(this.enrollments, arguments);
};
+/**
+ * Generate new Guardian recovery code.
+ *
+ * @method regenerateRecoveryCode
+ * @memberOf module:management.UsersManager.prototype
+ *
+ * @example
+ * management.users.regenerateRecoveryCode("USER_ID", function (err, result) {
+ * console.log(result.recovery_code);
+ * });
+ *
+ * @param {Object} params Get logs data.
+ * @param {String} params.id User id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+UsersManager.prototype.regenerateRecoveryCode = function(params, cb) {
+ if (!params || !params.id) {
+ throw new ArgumentError('The userId cannot be null or undefined');
+ }
+
+ if (cb && cb instanceof Function) {
+ return this.recoveryCodeRegenerations.create(params, {}, cb);
+ }
+
+ return this.recoveryCodeRegenerations.create(params, {});
+};
+
module.exports = UsersManager;
@@ -631,7 +675,7 @@ management/UsersManager.js
diff --git a/docs/management_index.js.html b/docs/management_index.js.html
index 95a6cc229..67296f73d 100644
--- a/docs/management_index.js.html
+++ b/docs/management_index.js.html
@@ -24,7 +24,7 @@
@@ -67,6 +67,7 @@ management/index.js
var ManagementTokenProvider = require('./ManagementTokenProvider');
var RulesConfigsManager = require('./RulesConfigsManager');
var EmailTemplatesManager = require('./EmailTemplatesManager');
+var GuardianManager = require('./GuardianManager');
var BASE_URL_FORMAT = 'https://%s/api/v2';
var MANAGEMENT_API_AUD_FORMAT = 'https://%s/api/v2/';
@@ -196,6 +197,14 @@ management/index.js
*/
this.users = new UsersManager(managerOptions);
+ /**
+ * Simple abstraction for performing CRUD operations on the
+ * guardian endpoint.
+ *
+ * @type {GuardianManager}
+ */
+ this.guardian = new GuardianManager(managerOptions);
+
/**
* Simple abstraction for performing CRUD operations on the
* connections endpoint.
@@ -1277,6 +1286,79 @@ management/index.js
'users.getGuardianEnrollments'
);
+/**
+ * Generate new Guardian recovery code.
+ *
+ * @method regenerateRecoveryCode
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
+ * console.log(newRecoveryCode);
+ * });
+ *
+ * @param {Object} data The user data object.
+ * @param {String} data.id The user id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(
+ ManagementClient,
+ 'regenerateRecoveryCode',
+ 'users.regenerateRecoveryCode'
+);
+
+/**
+ * Get a single Guardian enrollment.
+ *
+ * @method getGuardianEnrollment
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
+ * console.log(enrollment);
+ * });
+ *
+ * @param {Object} data The Guardian enrollment data object.
+ * @param {String} data.id The Guardian enrollment id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(
+ ManagementClient,
+ 'getGuardianEnrollment',
+ 'guardian.getGuardianEnrollment'
+);
+
+/**
+ * Delete a user's Guardian enrollment.
+ *
+ * @method deleteGuardianEnrollment
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // Email provider deleted.
+ * });
+ *
+ * @param {Object} data The Guardian enrollment data object.
+ * @param {String} data.id The Guardian enrollment id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(
+ ManagementClient,
+ 'deleteGuardianEnrollment',
+ 'guardian.deleteGuardianEnrollment'
+);
+
/**
* Get all blacklisted tokens.
*
@@ -1898,7 +1980,7 @@ management/index.js
diff --git a/docs/module-auth.AuthenticationClient.html b/docs/module-auth.AuthenticationClient.html
index 767a42097..df8515ef9 100644
--- a/docs/module-auth.AuthenticationClient.html
+++ b/docs/module-auth.AuthenticationClient.html
@@ -24,7 +24,7 @@
@@ -3622,7 +3622,7 @@ Examples
diff --git a/docs/module-auth.DatabaseAuthenticator.html b/docs/module-auth.DatabaseAuthenticator.html
index f73820dca..5c87ad275 100644
--- a/docs/module-auth.DatabaseAuthenticator.html
+++ b/docs/module-auth.DatabaseAuthenticator.html
@@ -24,7 +24,7 @@
@@ -1738,7 +1738,7 @@ Example
diff --git a/docs/module-auth.OAuthAuthenticator.html b/docs/module-auth.OAuthAuthenticator.html
index e0e65f98b..32efbf6ee 100644
--- a/docs/module-auth.OAuthAuthenticator.html
+++ b/docs/module-auth.OAuthAuthenticator.html
@@ -24,7 +24,7 @@
@@ -48,7 +48,7 @@
Abstracts the sign-in, sign-up and change-password processes for Database &
-Active Directory auhtentication services.
+Active Directory authentication services.
@@ -419,6 +419,247 @@ Methods
+
+
+
+
+ authorizationCodeGrant(data) → {Promise|undefined}
+
+
+
+
+
+
+ Sign in using an authorization code
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+ Authorization code payload
+
+
+
+
+
+
+
+
+ userData.code
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Code in URL returned after authentication
+
+
+
+
+
+
+
+
+ userData.redirect_uri
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The URL to which Auth0 will redirect the browser after authorization has been granted by the user.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+
+
+ var data = {
+ code: '{CODE}',
+ redirect_uri: '{REDIRECT_URI}',
+ client_id: '{CLIENT_ID}', // Optional field.
+ client_secret: '{CLIENT_SECRET}', // Optional field.
+};
+
+auth0.oauth.authorizationCodeGrant(data, function (err, userData) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(userData);
+});
+
+
+
+
+
+
@@ -722,7 +963,7 @@ Example
var data = {
client_id: '{CLIENT_ID}', // Optional field.
username: '{USERNAME}',
- password: '{PASSWORD}'
+ password: '{PASSWORD}',
realm: '{CONNECTION_NAME}', // Optional field.
scope: 'openid' // Optional field.
};
@@ -1014,7 +1255,7 @@ Example
var data = {
client_id: '{CLIENT_ID}', // Optional field.
username: '{USERNAME}',
- password: '{PASSWORD}
+ password: '{PASSWORD}',
connection: '{CONNECTION_NAME}',
scope: 'openid' // Optional field.
};
@@ -1284,7 +1525,7 @@ Returns:
diff --git a/docs/module-auth.PasswordlessAuthenticator.html b/docs/module-auth.PasswordlessAuthenticator.html
index a21bd9114..5cd5d2913 100644
--- a/docs/module-auth.PasswordlessAuthenticator.html
+++ b/docs/module-auth.PasswordlessAuthenticator.html
@@ -24,7 +24,7 @@
@@ -1492,7 +1492,7 @@ Examples
diff --git a/docs/module-auth.TokensManager.html b/docs/module-auth.TokensManager.html
index 8befa00d1..36c3e083a 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 263aa0379..a344885d1 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 5c148a786..2e3a81a80 100644
--- a/docs/module-auth.html
+++ b/docs/module-auth.html
@@ -24,7 +24,7 @@
@@ -105,7 +105,7 @@ Classes
diff --git a/docs/module-management.BlacklistedTokensManager.html b/docs/module-management.BlacklistedTokensManager.html
index b8eadce77..b53d34806 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 2c1b70877..5da6642fb 100644
--- a/docs/module-management.ClientGrantsManager.html
+++ b/docs/module-management.ClientGrantsManager.html
@@ -24,7 +24,7 @@
@@ -542,7 +542,7 @@ createSource:
deleteSource:
deleteSource:
getAllSource:
updateSource:
updateSource:
Example
diff --git a/docs/module-management.ClientsManager.html b/docs/module-management.ClientsManager.html
index 6660e333f..288df07c3 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 ba59d39d8..a609a2047 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.DeviceCredentialsManager.html b/docs/module-management.DeviceCredentialsManager.html
index 694636a5e..d0f9b4ffc 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 ef80c4764..af9dacf13 100644
--- a/docs/module-management.EmailProviderManager.html
+++ b/docs/module-management.EmailProviderManager.html
@@ -24,7 +24,7 @@
@@ -1345,7 +1345,7 @@ Example
diff --git a/docs/module-management.EmailTemplatesManager.html b/docs/module-management.EmailTemplatesManager.html
index b9d4bb269..3c4e9b491 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.GuardianManager.html b/docs/module-management.GuardianManager.html
new file mode 100644
index 000000000..08dfc8532
--- /dev/null
+++ b/docs/module-management.GuardianManager.html
@@ -0,0 +1,973 @@
+
+
+
+
+
+ GuardianManager - Documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GuardianManager
+
+
+
+
+
+
+
+
+
+
+
+
+ management.
+
+ GuardianManager
+
+
+ Abstracts interaction with the Guardian endpoint.
+
+
+
+
+
+
+
+
+
+
+
+ Constructor
+
+
+ new GuardianManager(options)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ options
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+ The client options.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ baseUrl
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The URL of the API.
+
+
+
+
+
+
+
+
+ headers
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Headers to be included in all requests.
+
+
+
+
+
+
+
+
+ retry
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Retry Policy Config
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+
+(inner) guardianEnrollmentsAuth0RestClient :external:RestClient
+
+
+
+
+
+ Provides an abstraction layer for retrieving Guardian enrollments.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ deleteGuardianEnrollment(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Delete a Guardian enrollment.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.users.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollments) {
+ console.log(enrollments);
+});
+
+
+
+
+
+
+
+
+
+
+ getGuardianEnrollment(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get a single Guardian enrollment.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The user data object.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The user id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.users.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
+ console.log(enrollment);
+});
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-management.JobsManager.html b/docs/module-management.JobsManager.html
index 86062089a..d217ba6ff 100644
--- a/docs/module-management.JobsManager.html
+++ b/docs/module-management.JobsManager.html
@@ -24,7 +24,7 @@
@@ -1306,7 +1306,7 @@ Example
diff --git a/docs/module-management.LogsManager.html b/docs/module-management.LogsManager.html
index 90bb3156b..1ab6b3f19 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 9092609a0..381045a07 100644
--- a/docs/module-management.ManagementClient.html
+++ b/docs/module-management.ManagementClient.html
@@ -24,7 +24,7 @@
@@ -106,7 +106,7 @@ new M
blac
clientGra
clientsSource:
connection
devi
emailPro
emailTe
Type:
+
+
+
+
+
+guardian :GuardianManager
+
+
+
+
+
+ Simple abstraction for performing CRUD operations on the
+guardian endpoint.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
@@ -1247,7 +1322,7 @@ jobsSource:
logsSource:
resour
rulesSource:
rulesConf
statsSource:
tenantSource:
ticketsSource:
usersSource:
blackli
Source:
createCli
creat
Source:
c
createRule<
createUser<
deleteA
deleteCli
delet
Source:
de
Example
- deleteResourceServer(params, cbopt) → {Promise|undefined}
+ deleteGuardianEnrollment(data, cbopt) → {Promise|undefined}
- Delete an existing resource server.
+ Delete a user's Guardian enrollment.
@@ -5299,7 +5374,7 @@ d
Parameters:
- params
+ data
@@ -5370,7 +5445,7 @@ Parameters:
- Resource Server parameters.
+ The Guardian enrollment data object.
@@ -5413,7 +5488,7 @@ Parameters:
- Resource Server ID.
+ The Guardian enrollment id.
@@ -5508,12 +5583,12 @@ Returns:
Example
- management.deleteResourceServer({ id: RESOURCE_SERVER_ID }, function (err) {
+ management.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err) {
if (err) {
// Handle error.
}
- // Resource Server deleted.
+ // Email provider deleted.
});
@@ -5525,14 +5600,14 @@ Example
- deleteRule(params, cbopt) → {Promise|undefined}
+ deleteResourceServer(params, cbopt) → {Promise|undefined}
- Delete an existing rule.
+ Delete an existing resource server.
@@ -5568,7 +5643,7 @@ deleteRule<
Parameters:
- Rule parameters.
+ Resource Server parameters.
@@ -5682,7 +5757,7 @@ Parameters:
- Rule ID.
+ Resource Server ID.
@@ -5777,12 +5852,12 @@ Returns:
Example
- auth0.deleteRule({ id: RULE_ID }, function (err) {
+ management.deleteResourceServer({ id: RESOURCE_SERVER_ID }, function (err) {
if (err) {
// Handle error.
}
- // Rule deleted.
+ // Resource Server deleted.
});
@@ -5794,14 +5869,14 @@ Example
- deleteRulesConfig(params, cbopt) → {Promise|undefined}
+ deleteRule(params, cbopt) → {Promise|undefined}
- Delete rules config.
+ Delete an existing rule.
@@ -5837,7 +5912,7 @@ dele
Parameters:
- Rule Configs parameters.
+ Rule parameters.
@@ -5934,7 +6009,7 @@ Parameters:
- key
+ id
@@ -5951,7 +6026,7 @@ Parameters:
- Rule Configs key.
+ Rule ID.
@@ -6046,12 +6121,12 @@ Returns:
Example
- management.deleteRulesConfig({ key: RULE_CONFIG_KEY }, function (err) {
+ auth0.deleteRule({ id: RULE_ID }, function (err) {
if (err) {
// Handle error.
}
- // Rules Config deleted.
+ // Rule deleted.
});
@@ -6063,14 +6138,14 @@ Example
- deleteUser(params, cbopt) → {Promise|undefined}
+ deleteRulesConfig(params, cbopt) → {Promise|undefined}
- Delete a user by its id.
+ Delete rules config.
@@ -6106,7 +6181,7 @@ deleteUser<
Parameters:
- The user data object..
+ Rule Configs parameters.
@@ -6203,7 +6278,7 @@ Parameters:
- id
+ key
@@ -6220,7 +6295,7 @@ Parameters:
- The user id.
+ Rule Configs key.
@@ -6264,7 +6339,7 @@ Parameters:
- Callback function
+ Callback function.
@@ -6315,12 +6390,12 @@ Returns:
Example
- management.deleteUser({ id: USER_ID }, function (err) {
+ management.deleteRulesConfig({ key: RULE_CONFIG_KEY }, function (err) {
if (err) {
// Handle error.
}
- // User deleted.
+ // Rules Config deleted.
});
@@ -6332,14 +6407,14 @@ Example
- deleteUserMultifactor(params, cbopt) → {Promise|undefined}
+ deleteUser(params, cbopt) → {Promise|undefined}
- Delete a multifactor provider for a user.
+ Delete a user by its id.
@@ -6375,7 +6450,7 @@
Parameters:
- Data object.
+ The user data object..
@@ -6495,32 +6570,6 @@ Parameters:
-
-
-
- provider
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- Multifactor provider.
-
-
-
-
-
@@ -6610,14 +6659,12 @@ Returns:
Example
- var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
-
-management.deleteUserMultifactor(params, function (err, user) {
+ management.deleteUser({ id: USER_ID }, function (err) {
if (err) {
// Handle error.
}
- // Users accounts unlinked.
+ // User deleted.
});
@@ -6629,7 +6676,7 @@ Example
- deleteUserMultifcator(params, cbopt) → {Promise|undefined}
+ deleteUserMultifactor(params, cbopt) → {Promise|undefined}
@@ -6660,10 +6707,6 @@
-
Example
var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
-management.deleteUserMultifcator(params, function (err, user) {
+management.deleteUserMultifactor(params, function (err, user) {
if (err) {
// Handle error.
}
@@ -6930,14 +6973,14 @@ Example
- getActiveUsersCount(cbopt) → {Promise|undefined}
+ deleteUserMultifcator(params, cbopt) → {Promise|undefined}
- Get a the active users count.
+ Delete a multifactor provider for a user.
@@ -6961,6 +7004,10 @@ ge
+ ge
Parameters:
- cb
+ params
-function
+Object
@@ -7034,8 +7081,6 @@ Parameters:
- <optional>
-
@@ -7046,51 +7091,350 @@ Parameters:
- Callback function.
+ Data object.
-
-
+
-
-
-
+
+
+
+
+ Name
+
+ Type
+
+
+ Description
+
+
+
+
+
+
+ id
+
+
+
+
+String
+
+
+
+
+
+ The user id.
+
+
+
+
-
-Returns:
+
+
+ provider
+
-
+
+
+
+String
-
-
+
-
-
+
+
+ Multifactor provider.
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
+
+management.deleteUserMultifcator(params, function (err, user) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Users accounts unlinked.
+});
+
+
+
+
+
+
+
+
+
+
+ getActiveUsersCount(cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get a the active users count.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
@@ -7157,7 +7501,7 @@ g
getClientSource:
getClien
getClients<
getConne
getConn
getDaily
g
getEm
Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.getEmailProvider(function (err, provider) {
+ console.log(provider.length);
+});
+
+
+
+
+
+
+
+
+
+
+ getGuardianEnrollment(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get a single Guardian enrollment.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ getEm
- Parameters:
-
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The Guardian enrollment data object.
+
+
@@ -9149,8 +9726,6 @@ Parameters:
Type
- Attributes
-
@@ -9161,6 +9736,40 @@ Parameters:
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ The Guardian enrollment id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
cb
@@ -9241,8 +9850,8 @@ Returns:
Example
- management.getEmailProvider(function (err, provider) {
- console.log(provider.length);
+ management.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
+ console.log(enrollment);
});
@@ -9297,7 +9906,7 @@ Source:
getJobSource:
getLogSource:
getLogsSource:
getR
get
getRuleSource:
getRulesSource:
getRul
getT
getUserSource:
getUserLog
getUsersSource:
Example
- getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
+ getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Get users for a given email address
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ email
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Email Address of users to locate
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+
+
+ auth0.getUsersByEmail(email, function (err, users) {
+ console.log(users);
+});
+
+
+
+
+
+
+
+
+
+
+ importUsers(data, cbopt) → {Promise|undefined}
- Get users for a given email address
+ 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.
@@ -13075,7 +13906,7 @@ getUse
Parameters:
- email
+ data
-String
+Object
@@ -13136,8 +13967,6 @@ Parameters:
- <optional>
-
@@ -13148,7 +13977,84 @@ Parameters:
- Email Address of users to locate
+ Users import data.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ connectionId
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Connection for the users insertion.
+
+
+
+
+
+
+
+
+ users
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Path to the users data file.
+
+
+
+
+
+
+
+
@@ -13235,13 +14141,15 @@ Returns:
Example
-
-
- auth0.getUsersByEmail(email, function (err, users) {
- console.log(users);
+ var params = {
+ connection_id: '{CONNECTION_ID}',
+ users: '{PATH_TO_USERS_FILE}'
+};
+
+management.get(params, function (err) {
+ if (err) {
+ // Handle error.
+ }
});
@@ -13253,15 +14161,14 @@ Example
- importUsers(data, cbopt) → {Promise|undefined}
+ linkUsers(userId, params, 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.
+ Link the user with another account.
@@ -13297,7 +14204,7 @@ importUser
Parameters:
- data
+ userId
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID of the primary user.
+
+
+
+
+
+
+
+
+ params
@@ -13368,7 +14309,7 @@ Parameters:
- Users import data.
+ Secondary user data.
@@ -13394,7 +14335,7 @@ Parameters:
- connectionId
+ user_id
@@ -13411,7 +14352,7 @@ Parameters:
- Connection for the users insertion.
+ ID of the user to be linked.
@@ -13420,7 +14361,7 @@ Parameters:
- users
+ connection_id
@@ -13437,7 +14378,7 @@ Parameters:
- Path to the users data file.
+ ID of the connection to be used.
@@ -13532,15 +14473,18 @@ Returns:
Example
- var params = {
- connection_id: '{CONNECTION_ID}',
- users: '{PATH_TO_USERS_FILE}'
+ var userId = 'USER_ID';
+var params = {
+ user_id: 'OTHER_USER_ID',
+ connection_id: 'CONNECTION_ID'
};
-management.get(params, function (err) {
+management.linkUsers(userId, params, function (err, user) {
if (err) {
// Handle error.
}
+
+ // Users linked.
});
@@ -13552,14 +14496,14 @@ Example
- linkUsers(userId, params, cbopt) → {Promise|undefined}
+ regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
- Link the user with another account.
+ Generate new Guardian recovery code.
@@ -13595,7 +14539,7 @@ linkUsersSource:
Parameters:
- userId
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ID of the primary user.
-
-
-
-
-
-
-
-
- params
+ data
@@ -13700,7 +14610,7 @@ Parameters:
- Secondary user data.
+ The user data object.
@@ -13726,33 +14636,7 @@ Parameters:
- user_id
-
-
-
-
-
-String
-
-
-
-
-
-
-
-
-
-
- ID of the user to be linked.
-
-
-
-
-
-
-
-
- connection_id
+ id
@@ -13769,7 +14653,7 @@ Parameters:
- ID of the connection to be used.
+ The user id.
@@ -13864,18 +14748,8 @@ 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.
+ management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
+ console.log(newRecoveryCode);
});
@@ -13930,7 +14804,7 @@
setRule
unlinkUser
upda
updateCli
updat
up
u
updateRule<
u
updateUser<
upd
Example
diff --git a/docs/module-management.ManagementTokenProvider.html b/docs/module-management.ManagementTokenProvider.html
index 550fb0649..b8a4fe1f9 100644
--- a/docs/module-management.ManagementTokenProvider.html
+++ b/docs/module-management.ManagementTokenProvider.html
@@ -24,7 +24,7 @@
@@ -633,7 +633,7 @@ Returns:
diff --git a/docs/module-management.ResourceServersManager.html b/docs/module-management.ResourceServersManager.html
index 7c507c01e..cdba34475 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 3eec1b0be..1e510c1c5 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.RulesConfigsManager.html b/docs/module-management.RulesConfigsManager.html
index befe42be7..e98a4e8a7 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 ec01820be..f6f3c3936 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 3352f9484..1c38a85e4 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 366cdfc78..c0e6fbfad 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 9a8dbf3df..1929bae6b 100644
--- a/docs/module-management.TicketsManager.html
+++ b/docs/module-management.TicketsManager.html
@@ -24,7 +24,7 @@
@@ -805,7 +805,7 @@ Example
diff --git a/docs/module-management.UsersManager.html b/docs/module-management.UsersManager.html
index 8b54ed544..c28b03f38 100644
--- a/docs/module-management.UsersManager.html
+++ b/docs/module-management.UsersManager.html
@@ -24,7 +24,7 @@
@@ -539,6 +539,80 @@ (
+
+
+
+
+ Type:
+
+
+
+
+
+
+
+
+
+
+
+
+(inner) recoveryCodeRegenerationAuth0RestClients :external:RestClient
+
+
+
+
+
+ Provides an abstraction layer for regenerating Guardian recovery codes.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -762,7 +836,7 @@ createSource:
deleteSource:
deleteAllSource:
Source:
getSource:
getAllSource:
getByEmail<
Source:
linkSource:
logsSource:
Example
+
+
+
+
+ regenerateRecoveryCode(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+ Generate new Guardian recovery code.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get logs data.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ User id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ management.users.regenerateRecoveryCode("USER_ID", function (err, result) {
+ console.log(result.recovery_code);
+});
+
+
+
+
+
+
@@ -3518,7 +3857,7 @@ unlinkSource:
updateSource:
upda
upd
Example
diff --git a/docs/module-management.html b/docs/module-management.html
index f2f6fa3dc..c89f5b3d9 100644
--- a/docs/module-management.html
+++ b/docs/module-management.html
@@ -24,7 +24,7 @@
@@ -83,6 +83,9 @@ Classes
Classes
diff --git a/docs/module-utils.html b/docs/module-utils.html
index cce277c28..f03416827 100644
--- a/docs/module-utils.html
+++ b/docs/module-utils.html
@@ -24,7 +24,7 @@
@@ -339,7 +339,7 @@ (static)
diff --git a/docs/utils.js.html b/docs/utils.js.html
index bc514ecf9..52026d10a 100644
--- a/docs/utils.js.html
+++ b/docs/utils.js.html
@@ -24,7 +24,7 @@
@@ -124,7 +124,7 @@ utils.js
diff --git a/package.json b/package.json
index 62f678001..60c49d951 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "auth0",
- "version": "2.11.0",
+ "version": "2.12.0",
"description": "SDK for Auth0 API v2",
"main": "src/index.js",
"files": ["src"],
License
This project is licensed under the MIT license. See the
diff --git a/docs/index.js.html b/docs/index.js.html
index 731420497..4868fba4f 100644
--- a/docs/index.js.html
+++ b/docs/index.js.html
@@ -24,7 +24,7 @@
Abstracts the sign-in, sign-up and change-password processes for Database &
-Active Directory auhtentication services. Sign in using an authorization code Authorization code payload Code in URL returned after authentication The URL to which Auth0 will redirect the browser after authorization has been granted by the user. Abstracts interaction with the Guardian endpoint. The client options. The URL of the API. Headers to be included in all requests. Retry Policy Config Provides an abstraction layer for retrieving Guardian enrollments. Delete a Guardian enrollment. The user data object. The user id. Callback function. Get a single Guardian enrollment. The user data object. The user id. Callback function. Simple abstraction for performing CRUD operations on the
+guardian endpoint. Delete an existing resource server. Delete a user's Guardian enrollment. Resource Server parameters. The Guardian enrollment data object. Resource Server ID. The Guardian enrollment id. Delete an existing rule. Delete an existing resource server. Rule parameters. Resource Server parameters. Rule ID. Resource Server ID. Delete rules config. Delete an existing rule. Rule Configs parameters. Rule parameters. Rule Configs key. Rule ID. Delete a user by its id. Delete rules config. The user data object.. Rule Configs parameters. The user id. Rule Configs key. Callback function Callback function. Delete a multifactor provider for a user. Delete a user by its id. Data object. The user data object.. Multifactor provider. Get a the active users count. Delete a multifactor provider for a user. Callback function. Data object. The user id. Multifactor provider. Callback function Get a the active users count. Callback function. Callback function. Get a single Guardian enrollment. The Guardian enrollment data object. The Guardian enrollment id. Get users for a given email address Email Address of users to locate Callback function. Get users for a given email address 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. Email Address of users to locate Users import data. Connection for the users insertion. Path to the users data file. 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. Link the user with another account. ID of the primary user. Users import data. Secondary user data. Connection for the users insertion. ID of the user to be linked. Path to the users data file. ID of the connection to be used. Link the user with another account. Generate new Guardian recovery code. ID of the primary user. Secondary user data. The user data object. ID of the user to be linked. ID of the connection to be used. The user id. Provides an abstraction layer for regenerating Guardian recovery codes. Generate new Guardian recovery code. Get logs data. User id. Callback function.index.js
diff --git a/docs/management_BlacklistedTokensManager.js.html b/docs/management_BlacklistedTokensManager.js.html
index 5a90b95e8..2366b8bd6 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 83db47ad5..d325a9a3b 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 74727a0ca..f4858aabd 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 7060b64c5..7083a0719 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_DeviceCredentialsManager.js.html b/docs/management_DeviceCredentialsManager.js.html
index 212f98329..63f4b8d1f 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 ea866799e..ff94dab39 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 1a5e04e97..d0d6b260d 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_GuardianManager.js.html b/docs/management_GuardianManager.js.html
new file mode 100644
index 000000000..ce9ea2881
--- /dev/null
+++ b/docs/management_GuardianManager.js.html
@@ -0,0 +1,156 @@
+
+
+
+
+
+ management/GuardianManager.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 Guardian 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 GuardianManager = 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 }
+ };
+
+ /**
+ * Provides an abstraction layer for retrieving Guardian enrollments.
+ *
+ * @type {external:RestClient}
+ */
+ var guardianEnrollmentsAuth0RestClient = new Auth0RestClient(
+ options.baseUrl + '/guardian/enrollments/:id',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.enrollments = new RetryRestClient(guardianEnrollmentsAuth0RestClient, options.retry);
+};
+
+/**
+ * Get a single Guardian enrollment.
+ *
+ * @method getGuardianEnrollment
+ * @memberOf module:management.GuardianManager.prototype
+ *
+ * @example
+ * management.users.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
+ * console.log(enrollment);
+ * });
+ *
+ * @param {Object} data The user data object.
+ * @param {String} data.id The user id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+GuardianManager.prototype.getGuardianEnrollment = function(params, cb) {
+ return this.enrollments.get(params, cb);
+};
+
+/**
+ * Delete a Guardian enrollment.
+ *
+ * @method deleteGuardianEnrollment
+ * @memberOf module:management.GuardianManager.prototype
+ *
+ * @example
+ * management.users.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollments) {
+ * console.log(enrollments);
+ * });
+ *
+ * @param {Object} data The user data object.
+ * @param {String} data.id The user id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+GuardianManager.prototype.deleteGuardianEnrollment = function(params, cb) {
+ return this.enrollments.delete(params, cb);
+};
+
+module.exports = GuardianManager;
+
+
+
+
+
+
+
+
diff --git a/docs/management_JobsManager.js.html b/docs/management_JobsManager.js.html
index c8ff2eeb7..898fa2dcd 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 8234b55fe..68b59b55a 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 3f4b6b57b..7fdc26e39 100644
--- a/docs/management_ManagementTokenProvider.js.html
+++ b/docs/management_ManagementTokenProvider.js.html
@@ -24,7 +24,7 @@
management/ManagementTokenProvider.js
diff --git a/docs/management_ResourceServersManager.js.html b/docs/management_ResourceServersManager.js.html
index a87f20eb8..618dcba9a 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_RulesConfigsManager.js.html b/docs/management_RulesConfigsManager.js.html
index e92906ae3..1ce85ebbb 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 4609238a5..1f3a7b95f 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 ae40ac457..d1bb6a9ea 100644
--- a/docs/management_StatsManager.js.html
+++ b/docs/management_StatsManager.js.html
@@ -24,7 +24,7 @@
management/StatsManager.js
diff --git a/docs/management_TenantManager.js.html b/docs/management_TenantManager.js.html
index a04bc4efe..967982106 100644
--- a/docs/management_TenantManager.js.html
+++ b/docs/management_TenantManager.js.html
@@ -24,7 +24,7 @@
management/TenantManager.js
diff --git a/docs/management_TicketsManager.js.html b/docs/management_TicketsManager.js.html
index 08b49f382..5fe9f4398 100644
--- a/docs/management_TicketsManager.js.html
+++ b/docs/management_TicketsManager.js.html
@@ -24,7 +24,7 @@
management/TicketsManager.js
diff --git a/docs/management_UsersManager.js.html b/docs/management_UsersManager.js.html
index 055304cbf..793e9479d 100644
--- a/docs/management_UsersManager.js.html
+++ b/docs/management_UsersManager.js.html
@@ -24,7 +24,7 @@
management/UsersManager.js
options.tokenProvider
);
this.usersByEmail = new RetryRestClient(usersByEmailClient, options.retry);
+
+ /**
+ * Provides an abstraction layer for regenerating Guardian recovery codes.
+ *
+ * @type {external:RestClient}
+ */
+ var recoveryCodeRegenerationAuth0RestClients = new Auth0RestClient(
+ options.baseUrl + '/users/:id/recovery-code-regeneration',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.recoveryCodeRegenerations = new RetryRestClient(
+ recoveryCodeRegenerationAuth0RestClients,
+ options.retry
+ );
};
/**
@@ -618,6 +633,35 @@ management/UsersManager.js
return this.enrollments.get.apply(this.enrollments, arguments);
};
+/**
+ * Generate new Guardian recovery code.
+ *
+ * @method regenerateRecoveryCode
+ * @memberOf module:management.UsersManager.prototype
+ *
+ * @example
+ * management.users.regenerateRecoveryCode("USER_ID", function (err, result) {
+ * console.log(result.recovery_code);
+ * });
+ *
+ * @param {Object} params Get logs data.
+ * @param {String} params.id User id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+UsersManager.prototype.regenerateRecoveryCode = function(params, cb) {
+ if (!params || !params.id) {
+ throw new ArgumentError('The userId cannot be null or undefined');
+ }
+
+ if (cb && cb instanceof Function) {
+ return this.recoveryCodeRegenerations.create(params, {}, cb);
+ }
+
+ return this.recoveryCodeRegenerations.create(params, {});
+};
+
module.exports = UsersManager;
@@ -631,7 +675,7 @@ management/UsersManager.js
diff --git a/docs/management_index.js.html b/docs/management_index.js.html
index 95a6cc229..67296f73d 100644
--- a/docs/management_index.js.html
+++ b/docs/management_index.js.html
@@ -24,7 +24,7 @@
management/index.js
var ManagementTokenProvider = require('./ManagementTokenProvider');
var RulesConfigsManager = require('./RulesConfigsManager');
var EmailTemplatesManager = require('./EmailTemplatesManager');
+var GuardianManager = require('./GuardianManager');
var BASE_URL_FORMAT = 'https://%s/api/v2';
var MANAGEMENT_API_AUD_FORMAT = 'https://%s/api/v2/';
@@ -196,6 +197,14 @@ management/index.js
*/
this.users = new UsersManager(managerOptions);
+ /**
+ * Simple abstraction for performing CRUD operations on the
+ * guardian endpoint.
+ *
+ * @type {GuardianManager}
+ */
+ this.guardian = new GuardianManager(managerOptions);
+
/**
* Simple abstraction for performing CRUD operations on the
* connections endpoint.
@@ -1277,6 +1286,79 @@ management/index.js
'users.getGuardianEnrollments'
);
+/**
+ * Generate new Guardian recovery code.
+ *
+ * @method regenerateRecoveryCode
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
+ * console.log(newRecoveryCode);
+ * });
+ *
+ * @param {Object} data The user data object.
+ * @param {String} data.id The user id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(
+ ManagementClient,
+ 'regenerateRecoveryCode',
+ 'users.regenerateRecoveryCode'
+);
+
+/**
+ * Get a single Guardian enrollment.
+ *
+ * @method getGuardianEnrollment
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
+ * console.log(enrollment);
+ * });
+ *
+ * @param {Object} data The Guardian enrollment data object.
+ * @param {String} data.id The Guardian enrollment id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(
+ ManagementClient,
+ 'getGuardianEnrollment',
+ 'guardian.getGuardianEnrollment'
+);
+
+/**
+ * Delete a user's Guardian enrollment.
+ *
+ * @method deleteGuardianEnrollment
+ * @memberOf module:management.ManagementClient.prototype
+ *
+ * @example
+ * management.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // Email provider deleted.
+ * });
+ *
+ * @param {Object} data The Guardian enrollment data object.
+ * @param {String} data.id The Guardian enrollment id.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+utils.wrapPropertyMethod(
+ ManagementClient,
+ 'deleteGuardianEnrollment',
+ 'guardian.deleteGuardianEnrollment'
+);
+
/**
* Get all blacklisted tokens.
*
@@ -1898,7 +1980,7 @@ management/index.js
diff --git a/docs/module-auth.AuthenticationClient.html b/docs/module-auth.AuthenticationClient.html
index 767a42097..df8515ef9 100644
--- a/docs/module-auth.AuthenticationClient.html
+++ b/docs/module-auth.AuthenticationClient.html
@@ -24,7 +24,7 @@
Examples
diff --git a/docs/module-auth.DatabaseAuthenticator.html b/docs/module-auth.DatabaseAuthenticator.html
index f73820dca..5c87ad275 100644
--- a/docs/module-auth.DatabaseAuthenticator.html
+++ b/docs/module-auth.DatabaseAuthenticator.html
@@ -24,7 +24,7 @@
Example
diff --git a/docs/module-auth.OAuthAuthenticator.html b/docs/module-auth.OAuthAuthenticator.html
index e0e65f98b..32efbf6ee 100644
--- a/docs/module-auth.OAuthAuthenticator.html
+++ b/docs/module-auth.OAuthAuthenticator.html
@@ -24,7 +24,7 @@
Methods
+authorizationCodeGrant(data) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ userData.code
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ userData.redirect_uri
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+
+
+var data = {
+ code: '{CODE}',
+ redirect_uri: '{REDIRECT_URI}',
+ client_id: '{CLIENT_ID}', // Optional field.
+ client_secret: '{CLIENT_SECRET}', // Optional field.
+};
+
+auth0.oauth.authorizationCodeGrant(data, function (err, userData) {
+ if (err) {
+ // Handle error.
+ }
+
+ console.log(userData);
+});
Example
var data = {
client_id: '{CLIENT_ID}', // Optional field.
username: '{USERNAME}',
- password: '{PASSWORD}'
+ password: '{PASSWORD}',
realm: '{CONNECTION_NAME}', // Optional field.
scope: 'openid' // Optional field.
};
@@ -1014,7 +1255,7 @@
Example
var data = {
client_id: '{CLIENT_ID}', // Optional field.
username: '{USERNAME}',
- password: '{PASSWORD}
+ password: '{PASSWORD}',
connection: '{CONNECTION_NAME}',
scope: 'openid' // Optional field.
};
@@ -1284,7 +1525,7 @@
Returns:
diff --git a/docs/module-auth.PasswordlessAuthenticator.html b/docs/module-auth.PasswordlessAuthenticator.html
index a21bd9114..5cd5d2913 100644
--- a/docs/module-auth.PasswordlessAuthenticator.html
+++ b/docs/module-auth.PasswordlessAuthenticator.html
@@ -24,7 +24,7 @@
Examples
diff --git a/docs/module-auth.TokensManager.html b/docs/module-auth.TokensManager.html
index 8befa00d1..36c3e083a 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 263aa0379..a344885d1 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 5c148a786..2e3a81a80 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 b8eadce77..b53d34806 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 2c1b70877..5da6642fb 100644
--- a/docs/module-management.ClientGrantsManager.html
+++ b/docs/module-management.ClientGrantsManager.html
@@ -24,7 +24,7 @@
createSource:
deleteSource:
deleteSource:
getAllSource:
updateSource:
updateSource:
Example
diff --git a/docs/module-management.ClientsManager.html b/docs/module-management.ClientsManager.html
index 6660e333f..288df07c3 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 ba59d39d8..a609a2047 100644
--- a/docs/module-management.ConnectionsManager.html
+++ b/docs/module-management.ConnectionsManager.html
@@ -24,7 +24,7 @@
Example
diff --git a/docs/module-management.DeviceCredentialsManager.html b/docs/module-management.DeviceCredentialsManager.html
index 694636a5e..d0f9b4ffc 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 ef80c4764..af9dacf13 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 b9d4bb269..3c4e9b491 100644
--- a/docs/module-management.EmailTemplatesManager.html
+++ b/docs/module-management.EmailTemplatesManager.html
@@ -24,7 +24,7 @@
Example
diff --git a/docs/module-management.GuardianManager.html b/docs/module-management.GuardianManager.html
new file mode 100644
index 000000000..08dfc8532
--- /dev/null
+++ b/docs/module-management.GuardianManager.html
@@ -0,0 +1,973 @@
+
+
+
+
+
+ GuardianManager
+
+
+
+
+
+
+
+
+ management.
+
+ GuardianManager
+
+
+ Constructor
+
+
+ new GuardianManager(options)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ options
+
+
+
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ baseUrl
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ headers
+
+
+
+
+
+ Object
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ retry
+
+
+
+
+
+ Object
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Members
+
+
+
+(inner) guardianEnrollmentsAuth0RestClient :external:RestClient
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
+Methods
+
+
+
+deleteGuardianEnrollment(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.users.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollments) {
+ console.log(enrollments);
+});
getGuardianEnrollment(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.users.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
+ console.log(enrollment);
+});
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/module-management.JobsManager.html b/docs/module-management.JobsManager.html
index 86062089a..d217ba6ff 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 90bb3156b..1ab6b3f19 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 9092609a0..381045a07 100644
--- a/docs/module-management.ManagementClient.html
+++ b/docs/module-management.ManagementClient.html
@@ -24,7 +24,7 @@
new M
blac
clientGra
clientsSource:
connection
devi
emailPro
emailTe
Type:
+guardian :GuardianManager
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Type:
+
+
+
+
+
+
+
jobsSource:
logsSource:
resour
rulesSource:
rulesConf
statsSource:
tenantSource:
ticketsSource:
usersSource:
blackli
Source:
createCli
creat
Source:
c
createRule<
createUser<
deleteA
deleteCli
delet
Source:
de
Example
- deleteResourceServer(params, cbopt) → {Promise|undefined}
+ deleteGuardianEnrollment(data, cbopt) → {Promise|undefined}
d
Parameters:
-
@@ -5508,12 +5583,12 @@
+ params
data
@@ -5370,7 +5445,7 @@ Parameters:
- Parameters:
-
Returns:
Example
- management.deleteResourceServer({ id: RESOURCE_SERVER_ID }, function (err) {
+
management.deleteGuardianEnrollment({ id: ENROLLMENT_ID }, function (err) {
if (err) {
// Handle error.
}
- // Resource Server deleted.
+ // Email provider deleted.
});
Example
- deleteRule(params, cbopt) → {Promise|undefined}
+ deleteResourceServer(params, cbopt) → {Promise|undefined}
deleteRule<
Parameters:
- Parameters:
-
@@ -5777,12 +5852,12 @@ Returns:
Example
- auth0.deleteRule({ id: RULE_ID }, function (err) {
+
management.deleteResourceServer({ id: RESOURCE_SERVER_ID }, function (err) {
if (err) {
// Handle error.
}
- // Rule deleted.
+ // Resource Server deleted.
});
Example
- deleteRulesConfig(params, cbopt) → {Promise|undefined}
+ deleteRule(params, cbopt) → {Promise|undefined}
dele
Parameters:
- Parameters:
-
@@ -6046,12 +6121,12 @@
+ key
id
@@ -5951,7 +6026,7 @@ Parameters:
-
Returns:
Example
- management.deleteRulesConfig({ key: RULE_CONFIG_KEY }, function (err) {
+
auth0.deleteRule({ id: RULE_ID }, function (err) {
if (err) {
// Handle error.
}
- // Rules Config deleted.
+ // Rule deleted.
});
Example
- deleteUser(params, cbopt) → {Promise|undefined}
+ deleteRulesConfig(params, cbopt) → {Promise|undefined}
deleteUser<
Parameters:
- Parameters:
-
@@ -6264,7 +6339,7 @@
+ id
key
@@ -6220,7 +6295,7 @@ Parameters:
-
Parameters:
-
@@ -6315,12 +6390,12 @@ Returns:
Example
- management.deleteUser({ id: USER_ID }, function (err) {
+
management.deleteRulesConfig({ key: RULE_CONFIG_KEY }, function (err) {
if (err) {
// Handle error.
}
- // User deleted.
+ // Rules Config deleted.
});
Example
- deleteUserMultifactor(params, cbopt) → {Promise|undefined}
+ deleteUser(params, cbopt) → {Promise|undefined}
Parameters:
- Parameters:
-
-
-
-
-
-
@@ -6610,14 +6659,12 @@
-
-
- provider
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
- Returns:
Example
- var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
-
-management.deleteUserMultifactor(params, function (err, user) {
+
management.deleteUser({ id: USER_ID }, function (err) {
if (err) {
// Handle error.
}
- // Users accounts unlinked.
+ // User deleted.
});
Example
- deleteUserMultifcator(params, cbopt) → {Promise|undefined}
+ deleteUserMultifactor(params, cbopt) → {Promise|undefined}
@@ -6660,10 +6707,6 @@
-
Example
var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
-management.deleteUserMultifcator(params, function (err, user) {
+management.deleteUserMultifactor(params, function (err, user) {
if (err) {
// Handle error.
}
@@ -6930,14 +6973,14 @@
Example
- getActiveUsersCount(cbopt) → {Promise|undefined}
+ deleteUserMultifcator(params, cbopt) → {Promise|undefined}
ge
+
ge
Parameters:
-
+
-
-
-
+
+ cb
params
- function
+Object
@@ -7034,8 +7081,6 @@ Parameters:
- <optional>
-
@@ -7046,51 +7091,350 @@ Parameters:
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+ Type
+
+
+ Description
+
+
+
+
-
+
+ id
+
+
+
+
+
+ String
+
+
+
+ Returns:
+
+
+
-
+
-
+ provider
+
+
+
+
-
-
+
+ String
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+var params = { id: USER_ID, provider: MULTIFACTOR_PROVIDER };
+
+management.deleteUserMultifcator(params, function (err, user) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Users accounts unlinked.
+});
getActiveUsersCount(cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+g
getClient
getClien
getClients<
getConne
getConn
getDaily
g
getEm
Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.getEmailProvider(function (err, provider) {
+ console.log(provider.length);
+});
getGuardianEnrollment(data, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getEm
-
Parameters:
-
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ data
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -9149,8 +9726,6 @@
+
+
+ Parameters:
Type
- Attributes
-
@@ -9161,6 +9736,40 @@ Parameters:
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
@@ -9241,8 +9850,8 @@ cb
Returns:
Example
- management.getEmailProvider(function (err, provider) {
- console.log(provider.length);
+
management.getGuardianEnrollment({ id: ENROLLMENT_ID }, function (err, enrollment) {
+ console.log(enrollment);
});
Source:
getJobSource:
getLogSource:
getLogsSource:
getR
get
getRuleSource:
getRulesSource:
getRul
getT
getUserSource:
getUserLog
getUsersSource:
Example
- getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
+ getUsersByEmail(emailopt, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ email
+
+
+
+
+
+ String
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+
+
+auth0.getUsersByEmail(email, function (err, users) {
+ console.log(users);
+});
importUsers(data, cbopt) → {Promise|undefined}
getUse
Parameters:
-
@@ -13235,13 +14141,15 @@
+ email
data
- String
+Object
@@ -13136,8 +13967,6 @@ Parameters:
- <optional>
-
@@ -13148,7 +13977,84 @@ Parameters:
-
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ connectionId
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ users
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+ Returns:
Example
-
-
- auth0.getUsersByEmail(email, function (err, users) {
- console.log(users);
+
var params = {
+ connection_id: '{CONNECTION_ID}',
+ users: '{PATH_TO_USERS_FILE}'
+};
+
+management.get(params, function (err) {
+ if (err) {
+ // Handle error.
+ }
});
Example
- importUsers(data, cbopt) → {Promise|undefined}
+ linkUsers(userId, params, cbopt) → {Promise|undefined}
importUser
Parameters:
-
+
+
+
+
+ data
+
+
+ userId
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ params
@@ -13368,7 +14309,7 @@ Parameters:
- Parameters:
-
@@ -13420,7 +14361,7 @@
+ connectionId
user_id
@@ -13411,7 +14352,7 @@ Parameters:
-
Parameters:
-
@@ -13532,15 +14473,18 @@
+ users
connection_id
@@ -13437,7 +14378,7 @@ Parameters:
-
Returns:
Example
- var params = {
- connection_id: '{CONNECTION_ID}',
- users: '{PATH_TO_USERS_FILE}'
+
var userId = 'USER_ID';
+var params = {
+ user_id: 'OTHER_USER_ID',
+ connection_id: 'CONNECTION_ID'
};
-management.get(params, function (err) {
+management.linkUsers(userId, params, function (err, user) {
if (err) {
// Handle error.
}
+
+ // Users linked.
});
Example
- linkUsers(userId, params, cbopt) → {Promise|undefined}
+ regenerateRecoveryCode(data, cbopt) → {Promise|undefined}
linkUsers
Parameters:
-
-
-
-
-
-
-
- userId
-
-
-
-
-
- String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ params
data
@@ -13700,7 +14610,7 @@ Parameters:
- Parameters:
-
-
-
-
-
-
-
- user_id
-
-
-
-
-
-
-
-
- String
-
-
-
-
-
-
-
-
@@ -13864,18 +14748,8 @@
+ connection_id
id
@@ -13769,7 +14653,7 @@ 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.
- }
-
- // Users linked.
+
management.regenerateRecoveryCode({ id: USER_ID }, function (err, newRecoveryCode) {
+ console.log(newRecoveryCode);
});
setRule
unlinkUser
upda
updateCli
updat
up
u
updateRule<
u
updateUser<
upd
Example
diff --git a/docs/module-management.ManagementTokenProvider.html b/docs/module-management.ManagementTokenProvider.html
index 550fb0649..b8a4fe1f9 100644
--- a/docs/module-management.ManagementTokenProvider.html
+++ b/docs/module-management.ManagementTokenProvider.html
@@ -24,7 +24,7 @@
Returns:
diff --git a/docs/module-management.ResourceServersManager.html b/docs/module-management.ResourceServersManager.html
index 7c507c01e..cdba34475 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 3eec1b0be..1e510c1c5 100644
--- a/docs/module-management.RetryRestClient.html
+++ b/docs/module-management.RetryRestClient.html
@@ -24,7 +24,7 @@
Parameters:
diff --git a/docs/module-management.RulesConfigsManager.html b/docs/module-management.RulesConfigsManager.html
index befe42be7..e98a4e8a7 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 ec01820be..f6f3c3936 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 3352f9484..1c38a85e4 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 366cdfc78..c0e6fbfad 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 9a8dbf3df..1929bae6b 100644
--- a/docs/module-management.TicketsManager.html
+++ b/docs/module-management.TicketsManager.html
@@ -24,7 +24,7 @@
Example
diff --git a/docs/module-management.UsersManager.html b/docs/module-management.UsersManager.html
index 8b54ed544..c28b03f38 100644
--- a/docs/module-management.UsersManager.html
+++ b/docs/module-management.UsersManager.html
@@ -24,7 +24,7 @@
(
+
+
+
+
+
Type:
+
+
+
+
+
+
+
+(inner) recoveryCodeRegenerationAuth0RestClients :external:RestClient
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -762,7 +836,7 @@ createSource:
deleteSource:
deleteAll
Source:
getSource:
getAllSource:
getByEmail<
Source:
linkSource:
logsSource:
Example
regenerateRecoveryCode(params, cbopt) → {Promise|undefined}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+
+
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+ function
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+
+Example
+
+
+
+management.users.regenerateRecoveryCode("USER_ID", function (err, result) {
+ console.log(result.recovery_code);
+});
unlinkSource:
updateSource:
upda
upd
Example
diff --git a/docs/module-management.html b/docs/module-management.html
index f2f6fa3dc..c89f5b3d9 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 cce277c28..f03416827 100644
--- a/docs/module-utils.html
+++ b/docs/module-utils.html
@@ -24,7 +24,7 @@
(static)
diff --git a/docs/utils.js.html b/docs/utils.js.html
index bc514ecf9..52026d10a 100644
--- a/docs/utils.js.html
+++ b/docs/utils.js.html
@@ -24,7 +24,7 @@
utils.js
diff --git a/package.json b/package.json
index 62f678001..60c49d951 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "auth0",
- "version": "2.11.0",
+ "version": "2.12.0",
"description": "SDK for Auth0 API v2",
"main": "src/index.js",
"files": ["src"],