tokenfile

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TokenRetrieverName specifies the name of the Token Retriever.
	TokenRetrieverName = "token_file"
)

Variables

View Source
var ErrNoTokenPath = errors.New("no token path specified")

ErrNoTokenPath is an error, which is returned, when the TokenRetriever is configured without a path to the token file.

Functions

This section is empty.

Types

type Option

type Option func(*TokenRetriever)

Option is a function which configures a TokenRetriever instance.

func WithPath

func WithPath(path string) Option

WithPath returns an Option, which configures the TokenRetriever to use the given filepath to read the contents of the identity token.

type TokenRetriever

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

TokenRetriever retrieves an identity token from a given path.

TokenRetriever implements the stscreds.IdentityTokenRetriever interface.

func NewTokenRetriever

func NewTokenRetriever(opts ...Option) (*TokenRetriever, error)

NewTokenRetriever creates a new TokenRetriever and configures it using the provided options.

func (*TokenRetriever) GetIdentityToken

func (t *TokenRetriever) GetIdentityToken() ([]byte, error)

GetIdentityToken implements the stscreds.IdentityTokenRetriever interface.

Jump to

Keyboard shortcuts

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