This is a simple Blog API showcasing JSON WEB TOKEN AUTHENTICATION for DJANGO
Install using pip...
pip install django-jwt-auth
You can use POSTMAN for testing this.
SIGN UP
METHOD = POST URL = http://127.0.0.1:8000/sign_up/ BODY = username,email,password
LOGIN
METHOD = POST URL = http://127.0.0.1:8000/login/ BODY = username, password
After you login you will be provided with token, You must use this token for further authentication.
list user blogs
METHOD = POST URL = http://127.0.0.1:8000/list_user_blog/ No BODY parameters HEADERS = Content-Type = application/json, Authorization = JWT { YOUR_JWT_TOKEN }
create a blog
METHOD = POST URL = http://127.0.0.1:8000/create_blog/ BODY = title, description HEADERS = Content-Type = application/json, Authorization = JWT { YOUR_JWT_TOKEN }