oidctest

package
v0.22.0-test2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package oidctest provides a minimal in-process OIDC provider for tests. It serves a discovery document, JWKS, an auto-approving authorization endpoint, and a token endpoint, and can mint signed ID tokens directly.

Index

Constants

View Source
const ClientID = "epithet-test-client"

ClientID is the audience carried by every minted token.

View Source
const TokenEmail = "test@example.com"

TokenEmail is the identity minted by the /token endpoint (browser-flow path).

Variables

This section is empty.

Functions

This section is empty.

Types

type IdP

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

func New

func New(t *testing.T) *IdP

func (*IdP) Issuer

func (p *IdP) Issuer() string

func (*IdP) MintIDToken

func (p *IdP) MintIDToken(email string, expiresAt time.Time) string

func (*IdP) MintIDTokenWithAudience

func (p *IdP) MintIDTokenWithAudience(email, aud string, expiresAt time.Time) string

Jump to

Keyboard shortcuts

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