wemogy / oauth2-mock

Mock server for local OAuth2 testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wemogy logo OAuth2.0 Mock Server

Docker

This project uses the axa-group/oauth2-mock-server repository at its core.

Get it running

Docker

docker run -p 3200:3200 -p 3201:3201 wemogy/oauth2-mock

Code

Clone the repository.

Install all dependencies

yarn install

Start the servers

yarn start

Configuration

You can set the following environment variables to configure the servers:

Name Description Default
OAUTH2_SERVER_HOST The host of the OAuth2 server 0.0.0.0
OAUTH2_SERVER_PORT The port of the OAuth2 server 3200
TOKEN_PROVIDER_PORT The port of the token provider server 3201

Token Provider server

Requesting a token

POST: /jwt

{
    "sub": "test123",
    "aud": "realtime.eu1.spaceblocks.cloud",
    "ext": {
        "app_subject_id": "subject",
        "app_tenant_id": "tenantId",
        "spaceblocks_tenant_id": "00000000-0000-0000-0000-000000000001",
        "spaceblocks_stage_id": "e2esc01"
    }
}

Docker

Build the Docker container

docker build -t oauth2-mock .

Run the Docker container

docker run -p 3200:3200 -p 3201:3201 -d oauth2-mock

About

Mock server for local OAuth2 testing

License:MIT License


Languages

Language:TypeScript 90.0%Language:Dockerfile 10.0%