authentication

package
v0.0.0-...-298751d Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 6 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupAuthentication

func SetupAuthentication(
	machine TaggedPasswordChanger,
	apiInfo *api.Info,
) (*api.Info, error)

SetupAuthentication generates a random password for the given machine, recording it via the machine's SetPassword method, and updates the info arguments with the tag and password.

Types

type AuthenticationProvider

type AuthenticationProvider interface {
	SetupAuthentication(machine TaggedPasswordChanger) (*api.Info, error)
}

AuthenticationProvider defines the single method that the provisioner task needs to set up authentication for a machine.

func NewAPIAuthenticator

func NewAPIAuthenticator(st *apiprovisioner.State) (AuthenticationProvider, error)

NewAPIAuthenticator gets the state and api info once from the provisioner API.

type TaggedPasswordChanger

type TaggedPasswordChanger interface {
	SetPassword(string) error
	Tag() names.Tag
}

TaggedPasswordChanger defines an interface for a entity with a Tag() and SetPassword() methods.

Jump to

Keyboard shortcuts

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