Who you are
What you can access
Form-based, OAuth, Single Sign-On
POST request with user details in the body
Check to see if a user exists with given email
If a user does not exist in the database, what will the server do with the sign up information before inserting it into the database?
Hash the password
bcrypt
POST request with user details in the body
Check to see if a user exists with given email
Redirect to login page or error page
Hash the password
Compare the hashed password with the hash stored in the database
Set a cookie/session and redirect
Redirect with error
What you can access
Cookies/Sessions
Who you are (Session/Cookie) and What you would like to do (url/endpoint)
If a user is attempting to update the resource located at /articles/24 What will the server do first?
Lookup the article with an id of 24
Determine if the id of the logged in user matches the creator_id of the article
If the logged in user does not match the creator_id of the article, what are 2 things the server can do?
Redirect to login page, Redirect to some other page, Render/send an access denied message (401), Redirect to 404 page
fin