This a sample backend written in python (Tornado Framework) which uses Fusionauth to handle authentication.
Before starting make sure you have setup fusionauth.
This code assumes you have Fusionauth runnning on localhost
and is listening to port 9011
.
Fusionauth Related:
- Login (Access Token)
- Logout
- Retrieve Userinfo
- 2 Factor Authentication Using Authenticators.
- Groups
Application Related:
- Authorization (Using pycasbin)
Below values must be include in a .env
file in the projects root directory. (i.e same folder as main.py
)
- FUSIONAUTH_KEY
- FUSIONAUTH_SECRET_KEY
- FUSIONAUTH_MGMT_KEY
- FUSIONAUTH_CLIENT_ID
- COOKIE_SECRET
$ pip install -r requirements.txt
$ python main.py