Skip to content

blockpass-org/service-auth-example-python

Repository files navigation

Blockpass AuthBackend Service

This repo implement basic features of Blockpass Server Spec V1

Use Cases

  1. User Using Blockpass Mobile app (V1.1+) to scan QR code from website

  2. Server side handle logic

  • User registered (approved) by services --> SSO payload is going to send to website.blockpass_handler.py#ssoComplete

  • New user create new record -> generate one_time_pass inside api /login and request Mobile App upload data via /uploadData endpoints

Example website (for QR Code scanning) can be found /example-web

Pre-configuration

  • This example consumed email, selfe and onfido certificate (config inside kyc_record_model.py)

  • This example using default config (config.py):

  • developer_service setting on Blockpass Developer pages as below:

{
    "register" : "http://192.168.1.116:3000/blockpass/api/register",
    "login" : "http://192.168.1.116:3000/blockpass/api/login",
    "upload" : "http://192.168.1.116:3000/blockpass/api/uploadData",
    "status" : "http://192.168.1.116:3000/blockpass/api/status",
}

Note:

  • In order easy to develop we setup LAN ip for services. It allow Mobile App (connect to same LAN) send data direct to developer machine

Features

  • Requirement endpoints(/status /login /register /uploadData)

  • Blockpass services API Handshake

  • Blockpass services API Query Profile

  • Blockpass services API Single Sign On Complete

  • Blockpass services API Refresh Token

  • Handle reject and approved fields ( request upload again)

  • Certificate issues to client

Install dependencies

virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt

Run

python application.py

Run using docker

docker build . -t myapp
docker run -d myapp

Powered by flask-backend-boilerplate

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published