Giter Club home page Giter Club logo

bca_web's Introduction

bca_web

My rewrite of the BCA web framework in Python Flask
*Please use a Python 2.7 virtual environment to avoid version issues

Setup

  1. cd bca_web - Navigate to the folder
  2. MAC OSX - brew install mysql
    Windows - https://dev.mysql.com/downloads/windows/installer/8.0.html https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
  3. python setup.py install OR pip install requirements.txt OR CLICK install dependencies if using PyCharm
  4. MAC OSX - export FLASK_APP=bca_web.py
    Windows - set FLASK_APP=bca_web.py
  5. flask run

Debug Mode

Debug mode makes testing a lot easier and displays errors.
Always make sure to keep deubg mode ON during Development and OFF during Production
export FLASK_DEBUG=True

Auth

  1. After successful email/password verification a JWT token is created for the current user and saved under the "bca_token" cookie.

  2. The token has the following payload: bca_token: { usr_id: Int, ip_address: Str, last_used: Int (Seconds), timeout_duration: Int (Seconds)}

  3. Upon every request, the cookie is verified, checked for timeout, and updated.

  4. The current user and their corresponding JWT token can always be accessed with the request context variable, g, under the attributes user and token respectively.

bca_web's People

Contributors

mistertoucan avatar miguelroberts avatar ross3102 avatar

Stargazers

 avatar  avatar

Watchers

Bryan Respass avatar

Forkers

atcs-bca

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.