authfixture

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package authfixture writes web-auth material for tests that exercise encrypted persistence without exercising password hashing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(t testing.TB, dbPath string, options ...Options)

Write creates usable persisted auth material without running Argon2.

The password hash is intentionally synthetic and cannot authenticate a login. Tests of password hashing or login verification must use the real authmaterial APIs.

Types

type Options

type Options struct {
	Username               string
	EncryptionKeySeed      string
	AllowUnencryptedExport bool
}

Options customizes the non-password fields used by Write.

Jump to

Keyboard shortcuts

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