kauth

package
v0.0.0-...-5206ba3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause, BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveCredentials

func SaveCredentials(credentials *EnkitCredentials, store cache.Store, sshopts ...kcerts.SSHAgentModifier) error

SaveCredentials saves the passed in credentials to the current ssh-agent. If the credentials are empty, i.e. the EnkitCredentials only contain EnkitCredentials.Token, it will return nil as a NoOp.

Types

type EnkitCredentials

type EnkitCredentials struct {
	Token string
	// The below fields can be possibly empty if the auth server does not support CA certificates.
	CaHosts        []string
	CAPublicKey    string
	PrivateKey     kcerts.PrivateKey
	SSHCertificate *ssh.Certificate
}

func PerformLogin

func PerformLogin(authClient apb.AuthClient, l logger.Logger, repeater *retry.Options, rng *rand.Rand, username, domain string) (*EnkitCredentials, error)

PerformLogin will login with the provider auth client, retry and logger. It does not care about the cache. If you wish to save the result, please call SaveCredentials

Jump to

Keyboard shortcuts

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