Summary

In this chapter, you learned how to apply user authentication and authorization to an app. The first step was to create an authenticated access to the application. For this purpose, we created a database table to manage users and associated it to the Yii user component through a user model that extends IdentityInterface.

The first example in this chapter was building a login form to authenticate the user. The next step was to control which actions a user can perform or not, and this was the case for the authorization phase too. As you saw, Yii provides two solutions for this matter: ACF and RBAC. We configured a controller to use ACF and then you saw how RBAC is a more powerful tool to manage user authorization with more granularity. Finally, we built an authorization manager all by ourselves.

In the next chapter, we will cover topics such as installing and using an advanced template and having multiple apps in the same context.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.125.139