auth

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPublicKeyNotFound = errors.Wrap(stderr.New("public key not found"), http.StatusUnauthorized)

ErrPublicKeyNotFound is returned by AuthorizedKeysStorage.GetPublicKey if authorized key is not found

Functions

This section is empty.

Types

type AuthorizedKeysStorage

type AuthorizedKeysStorage interface {
	GetPublicKey(ctx context.Context, keyHash gotez.PublicKeyHash) (crypt.PublicKey, error)
	ListPublicKeys(ctx context.Context) ([]crypt.PublicKeyHash, error)
}

AuthorizedKeysStorage represents an authorized public keys storage

func Must

Must panics in case of error

func StaticAuthorizedKeys

func StaticAuthorizedKeys(pub ...crypt.PublicKey) (AuthorizedKeysStorage, error)

StaticAuthorizedKeys returns an AuthorizedKeysStorage that uses the given public keys

func StaticAuthorizedKeysFromRaw

func StaticAuthorizedKeysFromRaw(pub ...tz.PublicKey) (AuthorizedKeysStorage, error)

StaticAuthorizedKeysFromRaw returns an AuthorizedKeysStorage that uses the given public keys

Jump to

Keyboard shortcuts

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