Skip to content

Commit 3a2a29e

Browse files
authored
Merge branch 'master' into update-device-credentials-docs
2 parents 4c95eec + bde5148 commit 3a2a29e

File tree

5 files changed

+28
-16
lines changed

5 files changed

+28
-16
lines changed

src/errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var sanitizeErrors = function(collection) {
3333

3434
Object.keys(collection).forEach(function(key) {
3535
if (key.toLowerCase().match('password|secret|authorization')) {
36-
collection[key] = '[SANITIZED]';
36+
collection[key] = '[REDACTED]';
3737
}
3838
});
3939
};

src/management/JobsManager.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,10 @@ JobsManager.prototype.errors = function(params, cb) {
362362
*
363363
* @param {Object} data User data object.
364364
* @param {String} data.user_id ID of the user to be verified.
365+
* @param {String} [data.client_id] client_id of the client (application). If no value provided, the global Client ID will be used.
366+
* @param {Object} [data.identity] Used to verify secondary, federated, and passwordless-email identities.
367+
* @param {String} data.identity.user_id user_id of the identity.
368+
* @param {String} data.identity.provider provider of the identity.
365369
* @param {Function} [cb] Callback function.
366370
*
367371
* @return {Promise|undefined}

src/management/TicketsManager.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ TicketsManager.prototype.changePassword = function(data, cb) {
9898
* }
9999
* });
100100
*
101+
* @param {Object} data
102+
* @param {String} [data.result_url] URL the user will be redirected to once ticket is used.
103+
* @param {String} data.user_id user_id for whom the ticket should be created.
104+
* @param {Integer} [data.ttl_sec] Number of seconds for which the ticket is valid before expiration.
105+
* @param {Boolean} [data.includeEmailInRedirect] Whether to include the email address as part of the result_url (true), or not (false).
106+
* @param {Object} [data.identity] Used to verify secondary, federated, and passwordless-email identities.
107+
* @param {String} data.identity.user_id user_id of the identity.
108+
* @param {String} data.identity.provider provider of the identity.
101109
* @param {Function} [cb] Callback function.
102110
* @return {Promise}
103111
*/

test/auth0-rest-client.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ describe('Auth0RestClient', function() {
163163
var client = new Auth0RestClient(API_URL + '/some-resource', options, this.providerMock);
164164
client.getAll().catch(function(err) {
165165
const originalRequestHeader = err.originalError.response.request._header;
166-
expect(originalRequestHeader.authorization).to.equal('[SANITIZED]');
166+
expect(originalRequestHeader.authorization).to.equal('[REDACTED]');
167167
done();
168168
nock.cleanAll();
169169
});

test/errors.tests.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ describe('Errors', function() {
66
describe('sanitizeErrorRequestData', function() {
77
describe('when passed in error is missing request data and headers', function() {
88
var error = { response: { request: {} } };
9-
var sanitizedError = errors.sanitizeErrorRequestData(error);
9+
var redactedError = errors.sanitizeErrorRequestData(error);
1010

1111
it('should return error', function() {
12-
expect(sanitizedError).to.equal(error);
12+
expect(redactedError).to.equal(error);
1313
});
1414
});
1515

@@ -25,14 +25,14 @@ describe('Errors', function() {
2525
}
2626
}
2727
};
28-
const sanitizedError = errors.sanitizeErrorRequestData(error);
29-
const sanitizedData = sanitizedError.response.request._data;
28+
const redactedError = errors.sanitizeErrorRequestData(error);
29+
const sanitizedData = redactedError.response.request._data;
3030

31-
it('should return [SANITIZED] for DATA_SECRET', function() {
32-
expect(sanitizedData.DATA_SECRET).to.equal('[SANITIZED]');
31+
it('should return [REDACTED] for DATA_SECRET', function() {
32+
expect(sanitizedData.DATA_SECRET).to.equal('[REDACTED]');
3333
});
34-
it('should return [SANITIZED] for DATA_SECRET', function() {
35-
expect(sanitizedData.DATA_SECRET).to.equal('[SANITIZED]');
34+
it('should return [REDACTED] for DATA_SECRET', function() {
35+
expect(sanitizedData.DATA_SECRET).to.equal('[REDACTED]');
3636
});
3737
it('should return original value for USER_NAME', function() {
3838
expect(sanitizedData.USER_NAME).to.equal(sanitizedData.USER_NAME);
@@ -49,11 +49,11 @@ describe('Errors', function() {
4949
}
5050
}
5151
};
52-
const sanitizedError = errors.sanitizeErrorRequestData(error);
53-
const sanitizedData = sanitizedError.response.request._header;
52+
const redactedError = errors.sanitizeErrorRequestData(error);
53+
const sanitizedData = redactedError.response.request._header;
5454

55-
it('should return [SANITIZED] for authorization', function() {
56-
expect(sanitizedData.authorization).to.equal('[SANITIZED]');
55+
it('should return [REDACTED] for authorization', function() {
56+
expect(sanitizedData.authorization).to.equal('[REDACTED]');
5757
});
5858
});
5959
});
@@ -100,8 +100,8 @@ describe('Errors', function() {
100100
expect(sanitizedError.originalError).to.eql(originalError);
101101
});
102102

103-
it('should sanitize the original error sensitive information', function() {
104-
expect(sanitizedError.originalError.response.request._data.secret).to.eql('[SANITIZED]');
103+
it('should redact the original error sensitive information', function() {
104+
expect(sanitizedError.originalError.response.request._data.secret).to.eql('[REDACTED]');
105105
});
106106

107107
it('should have a stack with the message and location the error was created', function() {

0 commit comments

Comments
 (0)