O'Reilly logo

Learning Sinatra by Manoj Sehrawat, Sudeep Agarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling authentication using session

You have learned about the session object and its methods; now we know that if we need to store something across the requests, we can store it in the session. In this section, you will learn how to build a simple authentication system for your application using sessions.

What is authentication and authorization?

Authentication is a process that ensures and confirms a user's identity based on the provided credentials (username and password). On the basis of the username and password, we can figure out that the user with the provided credentials exists, we have found our current user for the request, and this user will be called an authenticated user.

Authorization is the process of giving individuals access to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required