generic

package
v0.58.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 12 Imported by: 3 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ProviderName = "generic"

ProviderName is the name of the generic authentication provider.

Variables

This section is empty.

Functions

This section is empty.

Types

type Implementation

type Implementation interface {
	ReadFile(name string) ([]byte, error)
}

Implementation provides the required methods of the generic libraries.

type Provider

type Provider struct{ Implementation }

Provider implements the auth.Provider interface for generic authentication.

func (Provider) GetAccessTokenOptionsForCluster

func (Provider) GetAccessTokenOptionsForCluster(opts ...auth.Option) ([][]auth.Option, error)

GetAccessTokenOptionsForCluster implements auth.RESTConfigProvider.

func (Provider) GetAudiences

GetAudiences implements auth.RESTConfigProvider.

func (Provider) GetIdentity

func (Provider) GetIdentity(serviceAccount corev1.ServiceAccount) (string, error)

GetIdentity implements auth.RESTConfigProvider.

func (Provider) GetName

func (p Provider) GetName() string

GetName implements auth.RESTConfigProvider.

func (Provider) NewControllerToken

func (p Provider) NewControllerToken(ctx context.Context, opts ...auth.Option) (auth.Token, error)

NewControllerToken implements auth.RESTConfigProvider.

func (Provider) NewRESTConfig

func (Provider) NewRESTConfig(ctx context.Context, accessTokens []auth.Token,
	opts ...auth.Option) (*auth.RESTConfig, error)

NewRESTConfig implements auth.RESTConfigProvider.

func (Provider) NewTokenForServiceAccount

func (Provider) NewTokenForServiceAccount(ctx context.Context, oidcToken string,
	serviceAccount corev1.ServiceAccount, opts ...auth.Option) (auth.Token, error)

NewTokenForServiceAccount implements auth.RESTConfigProvider.

type Token

type Token struct {
	Token     string
	ExpiresAt time.Time
}

Token is the generic token.

func (*Token) GetDuration

func (t *Token) GetDuration() time.Duration

GetDuration implements auth.Token.

Jump to

Keyboard shortcuts

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