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

JSON API #19

Merged
merged 15 commits into from
Dec 13, 2014
Merged

JSON API #19

merged 15 commits into from
Dec 13, 2014

Conversation

roberthodgen
Copy link
Owner

Changes include:

  • Added JSON paths to config.py
  • Added _logout_user() in login.py for handling logging users out (via destroying session cookies and UserSession in NDB datastore.
  • Added HTTP/1.1 400 Bad Request error handler in login.py
  • Added json_object() function to User class in users.py; will return a publicly displayable User object (i.e. what to return in JSON requests).
  • _login.json via JsonLogin will: return information about a logged in user; log out a user; log in a user.
  • _login/create.json via JsonLoginCreate will: create a new user.
  • _login/activate.json via JsonLoginAcivate will: activate user accounts (email verification)
  • _login/password/change.json via JsonLoginPasswordChange will: change the logged in user's password.
  • _login/password/forgot.json via JsonLoginPasswordForgot will: send a password recovery email.
  • _login/password/reset.json via JsonLoginPasswordReset will: reset a user's password (and verify a token is valid).

Closes #3; Closes #18

@roberthodgen roberthodgen changed the title Json api JSON API Dec 13, 2014
@roberthodgen roberthodgen self-assigned this Dec 13, 2014
Also corrected issue in JsonLogin where `response_object` was called on `self` (shouldn't!)

Added `Content-Type` headers where they were previously missing.
Also fixed issue in users.UserSession.create_user_session() where **kwargs was missing (appeared to have issue with @classmethod decorator?)
Removed JSON API todo.
roberthodgen added a commit that referenced this pull request Dec 13, 2014
@roberthodgen roberthodgen merged commit cee485c into master Dec 13, 2014
@roberthodgen roberthodgen deleted the json-api branch December 13, 2014 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Complete Documentation page JSON API
1 participant