Tokens: Signing In with a JWT

After a sign-in, an API hands out a JWT, a signed token in three parts that PyJWT makes with jwt.encode and an exp claim and checks with jwt.decode, at POST /auth/token with the OAuth2 password form so the docs page's Authorize button works, and the caller sends it back in an Authorization header with every request.

By

Updated

Cheat sheet: Tokens: Signing In with a JWT
Category
FastAPI
Level
Journeyman
Tags
Base64url, Bearer Token, Claim, fastapi, JWT, OAuth2 Password Flow, rest-api, Token Signature