

Before we get started though, let me explain what decorators are. Now you have access to the codebase I will be referring to in the rest of the tutorial. To clone the project, run this command in your terminal: $ git clone For additional details on the process of creating and configuring the tokens, you can read more in the PyJWT docs.
#FLASK BLUEPRINT AUTHENTICATION HOW TO#
It is important to note that this tutorial is focused on how to use and configure authentication tokens in Flask and not on the structure of the tokens or the various token configurations, such as when they expire or their composition. In this tutorial we will not focus on the process of developing the API endpoints but on the process of ensuring that the endpoints are secured by enforcing use of authentication tokens. We will use this API to create, read, and delete books. The application we will be using for this tutorial is a simple book management API. Our tutorials are platform-agnostic, but use CircleCI as an example. Working knowledge of Python, Flask, and virtual environments.To follow along with this tutorial, you will need: Using these endpoints, we will be able to make requests to the Flask API only for authenticated users. Has your team worked on an API and wanted (somehow) to implement more powerful security features? If you are dissatisfied with the level of security in an API, there are solutions for improving it! In this tutorial, I will lead you through the process of creating API endpoints that are secured with authentication tokens.
