Skip to content

Instantly share code, notes, and snippets.

@vixvix
Created April 30, 2014 19:50
Show Gist options
  • Save vixvix/21a5ecad0fd3970d896f to your computer and use it in GitHub Desktop.
Save vixvix/21a5ecad0fd3970d896f to your computer and use it in GitHub Desktop.
RESTful authentication
GET /session/new gets the webpage that has the login form
POST /session authenticates credentials against database
DELETE /session destroys session and redirect to /
GET /users/new gets the webpage that has the registration form
POST /users records the entered information into database as a new /user/xxx
GET /users/xxx // gets and renders current user data in a profile view
POST /users/xxx // updates new information about user
http://stackoverflow.com/questions/7140074/restfully-design-login-or-register-resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment