From the course: Web Security: User Authentication and Access Control
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Cookies and sessions
From the course: Web Security: User Authentication and Access Control
Cookies and sessions
- [Instructor] Cookies and sessions play an important role in controlling user access. That's because they are common ways to store the evidence that a user has been authenticated. After a user logs in successfully, a website needs to store some evidence of that authentication so that a user can access additional pages without needing to re-authenticate themselves on each one. I often describe it like the wristband that you might get at a concert or an event. You show your ticket to authenticate yourself, and you get a wristband that allows you to move around without having to show your ticket over and over. The wristband, in this case, is usually data that's put into a cookie or in the session file so that requests for future pages have easy access to it. That authentication data is valuable, and we need to keep it secure. Cookies and sessions can be stolen through snooping, by using JavaScript, or through other clever…