Coder Social home page Coder Social logo

isogeo / api-sample-oauth2-acg-py Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 64 KB

Sample project to illustrate how to authentifiy to Isogeo API with Authorization Code Grant flow

License: GNU Lesser General Public License v3.0

Dockerfile 1.23% Python 54.67% CSS 7.82% HTML 36.28%
isogeo api sample flask oauth2-client authorization-code-grant isogeo-api grant-flow oauth2-authorization-code-flow

api-sample-oauth2-acg-py's Introduction

Isogeo User oAuth2 example - Website with Flask

Sample project to illustrate how to authentifiy to Isogeo API with Authorization Code Grant flow

DO NOT USE THIS CODE IN PRODUCTION

Usage

Install:

  1. Clone/download this repository,

  2. Paste your client_secrets.json file

  3. Open a prompt (bash, powershell...),

  4. Create autosigned SSL certififcate/key pair (for Windows users, see this page [fr] )

    mkdir certs
    openssl req -nodes -new -x509 -keyout certs/server.key -out certs/server.cert
  5. Then, depending on your flavour...

With your installed Python

  1. Create a virtualenv and install prerequisites:

    py -3 -m  venv env
    pip install --upgrade -r requirements.txt
    # or if you have pipenv
    pipenv install --dev
  2. Run it:

    Set-Item Env:FLASK_APP ".\runserver.py"
    flask run
  3. Open your favorite browser to https://localhost:3000.

With Docker

# build the container
docker build -t isogeo-api-sample-oauth2-agf-py:latest .
# launch it in detached mode
docker run --rm --name isogeo-websample -d -p 3000:3000 isogeo-oauth2-sample

Then, open your favorite browser to https://localhost:3000.

api-sample-oauth2-acg-py's People

Contributors

guts avatar

Watchers

 avatar  avatar  avatar  avatar

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.