tokens

package
v1.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken(ctx context.Context, source, audience string, httpClient *http.Client) (string, error)

GetToken retrieves an ID token from the specified source. It supports the "github_actions" and "local" sources. If the source is "github_actions", it will use the ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN environment variables to request an ID token from the GitHub Actions service. If the source is "local", it will return a hardcoded ID token.

Types

type CommandResult added in v1.4.0

type CommandResult struct {
	Stdout   string
	Stderr   string
	ExitCode int
}

Jump to

Keyboard shortcuts

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