Using Session Variables for Authentication

An effective and straightforward method for handling the mechanics of user logins is outlined in the following section. Basically, the strategy is to turn on ColdFusion’s session-management features, which you learned about in Chapter 20, “Working with Sessions,” and use session variables to track whether each user has logged in. There are many ways to go about this, but it can be as simple as setting a single variable in the SESSION scope after a user logs in.

Note

Before you can use the SESSION scope in your applications, you need to enable it using the Application.cfc file. See Chapter 20 for details.

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started 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.