Skip to content

mattlisiv/clover-oauth2-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Clover OAuth2 Workflow

This is a simple example of how to authenticate against the Clover OAuth2 sandbox and retrieve an access token.

The setup is a simple Bottle web server that connects to the Clover sandbox.

Requirements

  • Docker or pip (Python's package manager)

Setup

Docker

Build the container from the Dockerfile

docker build -t clover-auth .

Run the container. Expose the HTTP port and define the environment variables. Replace the application_id and application_secret with your dev credentials.

docker run -p 8080:8080 -e application_id='XXXXXXXXXX' -e application_secretion='XXXXXXXXXX' -t clover-auth
pip

Install bottle using pip:

pip install bottle

Then, set your application_id and application_secret:

os.environ["application_id"] = "XXXXXXX"
os.environ["application_secret"] = "XXXXXXX"

Run the HTTP server

python src/oauth-flow.py

Usage

Navigate to your localhost .

You will see a hyperlink to begin the OAuth2 workflow.

Releases

No releases published

Packages

No packages published

Languages