Implementing authentication and authorization
Authentication and authorization are essential parts to be considered while designing the REST APIs. With the help of these layers, we can prevent unauthorized access to our application. There are many types of implementation patterns are available, but we will use JWT (JSON Web Token). Read more about it at https://en.wikipedia.org/wiki/JSON_Web_Token. JWT is really useful for implementing distributed microservices architecture, and it doesn't rely on centralized server databases to verify the authenticity of the token.
There are many Python libraries available to implement the JWT token mechanism. In our case, we would like to use the django-rest-framework-jwt library (https://getblimp.github.io/django-rest-framework-jwt/ ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access