-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added password reset features for tests #36
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready to merge after changing minor issues
lib/api.authentication.js
Outdated
* @param {Object} callback.err An error that occurred, if any | ||
*/ | ||
var getResetPasswordSecret = module.exports.getResetPasswordSecret = function(restCtx, username, callback) { | ||
RestUtil.RestRequest(restCtx, '/api/auth/local/reset/init/' + username, 'GET', null, callback); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest /api/auth/local/reset/password-secret
since REST endpoints' resources should be nouns and not verbs.. also, we don't need the /
do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'll require me changing it in Hilary, 3akai as well so will take a bit longer. I'll go with /api/auth/local/reset/secret
.
Also, I'm not sure which /
you mean... We do need the ones here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
secret
is fine. And nevermind about the slashes, I misread the concatenation at the end
lib/api.authentication.js
Outdated
* @param {Object} callback.err An error that occurred, if any | ||
*/ | ||
var resetPassword = module.exports.resetPassword = function(restCtx, username, secret, newPassword, callback) { | ||
RestUtil.RestRequest(restCtx, '/api/auth/local/reset/change/' + username, 'POST', {'secret': secret, 'newPassword': newPassword}, callback); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make it /api/auth/local/reset/password
since that's the resource we're manipulating
No description provided.