generate_password

package
v1.59.8 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePassword added in v1.38.0

func GeneratePassword() string

func RegisterHook

func RegisterHook(settings HookSettings) bool

RegisterHook returns func to register common hook that generates and stores a password in the Secret. if ExternalAuth is used - secret will be deleted, you can change this behavior by `keepPasswordOnExternalAuth` flag

Types

type Hook added in v1.38.0

type Hook struct {
	Secret    Secret
	ValuesKey string
	// contains filtered or unexported fields
}

func NewBasicAuthPlainHook added in v1.38.0

func NewBasicAuthPlainHook(settings HookSettings) *Hook

func (*Hook) ExternalAuthKey added in v1.38.0

func (h *Hook) ExternalAuthKey() string

func (*Hook) Filter added in v1.38.0

Filter extracts password from the Secret. Password can be stored as a raw string or as a basic auth plain format (user:{PLAIN}password). Custom FilterFunc is called for custom password extraction.

func (*Hook) Handle added in v1.38.0

func (h *Hook) Handle(input *go_hook.HookInput) error

Handle restores password from the configuration or from the Secret and puts it to internal values. It generates new password if there is no password in the configuration and no Secret found.

func (*Hook) PasswordInternalKey added in v1.38.0

func (h *Hook) PasswordInternalKey() string

func (*Hook) PasswordKey added in v1.38.0

func (h *Hook) PasswordKey() string

type HookSettings added in v1.51.0

type HookSettings struct {
	ModuleName string
	Namespace  string
	SecretName string
}

type Secret added in v1.38.0

type Secret struct {
	Namespace string
	Name      string
}

Jump to

Keyboard shortcuts

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