octosts

package
v0.1.50 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	OctoSTSEndpoint = "https://octo-sts.dev"
)

Variables

This section is empty.

Functions

func NewTokenSource added in v0.1.35

func NewTokenSource(ts oauth2.TokenSource, xchg sts.Exchanger) oauth2.TokenSource

NewTokenSource creates an octoSTSTokenSource, similar to sts.NewTokenSource

func NewTokenSourceFromValues added in v0.1.35

func NewTokenSourceFromValues(ctx context.Context, policyName, org, repo string) (oauth2.TokenSource, error)

NewTokenSourceFromValues creates the exchanger and token source required to create an octoSTSTokenSource and then calls NewTokenSource with those values.

func Revoke

func Revoke(ctx context.Context, tok string) error

Revoke revokes the given security token.

func Token

func Token(ctx context.Context, policyName, org, repo string) (string, error)

Token mints a new octo sts token based on the policy for a given repo.

Types

This section is empty.

Jump to

Keyboard shortcuts

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