mock-github

command
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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