var extend = require('util')._extend;
+var sanitizeArguments = require('../utils').sanitizeArguments;
var ArgumentError = require('rest-facade').ArgumentError;
var RestClient = require('rest-facade').Client;
var OAUthWithIDTokenValidation = require('./OAUthWithIDTokenValidation');
+function getParamsFromOptions(options) {
+ const params = {};
+ if (!options || typeof options !== 'object') {
+ return params;
+ }
+ if (options.forwardedFor) {
+ params._requestCustomizer = function(req) {
+ req.set('auth0-forwarded-for', options.forwardedFor);
+ };
+ }
+ return params;
+}
+
/**
* @class
* Abstracts the sign-in, sign-up and change-password processes for Database &
@@ -116,17 +130,21 @@ auth/OAuthAuthenticator.js
* console.log(userData);
* });
*
- * @param {Object} userData User credentials object.
- * @param {String} userData.username Username.
- * @param {String} userData.password User password.
- * @param {String} userData.connection The identity provider in use.
+ * @param {Object} userData User credentials object.
+ * @param {String} userData.username Username.
+ * @param {String} userData.password User password.
+ * @param {String} userData.connection The identity provider in use.
+ * @param {Object} [options] Additional options.
+ * @param {String} [options.forwardedFor] Value to be used for auth0-forwarded-for header
*
* @return {Promise|undefined}
*/
-OAuthAuthenticator.prototype.signIn = function(userData, cb) {
- var params = {
+OAuthAuthenticator.prototype.signIn = function(userData, options, cb) {
+ var { options, cb } = sanitizeArguments(options, cb);
+ var defaultParams = {
type: 'ro'
};
+ var params = extend(defaultParams, getParamsFromOptions(options));
var defaultFields = {
client_id: this.clientId,
grant_type: 'password',
@@ -181,17 +199,21 @@ auth/OAuthAuthenticator.js
* console.log(userData);
* });
*
- * @param {Object} userData User credentials object.
- * @param {String} userData.username Username.
- * @param {String} userData.password User password.
- * @param {String} [userData.realm] Name of the realm to use to authenticate or the connection name
+ * @param {Object} userData User credentials object.
+ * @param {String} userData.username Username.
+ * @param {String} userData.password User password.
+ * @param {String} [userData.realm] Name of the realm to use to authenticate or the connection name
+ * @param {Object} [options] Additional options.
+ * @param {String} [options.forwardedFor] Value to be used for auth0-forwarded-for header
*
* @return {Promise|undefined}
*/
-OAuthAuthenticator.prototype.passwordGrant = function(userData, cb) {
- var params = {
+OAuthAuthenticator.prototype.passwordGrant = function(userData, options, cb) {
+ var { options, cb } = sanitizeArguments(options, cb);
+ var defaultParams = {
type: 'token'
};
+ var params = extend(defaultParams, getParamsFromOptions(options));
var defaultFields = {
client_id: this.clientId,
client_secret: this.clientSecret,
@@ -426,7 +448,7 @@ auth/OAuthAuthenticator.js
diff --git a/docs/auth_PasswordlessAuthenticator.js.html b/docs/auth_PasswordlessAuthenticator.js.html
index c3f705836..d21344a5c 100644
--- a/docs/auth_PasswordlessAuthenticator.js.html
+++ b/docs/auth_PasswordlessAuthenticator.js.html
@@ -24,7 +24,7 @@
@@ -287,7 +287,7 @@ auth/PasswordlessAuthenticator.js
diff --git a/docs/auth_TokensManager.js.html b/docs/auth_TokensManager.js.html
index d6a89de34..d9089b55d 100644
--- a/docs/auth_TokensManager.js.html
+++ b/docs/auth_TokensManager.js.html
@@ -24,7 +24,7 @@
@@ -226,7 +226,7 @@ auth/TokensManager.js
diff --git a/docs/auth_UsersManager.js.html b/docs/auth_UsersManager.js.html
index a7b6f94c3..82993210e 100644
--- a/docs/auth_UsersManager.js.html
+++ b/docs/auth_UsersManager.js.html
@@ -24,7 +24,7 @@
@@ -224,7 +224,7 @@ auth/UsersManager.js
diff --git a/docs/auth_index.js.html b/docs/auth_index.js.html
index f17d32b31..4d34b8428 100644
--- a/docs/auth_index.js.html
+++ b/docs/auth_index.js.html
@@ -24,7 +24,7 @@
@@ -603,7 +603,7 @@ auth/index.js
diff --git a/docs/external-RestClient.html b/docs/external-RestClient.html
index c0ac8e66f..b1402b8ee 100644
--- a/docs/external-RestClient.html
+++ b/docs/external-RestClient.html
@@ -24,7 +24,7 @@
@@ -87,7 +87,7 @@
Source:
@@ -287,7 +287,7 @@
Source:
@@ -387,7 +387,7 @@
Source:
@@ -487,7 +487,7 @@
Source:
@@ -587,7 +587,7 @@
Source:
@@ -687,7 +687,7 @@
Source:
@@ -787,7 +787,7 @@
Source:
@@ -887,7 +887,7 @@
Source:
@@ -987,7 +987,7 @@
Source:
@@ -1087,7 +1087,7 @@
Source:
@@ -1187,7 +1187,7 @@
Source:
@@ -1287,7 +1287,7 @@
Source:
@@ -1387,7 +1387,7 @@
Source:
@@ -1487,7 +1487,7 @@
Source:
@@ -1539,7 +1539,7 @@
diff --git a/docs/index.html b/docs/index.html
index e3322adc6..69267ff9f 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -24,7 +24,7 @@
@@ -49,20 +49,20 @@
node-auth0
-
+
+
Node.js client library for the Auth0 platform.
Installation
npm install auth0
Documentation
-You can find this library documentation in this page.
-For more information about auth0 check our documentation page.
+You can find this library documentation in this page.
+For more information about auth0 check our documentation page.
Authentication API Client
-This client must be used to access Auth0's Authentication API.
+This client must be used to access Auth0's Authentication API.
The AuthenticationClient constructor takes an optional client ID, if specified it will be used as default value for all endpoints that accept a client ID.
var AuthenticationClient = require('auth0').AuthenticationClient;
@@ -174,7 +174,7 @@ License
diff --git a/docs/index.js.html b/docs/index.js.html
index 4a2b04ce2..a5c695cb3 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 54bd4efa2..18c8b12d3 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_BrandingManager.js.html b/docs/management_BrandingManager.js.html
index 0cfec3248..cf394d1b3 100644
--- a/docs/management_BrandingManager.js.html
+++ b/docs/management_BrandingManager.js.html
@@ -24,7 +24,7 @@
@@ -155,7 +155,7 @@ management/BrandingManager.js
diff --git a/docs/management_ClientGrantsManager.js.html b/docs/management_ClientGrantsManager.js.html
index 8d7d0401f..e6dcde384 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 5279aab88..718043c3c 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 f748d7979..712848434 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 28d0c4c7a..a382f144f 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 9ab8dcda8..05ed896b3 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 4050202fc..687dbd736 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 310eca6c8..95521b87a 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 25873a07e..e1e0bb1ae 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 e75f1bf8f..59c9be7d3 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 58d0cea01..b7c0c404f 100644
--- a/docs/management_JobsManager.js.html
+++ b/docs/management_JobsManager.js.html
@@ -24,7 +24,7 @@
@@ -99,6 +99,19 @@ management/JobsManager.js
);
this.jobs = new RetryRestClient(auth0RestClient, options.retry);
+ /**
+ * Provides an abstraction layer for consuming the
+ * {@link https://auth0.com/docs/api/v2#!/Jobs/:id/errors Errors endpoint}.
+ *
+ * @type {external:RestClient}
+ */
+ var jobErrorsRestClient = new Auth0RestClient(
+ options.baseUrl + '/jobs/:id/errors',
+ clientOptions,
+ options.tokenProvider
+ );
+ this.jobErrors = new RetryRestClient(jobErrorsRestClient, options.retry);
+
/**
* Provides an abstraction layer for consuming the
* {@link https://auth0.com/docs/api/v2#!/Jobs/post_users_exports Create job to export users endpoint}
@@ -230,6 +243,13 @@ management/JobsManager.js
error.status = res.statusCode;
error.method = method;
error.text = res.text;
+ try {
+ if (!error.text && res.body) {
+ error.text = JSON.parse(res.body).message;
+ }
+ } catch (ex) {
+ // Ignore the error.
+ }
reject(error);
}
resolve(res);
@@ -305,6 +325,45 @@ management/JobsManager.js
return this.usersExports.create(data);
};
+/**
+ * Given a job ID, retrieve the failed/errored items
+ *
+ * @method get
+ * @memberOf module:management.JobsManager.prototype
+ *
+ * @example
+ * var params = {
+ * id: '{JOB_ID}'
+ * };
+ *
+ * management.jobs.errors(params, function (err, job) {
+ * if (err) {
+ * // Handle error.
+ * }
+ *
+ * // Retrieved job.
+ * console.log(job);
+ * });
+ *
+ * @param {Object} params Job parameters.
+ * @param {String} params.id Job ID.
+ * @param {Function} [cb] Callback function.
+ *
+ * @return {Promise|undefined}
+ */
+JobsManager.prototype.errors = function(params, cb) {
+ if (!params.id || typeof params.id !== 'string') {
+ throw new ArgumentError('The id parameter must be a valid job id');
+ }
+
+ if (cb && cb instanceof Function) {
+ return this.jobErrors.get(params, cb);
+ }
+
+ // Return a promise.
+ return this.jobErrors.get(params);
+};
+
/**
* Send a verification email to a user.
*
@@ -354,7 +413,7 @@ management/JobsManager.js
diff --git a/docs/management_LogsManager.js.html b/docs/management_LogsManager.js.html
index 6bfcf887f..7b8b23d14 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 5d1780a31..d2327a315 100644
--- a/docs/management_ManagementTokenProvider.js.html
+++ b/docs/management_ManagementTokenProvider.js.html
@@ -24,7 +24,7 @@
@@ -192,7 +192,7 @@ management/ManagementTokenProvider.js
diff --git a/docs/management_PromptsManager.js.html b/docs/management_PromptsManager.js.html
index ac8a7d33e..116f67b2f 100644
--- a/docs/management_PromptsManager.js.html
+++ b/docs/management_PromptsManager.js.html
@@ -24,7 +24,7 @@
@@ -155,7 +155,7 @@ management/PromptsManager.js
diff --git a/docs/management_ResourceServersManager.js.html b/docs/management_ResourceServersManager.js.html
index e26233ed7..c4e8e3327 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 4fa432968..84e58474a 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 119d595c3..02eebf01f 100644
--- a/docs/management_RulesConfigsManager.js.html
+++ b/docs/management_RulesConfigsManager.js.html
@@ -24,7 +24,7 @@
@@ -180,7 +180,7 @@ management/RulesConfigsManager.js
diff --git a/docs/management_RulesManager.js.html b/docs/management_RulesManager.js.html
index 05dc7435b..303791a96 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 6682fefa5..d6e64c8e3 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 16d8c709a..72dd36d02 100644
--- a/docs/management_TenantManager.js.html
+++ b/docs/management_TenantManager.js.html
@@ -24,7 +24,7 @@
@@ -166,7 +166,7 @@ management/TenantManager.js
diff --git a/docs/management_TicketsManager.js.html b/docs/management_TicketsManager.js.html
index 9c87827ae..e47b880bf 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_UserBlocksManager.js.html b/docs/management_UserBlocksManager.js.html
index 5fb8d3609..a6554e34b 100644
--- a/docs/management_UserBlocksManager.js.html
+++ b/docs/management_UserBlocksManager.js.html
@@ -24,7 +24,7 @@
@@ -229,7 +229,7 @@ management/UserBlocksManager.js
diff --git a/docs/management_UsersManager.js.html b/docs/management_UsersManager.js.html
index 433479dcb..3cb6d7bde 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 72a9b4ae2..abac30797 100644
--- a/docs/management_index.js.html
+++ b/docs/management_index.js.html
@@ -24,7 +24,7 @@
@@ -2880,7 +2880,7 @@ management/index.js
diff --git a/docs/module-auth.AuthenticationClient.html b/docs/module-auth.AuthenticationClient.html
index 596743ecf..2318969f0 100644
--- a/docs/module-auth.AuthenticationClient.html
+++ b/docs/module-auth.AuthenticationClient.html
@@ -24,7 +24,7 @@
@@ -3822,7 +3822,7 @@ Examples
diff --git a/docs/module-auth.DatabaseAuthenticator.html b/docs/module-auth.DatabaseAuthenticator.html
index fdba0c1d3..c958b6a9f 100644
--- a/docs/module-auth.DatabaseAuthenticator.html
+++ b/docs/module-auth.DatabaseAuthenticator.html
@@ -24,7 +24,7 @@
@@ -1738,7 +1738,7 @@ Example
diff --git a/docs/module-auth.OAUthWithIDTokenValidation.html b/docs/module-auth.OAUthWithIDTokenValidation.html
index a765bf62e..f4ca2c526 100644
--- a/docs/module-auth.OAUthWithIDTokenValidation.html
+++ b/docs/module-auth.OAUthWithIDTokenValidation.html
@@ -24,7 +24,7 @@
@@ -450,7 +450,7 @@ Parameters:
diff --git a/docs/module-auth.OAuthAuthenticator.html b/docs/module-auth.OAuthAuthenticator.html
index 9326694e4..b1081b4ec 100644
--- a/docs/module-auth.OAuthAuthenticator.html
+++ b/docs/module-auth.OAuthAuthenticator.html
@@ -24,7 +24,7 @@
@@ -102,7 +102,7 @@ new
Source:
@@ -452,7 +452,7 @@ (inner) Source:
@@ -536,7 +536,7 @@ Source:
@@ -734,7 +734,7 @@ Example
- passwordGrant(userData) → {Promise|undefined}
+ passwordGrant(userData, optionsopt) → {Promise|undefined}
@@ -777,7 +777,7 @@ password
Source:
@@ -809,6 +809,8 @@ Parameters:
Type
+ Attributes
+
@@ -834,6 +836,14 @@ Parameters:
+
+
+
+
+
+
+
+
@@ -967,6 +977,105 @@ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+ options
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Additional options.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ forwardedFor
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Value to be used for auth0-forwarded-for header
+
+
+
+
+
@@ -1098,7 +1207,7 @@ refreshTo
Source:
@@ -1292,7 +1401,7 @@ Example
- signIn(userData) → {Promise|undefined}
+ signIn(userData, optionsopt) → {Promise|undefined}
@@ -1335,7 +1444,7 @@ signInSource:
@@ -1367,6 +1476,8 @@ Parameters:
Type
+ Attributes
+
@@ -1392,6 +1503,14 @@ Parameters:
+
+
+
+
+
+
+
+
@@ -1497,6 +1616,105 @@ Parameters:
+
+
+
+
+
+
+
+
+
+
+
+ options
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Additional options.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ forwardedFor
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Value to be used for auth0-forwarded-for header
+
+
+
+
+
@@ -1627,7 +1845,7 @@ socialSig
Source:
@@ -1832,7 +2050,7 @@ Returns:
diff --git a/docs/module-auth.PasswordlessAuthenticator.html b/docs/module-auth.PasswordlessAuthenticator.html
index 57dfad95b..2c7338b26 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 c5a8d7919..b90115d33 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 f9204634c..1fb994b71 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 0a6bb5dc5..67edc6ef6 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 c368d28f7..122846930 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.BrandingManager.html b/docs/module-management.BrandingManager.html
index 262b34043..b604f8895 100644
--- a/docs/module-management.BrandingManager.html
+++ b/docs/module-management.BrandingManager.html
@@ -24,7 +24,7 @@
@@ -942,7 +942,7 @@ Example
diff --git a/docs/module-management.ClientGrantsManager.html b/docs/module-management.ClientGrantsManager.html
index 846225a1d..de293e317 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 34a359c84..81c75d824 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 bb4f584ad..d246d9852 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 a1ef086aa..33024c066 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 c3285bccf..c50d0230e 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 4000f8a4a..85b48818c 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 af3174e54..aa2d4f718 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 3642f04d4..4e2f67aee 100644
--- a/docs/module-management.GrantsManager.html
+++ b/docs/module-management.GrantsManager.html
@@ -24,7 +24,7 @@
@@ -1515,7 +1515,7 @@ Example
diff --git a/docs/module-management.GuardianManager.html b/docs/module-management.GuardianManager.html
index ceb2d04d4..fbb741e09 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 de2d802ec..43f1c0d5d 100644
--- a/docs/module-management.JobsManager.html
+++ b/docs/module-management.JobsManager.html
@@ -24,7 +24,7 @@
@@ -391,6 +391,81 @@ (inner)
+
+
+
+ Type:
+
+ -
+
+
external:RestClient
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+(inner) jobErrorsRestClient :external:RestClient
+
+
+
+
+
+ Provides an abstraction layer for consuming the
+Errors endpoint.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
@@ -457,7 +532,7 @@ (inne
Source:
@@ -541,7 +616,7 @@ exportUser
Source:
@@ -918,6 +993,280 @@ get
+ Given a job ID, retrieve the failed/errored items
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+ Attributes
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ params
+
+
+
+
+
+Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Job parameters.
+
+
+
+
+
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+ Description
+
+
+
+
+
+
+
+
+ id
+
+
+
+
+
+String
+
+
+
+
+
+
+
+
+
+
+ Job ID.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ cb
+
+
+
+
+
+function
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+ Callback function.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Returns:
+
+
+
+
+ -
+ Type:
+
+ -
+
+
Promise
+|
+
+undefined
+
+
+
+
+
+
+
+
+
+
+
+
+Example
+
+ var params = {
+ id: '{JOB_ID}'
+};
+
+management.jobs.errors(params, function (err, job) {
+ if (err) {
+ // Handle error.
+ }
+
+ // Retrieved job.
+ console.log(job);
+});
+
+
+
+
+
+
+
+
+
+
+ get(params, cbopt) → {Promise|undefined}
+
+
+
+
+
Get a job by its ID.
@@ -955,7 +1304,7 @@ getSource:
@@ -1231,7 +1580,7 @@ importUser
Source:
@@ -1609,7 +1958,7 @@ verifyEmai
Source:
@@ -1849,7 +2198,7 @@ Example
diff --git a/docs/module-management.LogsManager.html b/docs/module-management.LogsManager.html
index 50c4d503b..be6183bb5 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 e49d66743..112165b2c 100644
--- a/docs/module-management.ManagementClient.html
+++ b/docs/module-management.ManagementClient.html
@@ -24,7 +24,7 @@
@@ -23602,7 +23602,7 @@ unblockUse
Source:
@@ -23699,7 +23699,7 @@ Parameters:
- id
+ identifier
@@ -23716,7 +23716,7 @@ Parameters:
- The user id.
+ The user identifier, any of: username, phone_number, email.
@@ -23811,7 +23811,7 @@ Returns:
Example
- management.unblockUser({ id: USER_ID }, function (err) {
+ management.unblockUserByIdentifier({ identifier: USER_ID }, function (err) {
if (err) {
// Handle error.
}
@@ -23871,7 +23871,7 @@ unblockUse
Source:
@@ -23968,7 +23968,7 @@ Parameters:
- identifier
+ id
@@ -23985,7 +23985,7 @@ Parameters:
- The user identifier, any of: username, phone_number, email.
+ The user id.
@@ -24080,7 +24080,7 @@ Returns:
Example
- management.unblockUserByIdentifier({ identifier: USER_ID }, function (err) {
+ management.unblockUser({ id: USER_ID }, function (err) {
if (err) {
// Handle error.
}
@@ -27932,7 +27932,7 @@ Example
diff --git a/docs/module-management.ManagementTokenProvider.html b/docs/module-management.ManagementTokenProvider.html
index 1b95886bc..f4a7abdcb 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.PromptsManager.html b/docs/module-management.PromptsManager.html
index 28f7e7b26..c8baa8ac0 100644
--- a/docs/module-management.PromptsManager.html
+++ b/docs/module-management.PromptsManager.html
@@ -24,7 +24,7 @@
@@ -942,7 +942,7 @@ Example
diff --git a/docs/module-management.ResourceServersManager.html b/docs/module-management.ResourceServersManager.html
index a9b6ada8b..97f414bcb 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 b298ace00..abadeb01d 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 3a62c27b9..907bf7ac7 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 e3fca224b..b70f317df 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 fac38ea6b..8dd772a41 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 9bb64be36..681b49a53 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 ae72d7622..c5f3b745a 100644
--- a/docs/module-management.TenantManager.html
+++ b/docs/module-management.TenantManager.html
@@ -24,7 +24,7 @@
@@ -871,7 +871,7 @@ Example
diff --git a/docs/module-management.TicketsManager.html b/docs/module-management.TicketsManager.html
index 6d02acd9d..6a2b32a39 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
index 9d4eadd2b..ecb3c1352 100644
--- a/docs/module-management.UserBlocksManager.html
+++ b/docs/module-management.UserBlocksManager.html
@@ -24,7 +24,7 @@
@@ -1432,7 +1432,7 @@ Example
diff --git a/docs/module-management.UsersManager.html b/docs/module-management.UsersManager.html
index 7e3bc8b09..66bab6edc 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 468b176e6..8c1d3683e 100644
--- a/docs/module-management.html
+++ b/docs/module-management.html
@@ -24,7 +24,7 @@
@@ -165,7 +165,7 @@ Classes
diff --git a/docs/module-utils.html b/docs/module-utils.html
index fc18e7056..060f6ba15 100644
--- a/docs/module-utils.html
+++ b/docs/module-utils.html
@@ -24,7 +24,7 @@
@@ -447,7 +447,7 @@ (static)
diff --git a/docs/utils.js.html b/docs/utils.js.html
index cd025a8a0..2eee9fe8a 100644
--- a/docs/utils.js.html
+++ b/docs/utils.js.html
@@ -24,7 +24,7 @@
@@ -143,6 +143,19 @@ utils.js
}
return url;
};
+
+utils.sanitizeArguments = function(optionsCandidate, cbCandidate) {
+ if (optionsCandidate instanceof Function) {
+ return {
+ cb: optionsCandidate,
+ options: undefined
+ };
+ }
+ return {
+ cb: cbCandidate,
+ options: optionsCandidate
+ };
+};
@@ -155,7 +168,7 @@ utils.js
diff --git a/package.json b/package.json
index 6650d7931..5cb714155 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "auth0",
- "version": "2.18.1",
+ "version": "2.19.0",
"description": "SDK for Auth0 API v2",
"main": "src/index.js",
"files": [
RetryRestClient.js
diff --git a/docs/auth_DatabaseAuthenticator.js.html b/docs/auth_DatabaseAuthenticator.js.html index f85767a4b..e3410b04d 100644 --- a/docs/auth_DatabaseAuthenticator.js.html +++ b/docs/auth_DatabaseAuthenticator.js.html @@ -24,7 +24,7 @@
auth/DatabaseAuthenticator.js
diff --git a/docs/auth_OAUthWithIDTokenValidation.js.html b/docs/auth_OAUthWithIDTokenValidation.js.html index 5b3500446..c92039e9b 100644 --- a/docs/auth_OAUthWithIDTokenValidation.js.html +++ b/docs/auth_OAUthWithIDTokenValidation.js.html @@ -24,7 +24,7 @@
auth/OAUthWithIDTokenValidation.js
diff --git a/docs/auth_OAuthAuthenticator.js.html b/docs/auth_OAuthAuthenticator.js.html index 20b0f329e..5b01cef58 100644 --- a/docs/auth_OAuthAuthenticator.js.html +++ b/docs/auth_OAuthAuthenticator.js.html @@ -24,7 +24,7 @@