Documentation ¶
Index ¶
- Variables
- func NewPodman(stderr io.Writer, opts ...PodmanOpt) session.Attachable
- type Child
- type MultiAuthProvider
- func (ap *MultiAuthProvider) AddProject(org, proj string)
- func (ap *MultiAuthProvider) Credentials(ctx context.Context, req *auth.CredentialsRequest) (*auth.CredentialsResponse, error)
- func (ap *MultiAuthProvider) FetchToken(ctx context.Context, req *auth.FetchTokenRequest) (rr *auth.FetchTokenResponse, err error)
- func (ap *MultiAuthProvider) GetTokenAuthority(ctx context.Context, req *auth.GetTokenAuthorityRequest) (*auth.GetTokenAuthorityResponse, error)
- func (ap *MultiAuthProvider) Register(server *grpc.Server)
- func (ap *MultiAuthProvider) VerifyTokenAuthority(ctx context.Context, req *auth.VerifyTokenAuthorityRequest) (*auth.VerifyTokenAuthorityResponse, error)
- type OS
- type PodmanOpt
- type ProjectAdder
Constants ¶
This section is empty.
Variables ¶
var ErrAuthProviderNoResponse = fmt.Errorf("AuthServerNoResponse")
Functions ¶
Types ¶
type Child ¶ added in v0.7.10
type Child interface { Credentials(context.Context, *auth.CredentialsRequest) (*auth.CredentialsResponse, error) FetchToken(context.Context, *auth.FetchTokenRequest) (*auth.FetchTokenResponse, error) GetTokenAuthority(context.Context, *auth.GetTokenAuthorityRequest) (*auth.GetTokenAuthorityResponse, error) VerifyTokenAuthority(context.Context, *auth.VerifyTokenAuthorityRequest) (*auth.VerifyTokenAuthorityResponse, error) }
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
func (ap *MultiAuthProvider) Credentials(ctx context.Context, req *auth.CredentialsRequest) (*auth.CredentialsResponse, error)
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
func (ap *MultiAuthProvider) GetTokenAuthority(ctx context.Context, req *auth.GetTokenAuthorityRequest) (*auth.GetTokenAuthorityResponse, error)
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
func (ap *MultiAuthProvider) VerifyTokenAuthority(ctx context.Context, req *auth.VerifyTokenAuthorityRequest) (*auth.VerifyTokenAuthorityResponse, error)
VerifyTokenAuthority calls child VerifyTokenAuthority methods until one of ap's children succeeds.
type OS ¶ added in v0.7.10
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.
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.