Skip to content
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

Use more REST-like endpoints to change and reset password #155

Open
rodrigods opened this issue Jan 31, 2014 · 0 comments
Open

Use more REST-like endpoints to change and reset password #155

rodrigods opened this issue Jan 31, 2014 · 0 comments

Comments

@rodrigods
Copy link
Contributor

Current change password endpoint: POST /account/pw/change
Current reset password endpoint: POST /account/pw/reset

Since we have already a endpoint to create and delete accounts:
POST /account
DELETE /account

We should use the following endpoint to change password:
PUT /account
{
"username": "alice@shakespeare.lit",
"old_password": "pass123",
"new_password": "pass456",
"email": "alice@email.com"
}

For the future, if we want endpoints to change other fields like email, or even username, we can use:

PUT /account?change=:field

And the field to be changed passed in the change parameter.

And the following to reset password:
PUT /account?reset=true
{
"username": "alice@shakespeare.lit"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant