testkit

package
v1.234.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package testkit provides local protocol fixtures for plugin conformance tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpireOIDCSession

func ExpireOIDCSession(storage keyring.Keyring) error

ExpireOIDCSession advances the starter's cached access-token expiry in fixture storage. This helper is only used by conformance against isolated memory/file backends.

Types

type Issuer

type Issuer struct {
	Server *httptest.Server
	// contains filtered or unexported fields
}

Issuer serves discovery, signed ID tokens, PKCE exchange, refresh, and revocation. It accepts no developer credentials and binds only to a local test listener.

func NewIssuer

func NewIssuer(options ...IssuerOption) (*Issuer, error)

NewIssuer starts an isolated OIDC fixture.

func (*Issuer) Close

func (i *Issuer) Close()

Close stops the issuer.

func (*Issuer) Counts

func (i *Issuer) Counts() (int, int, int)

Counts returns code-exchange, refresh, and revocation request counts.

type IssuerOption

type IssuerOption func(*Issuer)

IssuerOption configures a deliberate protocol failure in a local test fixture.

func WithClaims

func WithClaims(mutate func(map[string]any)) IssuerOption

WithClaims changes signed claims to exercise relying-party validation.

func WithInvalidSignature

func WithInvalidSignature() IssuerOption

WithInvalidSignature signs with a key absent from the discovery JWKS.

Directories

Path Synopsis
Package fakeplugin lets a Go test binary act as a native Atmos plugin without shell commands or platform-specific executables.
Package fakeplugin lets a Go test binary act as a native Atmos plugin without shell commands or platform-specific executables.

Jump to

Keyboard shortcuts

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