Authentication, Authorization, and File Handling
In this chapter, we will continue evolving our application, mainly covering two distinct topics: user authentication and file handling. First, we will implement a reusable JWT authentication plugin that will allow us to manage users, authentication, and sessions. It will also act as an authorization layer, protecting our application’s endpoints from unauthorized access. We will also see how decorators can expose the authenticated user’s data inside the route handlers. Then, moving on to file handling, we will develop a dedicated plugin enabling users to import and export their to-do tasks in CSV format.
In this chapter, we will learn about the following:
- Authentication and authorization flow
- Building the authentication layer
- Adding the authorization layer
- Managing uploads and downloads