identitytest

package
v0.30.4 Latest Latest
Warning

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

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

Documentation

Overview

Package identitytest stands in for the authentication middleware in tests that drive a router built without it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As

func As(req *http.Request, caller identity.Identity) *http.Request

As returns req carrying caller as its authenticated identity.

func Serve

func Serve(next http.Handler, caller identity.Identity) http.Handler

Serve returns next serving every request as caller, for a test that reaches the handler over a real connection, where no context crosses from the client.

Types

This section is empty.

Jump to

Keyboard shortcuts

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