Chapter 8: Protective Measures
Over the last few chapters, we've spent a good deal of time implementing new features for our link-sharing application; however, we've yet to put any effort into preventing those features from being misused.
In this chapter, we'll implement some user authentication techniques that will allow us to protect certain actions from being used by individuals failing to register with or log into the site.
Introducing Sessions and Cookies
Before we write any code, let's learn a bit more about the technology behind user logins, including sessions and cookies.
If you already have some experience with sessions and cookies, you may prefer to skim through this section.
Identifying Individual Users
Generally speaking, HTTP—the ...
Get Rails: Novice to Ninja, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.