Skip to content

Latest commit

 

History

History
51 lines (30 loc) · 875 Bytes

README.md

File metadata and controls

51 lines (30 loc) · 875 Bytes

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.