issue-test-token

command
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Command issue-test-token mints a signed JWT and serves a matching JWKS so govega's auth middleware can be exercised end-to-end without WorkOS or the full control plane.

Workflow:

  1. Run this command in one terminal: go run ./cmd/issue-test-token It prints env vars + the token, then keeps a JWKS server running.

  2. In another terminal, source the env and start your apex backend: eval "$(go run ./cmd/issue-test-token --quiet | head -3)" export TEST_TOKEN=... # paste from the helper's stderr output APEX_TENANT_ID=$APEX_TENANT_ID make run -C ../apexvega

  3. Curl with the token: curl -H "Authorization: Bearer $TEST_TOKEN" http://localhost:8080/api/v1/stats

Use --tenant, --user, --ttl, --port to vary claims and listen address.

This is a development aid, not a production tool. The signing key is generated fresh on every run and discarded on shutdown. For a long- running issuer, see cmd/control-plane.

Jump to

Keyboard shortcuts

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