O'Reilly logo

Flex on Rails: Building Rich Internet Applications with Adobe Flex 3 and Rails 2 by Daniel Wanja, Tony Hillerson

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

15 Authenticating

Goal

You need to build a system to restrict registered users’ access to certain resources. In short, you need users to log in.

Solution

Use the restful_authentication Rails plug-in, with the default Rails cookie session storage, to make sure an authenticated user exists before allowing access to certain controllers.

Authenticating Users

Sooner or later, just about every web app needs to track users and restrict access to certain resources based on whether users are logged in or not. Luckily, a tried-and-true Rails plug-in called restful_authentication helps us with all those things with just a few commands and a bit of configuration.

Starting a few versions ago, the default session store for Rails became ...

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