5

Mastering Django Authentication and Authorization

In Chapter 4, we learned how to use Django Admin to autogenerate a user interface (UI) for basic CRUD operations. While working with Django Admin, we used the default Django authentication and authorization systems. In this chapter, we will deep dive into the Django authentication system and learn how to use Django groups and permissions to implement authorization for resources. Django by default provides cookie-based session authentication, which works perfectly for browser-based applications, but when it comes to modern web apps, it is preferred to use token-based authentication. Django REST framework (DRF) provides token-based authentication out of the box, and we will learn how to integrate ...

Get Django in Production 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.