Skip to content

aoamusat/flask-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask RESTful auth API

A simple auth RESTful API built with Flask

Usage

Note that pipenv package was used to create virtual environment. pipenv package can be installed using: pip install pipenv .

  1. Clone this repository

  2. cd into flask-rest

  3. Run pipenv shell

  4. Run pip install -r requirements.txt

  5. python run.py

Available routes

  1. /register

-- This route requires JSON payload. -- The payload contains user registration data -- Methods allowed: POST -- Sample JSON payload: { "name": "Test", "email": "test@example.com", "password": "secret" }

  1. /login

-- This route requires JSON payload. -- The payload contains user login data -- Methods allowed: POST -- Sample JSON payload: { "email": "test@example.com", "password": "secret" } -- JWT access token that expires in 30 minutes will be returned.

All protected routes can be accessed using the JWT by specifying x-access-token in the request header.

About

A simple auth RESTful API built with Flask

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages