An implementation of OAuth REST API server on Falcon. Based on falcon-rest-api repository.
- Python 3.5.2
- Cerberus 1.1
- Cython 0.25.2
- falcon 1.1.0
- gunicorn 19.6.0
- itsdangerous 0.24
- psycopg2 2.6.2
- pytest 3.0.6
- python-decouple 3.0
- requests 2.13.0
- SQLAlchemy 1.1.5
-
Change user:
sudo su postgres
-
Enter to psql:
psql
-
Enter the commands one after another with the sign of the semicolon ;
CREATE DATABASE oauth_db;
CREATE USER admin WITH PASSWORD 'admin2321';
ALTER ROLE admin SET client_encoding TO 'utf8';
ALTER ROLE admin SET timezone TO 'UTC';
GRANT ALL PRIVILEGES ON DATABASE oauth_db TO admin;
-
Create .env file in root directory
-
Added into file following variables:
SECRET_KEY=YourSecretKey
DB_URI=dialect+driver://username:password@host:port/database
LOG_LEVEL=DEBUG
-
Type
make start-server
-
Navigate to
http://0.0.0.0:5000/
Type pytest -v
API endpoints: