Skip to content

behai-nguyen/fastapi_learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastapi_learning

Documentation of my FastAPI learning process. I document what I find necessary.

Posts are listed in the Related post(s) section below. Each entry includes the link to the actual post, the git clone command for the target code revision, and an excerpt from the post.

Related post(s)

  1. Python FastAPI: Some Further Studies on OAuth2 Security
git clone -b v0.1.0 https://github.com/behai-nguyen/fastapi_learning.git

FastAPI provides excellent tutorials that thoroughly introduce the framework. Two sections on security, namely Tutorial - User Guide Security and Advanced User Guide Security, have sparked further questions, which we are discussing in this post. Hopefully, this discussion will lead to a better understanding of how FastAPI security works.

  1. Python FastAPI: Integrating OAuth2 Security with the Application's Own Authentication Process
git clone -b v0.2.0 https://github.com/behai-nguyen/fastapi_learning.git

In the first post, we explore some aspects of OAuth2 authentication, focusing on the /token path as illustrated in an example from the Simple OAuth2 with Password and Bearer section of the Tutorial - User Guide Security. In this subsequent post, we implement our own custom preliminary login process, leveraging the /token path. This means that both the Swagger UI Authorize button and our application's login button utilise the same server code.

  1. Python FastAPI: Implementing Persistent Stateful HTTP Sessions with Redis Session Middleware and Extending OAuth2PasswordBearer for OAuth2 Security
git clone -b v0.3.0 https://github.com/behai-nguyen/fastapi_learning.git

In the second post of our <a href="https://fastapi.tiangolo.com/learn/"title="FastAPI" target="_blank">FastAPI learning series, we implemented a placeholder for the application's own authentication process. In this post, we will complete this process by implementing persistent server-side HTTP sessions using the starsessions library and its Redis store store, as well as extending the OAuth2PasswordBearer class.

License

MIT license and the GPL license.

About

Documentation of my FastAPI learning process.

Resources

Stars

Watchers

Forks

Packages

No packages published