This chapter will explain how to set up login authentication and authorization. Logging in is a fundamental step to protect our application and you will learn how to reach these goals from scratch, using the web management free extension that is broadly available on the Internet.
We will cover the following topics in this chapter:
Creating a user login:
For example: creating login form to access
Configure a user authorization
For example: creating an access control filter to authorize
Role Based Access Control (RBAC)
For example: configuring RBAC to set permissions for users
Mixing Access Control Filter (ACF) and RBAC
For example: managing users' roles to access rooms, reservations, and customers
The first step will be creating an authenticated access to our app using a database table to manage users and associate it to the Yii user component, through a user model that extends IdentityInterface
. We will provide an example of how to use it: building a login form to authenticate...