credentials

package module
v0.0.0-...-dbe2112 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: AGPL-3.0-or-later Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticatedCredential

type AuthenticatedCredential pb.AuthenticatedCredential

func (*AuthenticatedCredential) Base64URLDecode

func (ac *AuthenticatedCredential) Base64URLDecode(username string, password string) error

func (*AuthenticatedCredential) Base64URLEncodePassword

func (ac *AuthenticatedCredential) Base64URLEncodePassword() (string, error)

func (*AuthenticatedCredential) Base64URLEncodeUsername

func (ac *AuthenticatedCredential) Base64URLEncodeUsername() string

func (*AuthenticatedCredential) MarshalJSON

func (ac *AuthenticatedCredential) MarshalJSON() ([]byte, error)

func (*AuthenticatedCredential) Pb

func (*AuthenticatedCredential) UnmarshalJSON

func (ac *AuthenticatedCredential) UnmarshalJSON(data []byte) error

type CredentialManager

type CredentialManager struct {
	sync.Pool
}

CredentialManager authenticates and verifies rescue node credentials

func NewCredentialManager

func NewCredentialManager(h func() hash.Hash, key []byte) *CredentialManager

NewCredentialManager creates a new CredentialManager which can create and verify authenticated credentials

func (*CredentialManager) Create

func (c *CredentialManager) Create(timestamp time.Time, nodeID []byte, OperatorType OperatorType) (*AuthenticatedCredential, error)

Create makes a new credential and authenticates it, returning a protoc struct that can be marshaled/unmarshaled

func (*CredentialManager) Verify

func (c *CredentialManager) Verify(authenticatedCredential *AuthenticatedCredential) error

Verify checks that a AuthenticatedCredential has a valid mac

type OperatorType

type OperatorType = pb.OperatorType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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