auth

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPassword = errors.New("invalid password")

ErrInvalidPassword is used to identify the error received when editing an entry.

Functions

func AskPassword

func AskPassword(message string, verify bool) (*memguard.Enclave, error)

AskPassword returns the input password encrypted inside an Enclave.

This function could be tested by stubbing terminal.ReadPassword() or using Netflix/go-expect library but it provides almost no benefits.

func Login

func Login(db *bolt.DB) cmdutil.RunEFunc

Login verifies that the human/machine that is trying to execute a command is effectively the owner of the information.

If it's the first record the user is registered.

func Register

func Register(db *bolt.DB, r io.Reader) error

Register registers the user when there aren't any records yet.

Types

This section is empty.

Jump to

Keyboard shortcuts

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