mock-github

command
v0.31.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

mock-github — a minimal stand-in for the GitHub OAuth + user endpoints, used by the e2e compose stack to test ppz-server's /auth/github/* flow without leaving the network.

Endpoints:

GET  /login/oauth/authorize
     ?client_id=…&redirect_uri=…&state=…
     302 to <redirect_uri>?code=test_code&state=<state>

POST /login/oauth/access_token
     accepts any client_id+secret+code
     returns {"access_token":"test_token","token_type":"bearer"}

GET  /user
     accepts any Bearer token
     returns the deterministic test user payload

The single test user is:

{"id":99001,"login":"gh-test-user","email":"ghtest@example.com",...}

Listens on $PORT (default :9000). No auth, no state — purely a fixture for the test stack.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL