Skip to content

wemogy/oauth2-mock

Repository files navigation

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