-
Copy environment configuration and update config
cp example.env .env
-
Install the requirements:
poetry install -v
-
Init python environment:
poetry shell
-
Run the app:
python main.py
-
Test at http://localhost:8080/docs
-
Get bearer token by logging in with expected client configuration:
curl -X 'POST' \ 'http://localhost:8080/client/login' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"team_name": "ateam", "client_id": "123456789", "client_secret": "weaksecret"}'
-
Use the bearer token returned from the last step to authenticate with protected endpoints.
curl -X 'GET' \ 'http://0.0.0.0:8080/ping' \ -H 'accept: application/json' \ -H 'Authorization: Bearer XXXXXXXXYYYYYYZZZZZZ'
-
Follow the auth guide for local setup
forked from seanglynn/fastapi-jwt-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
FastAPI example that provides JWT Auth support
seanglynn-thrive/fastapi-jwt-auth
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
FastAPI example that provides JWT Auth support
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 100.0%