api_impersonate_start

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAuthTokenExpiration = 2 * time.Hour

Variables

This section is empty.

Functions

func ApiImpersonateStart

func ApiImpersonateStart(w http.ResponseWriter, r *http.Request, deps Dependencies)

func ApiImpersonateStartWithAuth

func ApiImpersonateStartWithAuth(w http.ResponseWriter, r *http.Request, a types.AuthSharedInterface)

Types

type Dependencies

type Dependencies struct {
	CanImpersonate      func(ctx context.Context, adminUserID string, targetUserID string) (bool, error)
	UserFindByAuthToken func(ctx context.Context, token string, options types.UserAuthOptions) (string, error)
	UserStoreAuthToken  func(ctx context.Context, token string, userID string, options types.UserAuthOptions) error
	TemporaryKeyGet     func(key string) (string, error)
	TemporaryKeySet     func(key string, value string, expiresSeconds int) error
	UseCookies          bool
	SetAuthCookie       func(w http.ResponseWriter, r *http.Request, token string)
	ObservabilityHooks  types.ObservabilityHooks
	ImpersonationStart  func(ctx context.Context, adminUserID string, targetUserID string) error
}

Jump to

Keyboard shortcuts

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