Skip to content

zvms/rsa-bcrypt-jwt-login-eg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rsa-bcrypt-jwt-login-eg

The Example of RSA + Bcrypt + JWT Login

Setup

Keys

You can generate RSA key pair by using openssl command. By the way, I have already written a generator script for you.

./generate_key.sh

Dependencies

Because I don't know how to properly use pip and conda, you may install these packages:

pip install fastapi uvicorn[standart] PyJWT pymongo pythoncryptodome bcrypt

MongoDB

You should run a local mongodb server with zvms.users through the declaration file in zvms4-frontend

Run

The Server

uvicorn server:app --reload

The Test Client

You can run request.py to test it.

python request.py

Only the Encryption

I wrote a encrypt demo in cert.py

License

Under the MIT License

7086cmd.

About

The Example of RSA + Bcrypt + JWT Login

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published