authprovider

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAuthProviderNoResponse = fmt.Errorf("AuthServerNoResponse")

Functions

func NewPodman added in v0.7.10

func NewPodman(stderr io.Writer, opts ...PodmanOpt) session.Attachable

Types

type Child added in v0.7.10

Child is the interface that child auth providers need to implement for MultiAuthProvider.

type MultiAuthProvider added in v0.7.10

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

MultiAuthProvider is an auth provider that delegates authentication to multiple child auth providers.

func New added in v0.7.10

func New(console conslogging.ConsoleLogger, authServers []Child) *MultiAuthProvider

New returns a new MultiAuthProvider, wrapping up multiple child auth providers.

func (*MultiAuthProvider) AddProject added in v0.7.10

func (ap *MultiAuthProvider) AddProject(org, proj string)

AddProject searches for any children implementing ProjectAdder and calls them, then invalidates its cached auth server responses.

func (*MultiAuthProvider) Credentials added in v0.7.10

Credentials calls child Credentials methods until one of ap's children succeeds.

func (*MultiAuthProvider) FetchToken added in v0.7.10

func (ap *MultiAuthProvider) FetchToken(ctx context.Context, req *auth.FetchTokenRequest) (rr *auth.FetchTokenResponse, err error)

FetchToken calls child FetchToken methods until one of ap's children succeeds.

func (*MultiAuthProvider) GetTokenAuthority added in v0.7.10

GetTokenAuthority calls child GetTokenAuthority methods until one of ap's children succeeds.

func (*MultiAuthProvider) Register added in v0.7.10

func (ap *MultiAuthProvider) Register(server *grpc.Server)

Register registers ap against server.

func (*MultiAuthProvider) VerifyTokenAuthority added in v0.7.10

VerifyTokenAuthority calls child VerifyTokenAuthority methods until one of ap's children succeeds.

type OS added in v0.7.10

type OS interface {
	Open(string) (io.ReadCloser, error)
	Getenv(string) string
}

OS contains methods that are similar to the os package functions. It is provided so that os-level functions may be mocked.

type PodmanOpt added in v0.7.10

type PodmanOpt func(podmanCfg) podmanCfg

PodmanOpt is an option which may be used when constructing a podman auth provider.

func WithOS added in v0.7.10

func WithOS(o OS) PodmanOpt

WithOS returns an option that provides custom OS-level functions for the podman auth provider to use.

type ProjectAdder added in v0.7.10

type ProjectAdder interface {
	AddProject(org, project string)
}

ProjectAdder is an optional interface that auth servers may implement. If they do, the MultiAuthProvider will call their AddProject method when its AddProject method is called.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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