juju: github.com/juju/juju/controller/authentication Index | Files

package authentication

import "github.com/juju/juju/controller/authentication"

Index

Package Files

authentication.go

func SetupAuthentication Uses

func SetupAuthentication(
    machine TaggedPasswordChanger,
    stateInfo *mongo.MongoInfo,
    apiInfo *api.Info,
) (*mongo.MongoInfo, *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.

type AuthenticationProvider Uses

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

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

func NewAPIAuthenticator Uses

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

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

type TaggedPasswordChanger Uses

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

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

Package authentication imports 7 packages (graph) and is imported by 43 packages. Updated 2019-08-26. Refresh now. Tools for package owners.