testissuer

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package testissuer is a stand-in token issuer with a JWKS endpoint, for tests of token verification without AuthKit (the framework adapters).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issuer

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

Issuer signs access tokens for the audience "test-app" with an RSA key and serves its JWKS at URL plus /.well-known/jwks.json.

func New

func New(t testing.TB) *Issuer

New starts an Issuer, closed at the test's cleanup.

func (*Issuer) Audience

func (is *Issuer) Audience() string

func (*Issuer) Signer

func (is *Issuer) Signer() keys.Signer

func (*Issuer) Token

func (is *Issuer) Token(userID, email string, claims map[string]any) string

Token is an access token for userID, valid for an hour; claims override.

func (*Issuer) URL

func (is *Issuer) URL() string

Jump to

Keyboard shortcuts

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