Help us shape the future of Go! Take the 2026 Go Developer Survey

sessiontest

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package sessiontest sets up session states for the tests of packages that build on package session.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Impersonate

func Impersonate(t *testing.T, store *session.Store, request *http.Request, target *auth.Identity) *auth.Identity

Impersonate lets the identity of the session request carries impersonate target, as an application's route would, and returns the impersonating identity. The impersonator admits any active identities.

func StopImpersonating

func StopImpersonating(t *testing.T, store *session.Store, request *http.Request) *auth.Identity

StopImpersonating ends the impersonation of the session request carries, as an application's route would, and returns the impersonator's identity.

Types

This section is empty.

Jump to

Keyboard shortcuts

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