authentication

package
v2.0.0-pre3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MPL-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsetEnvVar = pkgerrors.New("environment variable SSH_AUTH_SOCK not set")
)

Functions

This section is empty.

Types

type KeyID

type KeyID struct {
	UserName    string
	AccountName string
	Fingerprint string
	IsManta     bool
}

type PrivateKeySigner

type PrivateKeySigner struct {
	// contains filtered or unexported fields
}

func NewPrivateKeySigner

func NewPrivateKeySigner(input PrivateKeySignerInput) (*PrivateKeySigner, error)

func (*PrivateKeySigner) DefaultAlgorithm

func (s *PrivateKeySigner) DefaultAlgorithm() string

func (*PrivateKeySigner) KeyFingerprint

func (s *PrivateKeySigner) KeyFingerprint() string

func (*PrivateKeySigner) Sign

func (s *PrivateKeySigner) Sign(dateHeader string, isManta bool) (string, error)

func (*PrivateKeySigner) SignRaw

func (s *PrivateKeySigner) SignRaw(toSign string) (string, string, error)

type PrivateKeySignerInput

type PrivateKeySignerInput struct {
	KeyID              string
	PrivateKeyMaterial []byte
	AccountName        string
	Username           string
}

type SSHAgentSigner

type SSHAgentSigner struct {
	// contains filtered or unexported fields
}

func NewSSHAgentSigner

func NewSSHAgentSigner(input SSHAgentSignerInput) (*SSHAgentSigner, error)

func (*SSHAgentSigner) DefaultAlgorithm

func (s *SSHAgentSigner) DefaultAlgorithm() string

func (*SSHAgentSigner) KeyFingerprint

func (s *SSHAgentSigner) KeyFingerprint() string

func (*SSHAgentSigner) MatchKey

func (s *SSHAgentSigner) MatchKey() (ssh.PublicKey, error)

func (*SSHAgentSigner) Sign

func (s *SSHAgentSigner) Sign(dateHeader string, isManta bool) (string, error)

func (*SSHAgentSigner) SignRaw

func (s *SSHAgentSigner) SignRaw(toSign string) (string, string, error)

type SSHAgentSignerInput

type SSHAgentSignerInput struct {
	KeyID       string
	AccountName string
	Username    string
}

type Signer

type Signer interface {
	DefaultAlgorithm() string
	KeyFingerprint() string
	Sign(dateHeader string, isManta bool) (string, error)
	SignRaw(toSign string) (string, string, error)
}

func NewTestSigner

func NewTestSigner() (Signer, error)

NewTestSigner constructs a new instance of test signer

type TestSigner

type TestSigner struct{}

TestSigner represents an authentication key signer which we can use for testing purposes only. This will largely be a stub to send through client unit tests.

func (*TestSigner) DefaultAlgorithm

func (s *TestSigner) DefaultAlgorithm() string

func (*TestSigner) KeyFingerprint

func (s *TestSigner) KeyFingerprint() string

func (*TestSigner) Sign

func (s *TestSigner) Sign(dateHeader string, isManta bool) (string, error)

func (*TestSigner) SignRaw

func (s *TestSigner) SignRaw(toSign string) (string, string, error)

Jump to

Keyboard shortcuts

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