https://github.com/slayer321/flask_api_using_jwt
:zap: RESTFul API in Flask with JWT and Flask-SQLAlchemy and tested using Postman
https://github.com/slayer321/flask_api_using_jwt
flask jwt restapi
Last synced: 5 months ago
JSON representation
:zap: RESTFul API in Flask with JWT and Flask-SQLAlchemy and tested using Postman
- Host: GitHub
- URL: https://github.com/slayer321/flask_api_using_jwt
- Owner: slayer321
- Created: 2021-05-09T15:11:34.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-16T07:36:15.000Z (almost 2 years ago)
- Last Synced: 2024-07-16T10:00:09.954Z (almost 2 years ago)
- Topics: flask, jwt, restapi
- Language: Python
- Homepage:
- Size: 139 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Flask API using JWT
Made with ❤️ using python
This project is made using `RESTFul API in Flask` with `JWT` and `Flask-SQLAlchemey` for authentication and authorization and testing is done using Postman. To show the working example of this project I have added the `TODO` route so if the user is authorized then he can create his todo list.
## :wrench: How to Install
`git clone https://github.com/slayer321/flask_api_using_jwt.git`
`pip install -r requirement.txt`
## :memo: Working
1.Using a login route the user can generate the **JWT** token which is signed by using a secret key and using that token in his header user can get access to all the info based on wheather user is admin or not.

2.Once the user add that token to header using **x-access-token** as key if user is authorized then the user can see the info (here I have generated the token for the admin so we are able to see all the info).

3.This is how we can also perform all the other CRUD operation like **PUT** , **POST** , **DELETE** .
## :bookmark: Todo route
Using todo route user can easily make his todo list and it is safe from the malicous user as no unauthorized user can view another user's todo list.

## :raised_hands: Contributing
This is an open source project. Any contribution would be highly appreciated!