Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beryju/oauth1-test-server
OAuth 1 Server for end-to-end and unit-testing
https://github.com/beryju/oauth1-test-server
e2e oauth1 oauth1-server python sso unittest
Last synced: 3 months ago
JSON representation
OAuth 1 Server for end-to-end and unit-testing
- Host: GitHub
- URL: https://github.com/beryju/oauth1-test-server
- Owner: BeryJu
- License: gpl-3.0
- Created: 2020-09-26T15:15:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-10T11:16:19.000Z (4 months ago)
- Last Synced: 2024-09-10T12:47:05.104Z (4 months ago)
- Topics: e2e, oauth1, oauth1-server, python, sso, unittest
- Language: Python
- Homepage:
- Size: 241 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OAuth1 Test Server
![GitHub branch checks state](https://img.shields.io/github/checks-status/beryju/oauth1-test-server/main?style=flat-square)
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`.
```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....
```