It is important for your web app to regulate who can access your content and use your services and who can't. In a typical web application, resources are usually placed in either protected or public areas. There are many resources or features you do not want users to get access to, such as administrative features for your app, or subscription-based content, and you want to restrict the access to protected content. For example, in the myJournal application, only the application owner, or a small group of users, is allowed to create, edit, or delete a journal entry.
This chapter introduces you to the key features in user-access management: user authentication, cookies, and sessions management. You'll learn how to set up a user model and password-protected content. With the authentication API, you're going to grant and remove access for different...