pkgtest

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pkgtest provides utilities for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTestJWTExpiresAt

func GenerateTestJWTExpiresAt(exp time.Time) string

GenerateTestJWTExpiresAt generates a JWT with the given expiration time. The generated JWT is signed with the testKey.

func NewTestVerifier

func NewTestVerifier(clock func() time.Time) *oidc.IDTokenVerifier

NewTestVerifier returns a new IDTokenVerifier that uses the testKey for signing.

Types

type TestOIDCConfiguration

type TestOIDCConfiguration struct {
	Verifier      *oidc.IDTokenVerifier
	UsernameClaim string
	// contains filtered or unexported fields
}

TestOIDCConfiguration is a test implementation of OIDCConfiguration.

func (*TestOIDCConfiguration) GetUsernameClaim

func (c *TestOIDCConfiguration) GetUsernameClaim() string

func (*TestOIDCConfiguration) GetVerifier

func (*TestOIDCConfiguration) Now

func (c *TestOIDCConfiguration) Now() time.Time

Jump to

Keyboard shortcuts

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