Skip to content

Latest commit

 

History

History
80 lines (62 loc) · 3.38 KB

developers.md

File metadata and controls

80 lines (62 loc) · 3.38 KB

Developer's Documentation

Introduction

The data flow diagram:

+------+                                                                                 ________
|  O   |            +------------+            +-------+     +-------+                  /__________\
| ---  |    SSL     | RedHat 7.0 |   unix     |       |     |       |   sha256 IDs    |            |
|  |   |  --------> |   Nginx    | ---------> | uWSGI | --> | Flask | < =========== > |  1FL-DB    |
| / \  |   OAuth2   +------------+  socket    |       |     |  App  |    1FL-UUID     |  MySQL     |
--------                                      +-------+     +-------+                 |            |
|  PS  |                                                                               \__________/
+------+

Legend:

RedHat Setup

Install webserver and supervisor

$ sudo yum install nginx supervisor.noarch
$ sudo yum install python-pip.noarch python-flake8.noarch pylint.noarch
$ sudo pip install --upgrade pip
$ sudo pip install virtualenv virtualenvwrapper

Virtual Environment Creation

$ mkdir $HOME/.virtualenvs

Add to ~/.bashrc:
    export WORKON_HOME=$HOME/.virtualenvs
    source /path/to/this/file/virtualenvwrapper.sh

$ source ~/.bashrc
$ mkvirtualenv my_venv

OAuth 2.0

The OAuth 2.0 Authorization Framework is described by rfc6749

 +--------+                               +---------------+
 |        |--(A)- Authorization Request ->|   Resource    |
 |        |                               |     Owner     |
 |        |<-(B)-- Authorization Grant ---|               |
 |        |                               +---------------+
 |        |
 |        |                               +---------------+
 |        |--(C)-- Authorization Grant -->| Authorization |
 | Client |                               |     Server    |
 |        |<-(D)----- Access Token -------|               |
 |        |                               +---------------+
 |        |
 |        |                               +---------------+
 |        |--(E)----- Access Token ------>|    Resource   |
 |        |                               |     Server    |
 |        |<-(F)--- Protected Resource ---|               |
 +--------+                               +---------------+