octosts

package
v0.1.56 Latest Latest
Warning

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

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

Documentation

Overview

Package octosts provides a client for minting and revoking GitHub installation tokens via the OctoSTS service using Workload Identity Federation.

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.

Source Files

  • doc.go
  • octosts.go

Jump to

Keyboard shortcuts

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