Sample project to illustrate how to authentifiy to Isogeo API with Authorization Code Grant flow
DO NOT USE THIS CODE IN PRODUCTION
Install:
-
Clone/download this repository,
-
Paste your
client_secrets.json
file -
Open a prompt (bash, powershell...),
-
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
-
Then, depending on your flavour...
-
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
-
Run it:
Set-Item Env:FLASK_APP ".\runserver.py" flask run
-
Open your favorite browser to https://localhost:3000.
# 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.