4. Authentication Services and Security with JWT

Learning Objectives

By the end of this chapter, you will be able to:

  • Apply your knowledge of JWT
  • Create an access token using Flask-JWT-Extended
  • Develop a membership login system
  • Implement an access control system (authentication and permissions)
  • Work with a refresh token
  • Restrict access using a blacklist

This chapter covers how to develop a user login/logout function using JWT.

Introduction

In the previous chapter, we completed the database setup and configuration and linked the database to the code using ORM. We then implemented the user registration API on top of that. This chapter is divided into four parts. The first part is about authenticating the user and allowing them to log ...

Get Python API Development Fundamentals 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.