Skip to content

sunkarimahidhar85/VoyerApi

 
 

Repository files navigation

Voyer Indentity API

authentication and user management for the travelling platform

requirements

getting started

cd scapi
virtualenv -p `which python3.6` ./env
source ./env/bin/activate
pip install -r py-requirements/base.txt

initialise your local database

cd scapi
python manage.py migrate

Create a local superuser with say username admin and password password123 for example

python manage.py createsuperuser

running the service

python manage.py runserver

Documentation

Swagger docs

browse to http://localhost:8000

example usage:

login

curl -XPOST -H 'Accept: application/json; indent=4' -u <username>:<password> http://127.0.0.1:8000/api/auth/login/
{
    "user": {
        "username": "<username>",
        "first_name": "",
        "last_name": ""
    },
    "token": "d626c65781c4530c5e63d6da93a3e1b515a36948314ce4aad65162f4f89382d4"
}

logout

curl -XPOST -H 'Authentication: Token <insert token allocated from /login endpoint>' http://127.0.0.1:8000/api/auth/logout/

About

Voyer API on the login and the travelling conditions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.6%
  • Shell 0.4%