generic

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

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