Help us shape the future of Go! Take the 2026 Go Developer Survey

apiportal

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Overview

Package apiportal holds steps that create real subscription, application, and API-key artifacts through api-portal's own REST API — the product that issues subscription tokens and API keys, which reach platform-api (and from there the gateway) as signed webhook events. See core/catalog/apiportal's own doc comment for why the portal, not platform-api, is the thing under test here.

api-portal accepts the platform-api admin JWT directly as a bearer token: it verifies the RS256 signature against the shared keypair's public half (auth.local.public_key_path in portals/api-portal/configs/config.toml, wired to the same jwt_public.pem core/catalog/apiportal.portalCryptoFiles copies from the control plane's own key material) and takes the organization from the token's org_handle claim. Every call in this package reuses that same bearer token — no session cookie, no CSRF handshake.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(sc *godog.ScenarioContext, topo *runtime.Topology, controlPlane *httpx.Client) func(ctx context.Context, handle string) error

Register binds the steps that drive api-portal's own REST API — subscription plans, publishing an API, applications, subscriptions, and API keys. Portal requests go through a client that trusts the portal's certificate; the shared client every other suite request funnels through trusts only the control plane's, and serves the calls made to platform-api. It returns the function that removes a plan from the portal when the scenario ends, for the control-plane steps that publish plans to it.

Types

type Steps

type Steps struct {
	// contains filtered or unexported fields
}

Steps holds what every api-portal REST call needs.

Jump to

Keyboard shortcuts

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