Giter Site home page Giter Site logo

beryju / oauth1-test-server Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 1.0 247 KB

OAuth 1 Server for end-to-end and unit-testing

License: GNU General Public License v3.0

Dockerfile 7.96% Python 82.99% HTML 9.05%
python oauth1 oauth1-server sso e2e unittest

oauth1-test-server's Introduction

OAuth1 Test Server

GitHub branch checks state

Based on https://flask-oauthlib.readthedocs.io/en/latest/oauth1.html and https://github.com/lepture/example-oauth1-server

Can be used for e2e testing.

Credentials

By default, a user with the Username example-user is created.

Configuration

  • OAUTH1_CLIENT_ID: OAuth Client ID
  • OAUTH1_CLIENT_SECRET: OAuth Client Secret
  • OAUTH1_REDIRECT_URI: Allowed redirect URI

URLs/API Endpoints

  • /oauth/request_token: Request Token endpoint, accepts both GET and POST
  • /oauth/access_token: Access Token endpoint, accepts both GET and POST
  • /oauth/authorize: Authorize endpoint
  • /api/me: Returns User information
  • /api/health: Healthcheck URL

Running

This service is intended to run in a docker container

docker pull ghcr.io/beryju/oauth1-test-server
docke run -d --rm \
    -p 5000:5000 \
    -e OAUTH1_CLIENT_ID=2NVVBip7I5kfl0TwVmGzTphhC98kmXScpZaoz7ET \
    -e OAUTH1_CLIENT_SECRET=wXzb8tGqXNbBQ5juA0ZKuFAmSW7RwOw8uSbdE3MvbrI8wjcbGp \
    -e OAUTH1_REDIRECT_URI=http://localhost.... \
    ghcr.io/beryju/oauth1-test-server:v1.1

Or if you want to use docker-compose, use this in your docker-compose.yaml.

version: '3.5'

services:
  oauth1-test-server:
    image: ghcr.io/beryju/oauth1-test-server:v1.1
    ports:
      - 5000:5000
    environment:
      OAUTH1_CLIENT_ID: 2NVVBip7I5kfl0TwVmGzTphhC98kmXScpZaoz7ET
      OAUTH1_CLIENT_SECRET: wXzb8tGqXNbBQ5juA0ZKuFAmSW7RwOw8uSbdE3MvbrI8wjcbGp
      OAUTH1_REDIRECT_URI: http://localhost....

oauth1-test-server's People

Contributors

beryju avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

oauth1-test-server's Issues

HTTP 500 error on 'latest' image

The latest image that is published into ghcr does not seem to work as expected - the application crashes on parsing Authorization header from request sent to /oauth/request_token.

When pulling image version v1.1, the same request is successful. I tried to rebuild the image from a few commits, but it seems the problems stats as soon as 9fab57e (first commit afer v1.1).

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.