Documentation
¶
Overview ¶
Package octosts provides a client for minting and revoking GitHub installation tokens via the OctoSTS service using Workload Identity Federation.
Index ¶
- Constants
- func NewTokenSource(ts oauth2.TokenSource, xchg sts.Exchanger) oauth2.TokenSource
- func NewTokenSourceFromValues(ctx context.Context, policyName, org, repo string) (oauth2.TokenSource, error)
- func Revoke(ctx context.Context, tok string) error
- func Token(ctx context.Context, policyName, org, repo string) (string, error)
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 ¶
Revoke revokes the given security token.
Types ¶
This section is empty.
Source Files
¶
- doc.go
- octosts.go
Click to show internal directories.
Click to hide internal directories.